summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-04-19 18:46:48 +0200
committerDave Reisner <dreisner@archlinux.org>2012-04-24 15:54:06 +0200
commit71fcb69028d6e02bc7f24459918e504d261f86cd (patch)
treed8f34b789062d7b7a1d05d5251ce4960b88fbfab
parentb2a2a982979ecd9b9bcdbf5f1c60d005ed238b60 (diff)
downloadpacman-71fcb69028d6e02bc7f24459918e504d261f86cd.tar.gz
pacman-71fcb69028d6e02bc7f24459918e504d261f86cd.tar.xz
contrib: use a separate build rule for bash scripts
Treat bash scripts separately from the others to allow for a different build rule, which is reused from the scripts/ subdir. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--contrib/Makefile.am17
1 files changed, 14 insertions, 3 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index a3d2d42b..3936e23d 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -4,16 +4,22 @@ AUTOMAKE_OPTIONS = std-options
bin_SCRIPTS = \
$(OURSCRIPTS)
-OURSCRIPTS = \
+BASHSCRIPTS = \
bacman \
paccache \
pacdiff \
paclist \
paclog-pkglist \
pacscripts \
- pacsearch \
pacsysclean
+OTHERSCRIPTS = \
+ pacsearch
+
+OURSCRIPTS = \
+ $(BASHSCRIPTS) \
+ $(OTHERSCRIPTS)
+
OURFILES = \
bash_completion \
zsh_completion
@@ -50,12 +56,17 @@ edit = sed \
-e 's|@SIZECMD[@]|$(SIZECMD)|g' \
-e '1s|!/bin/bash|!$(BASH_SHELL)|g'
-$(OURSCRIPTS): Makefile
+$(OTHERSCRIPTS): Makefile
$(AM_V_at)$(RM) $@ $@.tmp
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
$(AM_V_at)chmod +x,a-w $@.tmp
$(AM_V_at)mv $@.tmp $@
+$(BASHSCRIPTS): Makefile
+ $(AM_V_at)$(RM) $@
+ $(AM_V_GEN)test -f $(srcdir)/$@.in && m4 -P -I $(srcdir) $(srcdir)/$@.in | $(edit) >$@
+ $(AM_V_at)chmod +x,a-w $@
+
$(OURFILES): Makefile
$(AM_V_at)$(RM) $@ $@.tmp
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp