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>
This commit is contained in:
parent
b2a2a98297
commit
71fcb69028
1 changed files with 14 additions and 3 deletions
|
@ -4,16 +4,22 @@ AUTOMAKE_OPTIONS = std-options
|
||||||
bin_SCRIPTS = \
|
bin_SCRIPTS = \
|
||||||
$(OURSCRIPTS)
|
$(OURSCRIPTS)
|
||||||
|
|
||||||
OURSCRIPTS = \
|
BASHSCRIPTS = \
|
||||||
bacman \
|
bacman \
|
||||||
paccache \
|
paccache \
|
||||||
pacdiff \
|
pacdiff \
|
||||||
paclist \
|
paclist \
|
||||||
paclog-pkglist \
|
paclog-pkglist \
|
||||||
pacscripts \
|
pacscripts \
|
||||||
pacsearch \
|
|
||||||
pacsysclean
|
pacsysclean
|
||||||
|
|
||||||
|
OTHERSCRIPTS = \
|
||||||
|
pacsearch
|
||||||
|
|
||||||
|
OURSCRIPTS = \
|
||||||
|
$(BASHSCRIPTS) \
|
||||||
|
$(OTHERSCRIPTS)
|
||||||
|
|
||||||
OURFILES = \
|
OURFILES = \
|
||||||
bash_completion \
|
bash_completion \
|
||||||
zsh_completion
|
zsh_completion
|
||||||
|
@ -50,12 +56,17 @@ edit = sed \
|
||||||
-e 's|@SIZECMD[@]|$(SIZECMD)|g' \
|
-e 's|@SIZECMD[@]|$(SIZECMD)|g' \
|
||||||
-e '1s|!/bin/bash|!$(BASH_SHELL)|g'
|
-e '1s|!/bin/bash|!$(BASH_SHELL)|g'
|
||||||
|
|
||||||
$(OURSCRIPTS): Makefile
|
$(OTHERSCRIPTS): Makefile
|
||||||
$(AM_V_at)$(RM) $@ $@.tmp
|
$(AM_V_at)$(RM) $@ $@.tmp
|
||||||
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
|
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
|
||||||
$(AM_V_at)chmod +x,a-w $@.tmp
|
$(AM_V_at)chmod +x,a-w $@.tmp
|
||||||
$(AM_V_at)mv $@.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
|
$(OURFILES): Makefile
|
||||||
$(AM_V_at)$(RM) $@ $@.tmp
|
$(AM_V_at)$(RM) $@ $@.tmp
|
||||||
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
|
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
|
||||||
|
|
Loading…
Add table
Reference in a new issue