summaryrefslogtreecommitdiff
path: root/src/chroot-tools/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-01-04 15:59:26 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-01-04 15:59:26 -0500
commitc000286dabf780061b46cfdadd2121869cd9e02a (patch)
treef197dc76978ff49b98622f65fc183eb3352e8a3a /src/chroot-tools/Makefile
parentec4223a6a689b341bf4a60c3e7eb0e6211b0e5f3 (diff)
Generate the duplicated code in chcleanup
Diffstat (limited to 'src/chroot-tools/Makefile')
-rw-r--r--src/chroot-tools/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile
index c041cc8..db18ea4 100644
--- a/src/chroot-tools/Makefile
+++ b/src/chroot-tools/Makefile
@@ -1,3 +1,5 @@
+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
@@ -13,4 +15,14 @@ include ../../common.mk
makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in
cp $< $@
+chcleanup: chcleanup.in chcleanup.lib
+ m4 -P $< | $(edit) > $@
+ chmod 755 $@
+chcleanup.lib: ../lib/common.sh.top ../lib/common.sh Makefile
+ { cat $<; bash -c '. ../lib/common.sh; declare -f plain msg msg2 error'; } > $@
+
distcc-tool.pot: LIBREXGETTEXT_FLAGS+=--simple=errusage
+
+# 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