From 46c4def0733a78ce08702d188e3e1a141fb07316 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 29 Aug 2011 10:53:50 +0200 Subject: Support non-standard install locations This build system overhaul allows for adding (define-style) macros to our scripts. All source files are now suffixed with ".in" to clarify that they might contain unprocessed defines. The Makefile provides a new rule to preprocess source files and generate proper output scripts. Also, add a "@pkgdatadir@" define (as used in GNU Autotools) and use it instead of hardcoded paths to "/usr/share/devtools" everywhere. We missed this when adding PREFIX support to the build system in commit 35fc83ce7d8dc26cd424321f2e8638d05da0a6d4. Signed-off-by: Lukas Fleischer --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6f7a238..47378ff 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,13 @@ ARCHBUILD_LINKS = \ multilib-build \ multilib-testing-build -all: +all: $(BINPROGS) $(SBINPROGS) bash_completion zsh_completion + +%: %.in + @echo "GEN $@" + @sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g" "$<" >"$@" + @chmod a-w "$@" + @chmod +x "$@" install: install -dm0755 $(DESTDIR)$(PREFIX)/bin -- cgit v1.2.3-70-g09d2 From 21daec135add61bf0af74c1277b4f3eeff9cca64 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 29 Aug 2011 10:53:51 +0200 Subject: Makefile: Add a cleanup target Allows for using `make clean` to remove any output files generated by make(1). Signed-off-by: Lukas Fleischer --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 47378ff..9249da6 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,9 @@ all: $(BINPROGS) $(SBINPROGS) bash_completion zsh_completion @chmod a-w "$@" @chmod +x "$@" +clean: + rm -f $(BINPROGS) $(SBINPROGS) bash_completion zsh_completion + install: install -dm0755 $(DESTDIR)$(PREFIX)/bin install -dm0755 $(DESTDIR)$(PREFIX)/sbin @@ -84,4 +87,4 @@ dist: upload: scp devtools-$(V).tar.gz gerolde.archlinux.org:/srv/ftp/other/devtools/ -.PHONY: all install uninstall dist upload +.PHONY: all clean install uninstall dist upload -- cgit v1.2.3-70-g09d2