summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-20 16:27:41 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-20 16:27:41 -0400
commit089c60a05e95bee1ab3c506069f8e0e75eb43657 (patch)
tree186245d8ac5dc1ea64ebb37b8e77a045953cc391 /src
parent8cbd5fc2e616785d97e84f7e17b845b74a6ccfd1 (diff)
Generalize the patching mechanism in the build system.
Diffstat (limited to 'src')
-rw-r--r--src/chroot-tools/.gitignore3
-rw-r--r--src/chroot-tools/Makefile24
-rw-r--r--src/devtools/.gitignore1
3 files changed, 3 insertions, 25 deletions
diff --git a/src/chroot-tools/.gitignore b/src/chroot-tools/.gitignore
index 80e1000..3f46ed2 100644
--- a/src/chroot-tools/.gitignore
+++ b/src/chroot-tools/.gitignore
@@ -1,5 +1,4 @@
makechrootpkg.sh*
-!makechrootpkg.sh.patch
-
arch-nspawn*
mkarchroot*
+!*.patch
diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile
index 97ca688..c49c4ac 100644
--- a/src/chroot-tools/Makefile
+++ b/src/chroot-tools/Makefile
@@ -9,37 +9,15 @@ libs = makechrootpkg.sh $(wildcard hooks-*.sh)
pots = $(libexecs) $(libs)
pkglibexecdir = $(libexecdir)/libretools/chroot
-clean_files = makechrootpkg.sh.ugly* *~
include ../../common.mk
-# Usage: $(call indent,FILENAME)
-# Command to auto-indent a file.
-indent = emacs --batch $1 \
- --eval '(setq sh-basic-offset 8)' \
- --eval '(indent-region (point-min) (point-max) nil)' \
- -f save-buffer &>/dev/null
-
-# makechrootpkg.sh is special, we patch it and do fancy stuff
-# The flow is:
-# $(devtoolsdir)/*.in -> *.sh.in + *.sh.patch -> *.sh.ugly -> *.sh
-
+# makechrootpkg.sh is created from a command, not a library
makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in
cp $< $@
-makechrootpkg.sh.ugly: %.ugly: %.in %.patch Makefile
- cp $*.in $@
- @echo 'PATCH $@ $*.patch'; patch $@ $*.patch
-makechrootpkg.sh: %: %.ugly Makefile
- @echo 'EDIT < $< > $@'; $(edit) <'$<' >'$@'
- @echo 'INDENT $@'; $(call indent,$@)
mkarchroot: mkarchroot.in Makefile
@echo '< $< M4_EDIT | SED > $@'
@<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@'
@echo 'CHMOD $<'; chmod 755 "$@"
-archroot: %: %.in Makefile
- @echo "GEN $@"
- @$(edit) <"$<" >"$@"
- @chmod 755 "$@"
-
distcc-tool.pot: xgettext-keywords-sh+=--keyword=errusage
diff --git a/src/devtools/.gitignore b/src/devtools/.gitignore
index 097fcde..d669bbd 100644
--- a/src/devtools/.gitignore
+++ b/src/devtools/.gitignore
@@ -1,3 +1,4 @@
*
!Makefile
!.gitignore
+!*.patch