From f3030244f64699021ec0d9cd9e4b4d67244d9df1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 25 Aug 2013 14:18:14 -0400 Subject: Make common-devtools.mk unnecessary. Move devtools chroot stuff into chroot-tools --- src/chroot-tools/Makefile | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'src/chroot-tools/Makefile') 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; } -- cgit v1.2.3-54-g00ecf