diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-02-08 16:36:45 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-02-08 16:36:45 -0500 |
commit | 7e704d7ac997387341e920e1757c24cac0efe5e9 (patch) | |
tree | a9f30eabaaad5496397a91053d3e03bab1ea57e4 /src/chroot-tools | |
parent | 7785a72495e3eb0ea826b41720c241f58a15b601 (diff) |
Refactor the build system. Avoid recursive make.
This looks like a lot, but more things should "just work".
We have `make dist` now!
Diffstat (limited to 'src/chroot-tools')
-rw-r--r-- | src/chroot-tools/Makefile | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index 1b77a97..a11e69c 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -1,28 +1,27 @@ -progs = chcleanup -clean_files = chcleanup.lib -# These files are coming from devtools -copy_files = makechrootpkg.sh.in mkarchroot.in arch-nspawn.in -# These are programs that we will use internally, but shouldn't be in PATH -libexecs = mkarchroot arch-nspawn distcc-tool chcleanup indent -no-progs = $(libexecs) -# These are the shell libraries we will use -libs = makechrootpkg.sh $(wildcard hooks-*.sh) - +include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk +include $(topsrcdir)/automake.head.mk pkglibexecdir = $(libexecdir)/libretools/chroot -include ../../common.mk -# makechrootpkg.sh is created from a command, not a library -makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in +install-bins = chcleanup librechroot libremakepkg +install-libexecs += arch-nspawn chcleanup distcc-tool indent mkarchroot +install-libs += makechrootpkg.sh +devtools-files = makechrootpkg.sh.in mkarchroot.in arch-nspawn.in +am_clean_files += chcleanup.lib + +$(srcdir)/makechrootpkg.sh.in: $(srcdir)/%.sh.in: $(devtoolsdir)/%.in cp $< $@ -chcleanup: chcleanup.in chcleanup.lib - m4 -P $< | $(edit) > $@ - chmod 755 $@ -chcleanup.lib: ../lib/common.sh Makefile - bash -c '. ../lib/common.sh; declare -f _l plain msg msg2 error' > $@ +$(outdir)/chcleanup: $(srcdir)/chcleanup.in $(outdir)/chcleanup.lib + m4 -I$(@D) -P $< | $(edit) | install -m755 /dev/stdin $@ +$(outdir)/chcleanup.lib: $(call _am_path,$(topoutdir)/src/lib/common.sh) $(outdir)/Makefile + bash -c '. $<; declare -f _l plain msg msg2 error' > $@ + +$(outdir)/distcc-tool.pot: LIBREXGETTEXT_FLAGS+=--simple=errusage + +$(DESTDIR)$(bindir)/chcleanup: $(var)bindir $(var)libexecdir + mkdir -p $(@D) + ln -srfT $(DESTDIR)$(libexecdir)/libretools/chroot/chcleanup $@ -distcc-tool.pot: LIBREXGETTEXT_FLAGS+=--simple=errusage +am_depdirs = ../lib -# This is so gross. I hate recursive Make. Why did I implement it this way? -../lib/common.sh: $(devtoolsdir)/lib/common.sh ../lib/common.sh.top ../lib/Makefile - $(MAKE) -C ../lib common.sh +include $(topsrcdir)/automake.tail.mk |