summaryrefslogtreecommitdiff
path: root/src/chroot-tools/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/chroot-tools/Makefile')
-rw-r--r--src/chroot-tools/Makefile34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile
index 27030e3..7f6a7ea 100644
--- a/src/chroot-tools/Makefile
+++ b/src/chroot-tools/Makefile
@@ -1,3 +1,33 @@
-libre_execdir=$(sbindir)
-libre_confdir=$(sysconfdir)/libretools.d
+# The makechrootpkg flow is:
+# $(devtoolsdir)/*.in -> *.sh.in + *.sh.patch -> *.sh.ugly -> *.sh
+
+copy_files = makechrootpkg.sh.in archroot.in
+libs = makechrootpkg.sh
+progs = archroot
+clean_files = makechrootpkg.sh.ugly* *~
include ../../common.mk
+
+# Copy ###############################################################
+
+makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in
+ cp $< $@
+
+archroot.in: $(devtoolsdir)/mkarchroot.in
+ cp $< $@
+
+# Build ##############################################################
+
+makechrootpkg.sh.ugly: %.ugly: %.in %.patch Makefile
+ @echo "GEN $@"
+ @cp $*.in $@
+ @patch $@ $*.patch || { rm -f -- '$@'; false; }
+
+makechrootpkg.sh: %: %.ugly Makefile
+ @echo "GEN $@"
+ @$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; }
+ $(call indent,$@) || { rm -f -- '$@'; false; }
+
+archroot: %: %.in Makefile
+ @echo "GEN $@"
+ @$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; }
+ @chmod 755 "$@" || { rm -f -- '$@'; false; }