summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2018-11-03 20:46:42 -0400
committerAllan McRae <allan@archlinux.org>2018-11-28 11:02:19 +1000
commit71f837e45ea56eb7457759fbb31164f62c10a112 (patch)
treeba6f4ea2343bd0efdc16dad3ca9aebafaa16383b /scripts
parent83a16d30416cd853898e3cbb9dd57d700a85ddb4 (diff)
downloadpacman-71f837e45ea56eb7457759fbb31164f62c10a112.tar.xz
scripts: fix some inaccurate Makefile targets, and be more templated
All of our scripts depend on the same pattern .sh.in, and since commit b5d62d2c91a2caf5c18945921cdf12af6f36b2d4, they also all (not just makepkg itself) depend on libmakepkg. There's no real reason to include separate targets for them just to establish dependency rules. While we are at it, fix a longstanding bug where generated wrapper scripts did not depend on wrapper.sh.in (which due to moving to .lib, requires we regenerate the script too), by making the shared target pattern depend on it. All our generated scripts now require the wrapper, even repo-add which now uses libmakepkg. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am16
1 files changed, 2 insertions, 14 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 35f95c69..e8a3034e 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -186,7 +186,7 @@ edit = sed \
## All the scripts depend on Makefile so that they are rebuilt when the
## prefix etc. changes. Use chmod -w to prevent people from editing the
## wrong file by accident.
-$(OURSCRIPTS): Makefile
+$(OURSCRIPTS): %: %.sh.in wrapper.sh.in $(LIBMAKEPKG_IN) Makefile
$(AM_V_at)$(RM) $@
$(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
$(AM_V_at)chmod +x,a-w $@
@@ -207,11 +207,6 @@ $(COMPLETION_IN): %: %.in Makefile
all-am: $(COMPLETION_IN)
-makepkg: \
- $(srcdir)/makepkg.sh.in \
- $(srcdir)/wrapper.sh.in \
- $(LIBMAKEPKG_IN)
-
makepkg-template: \
$(srcdir)/makepkg-template.pl.in \
Makefile
@@ -220,20 +215,13 @@ makepkg-template: \
$(AM_V_GEN)$(edit) $< > $@
$(AM_V_at)chmod +x,a-w $@
-pacman-db-upgrade: $(srcdir)/pacman-db-upgrade.sh.in
-
-pacman-key: $(srcdir)/pacman-key.sh.in
-
-pkgdelta: $(srcdir)/pkgdelta.sh.in
-
-repo-add: $(srcdir)/repo-add.sh.in
-
repo-remove repo-elephant: repo-add
$(AM_V_at)$(RM) $@
$(AM_V_at)$(LN_S) repo-add $@
.SECONDEXPANSION:
$(WRAPPER): \
+ $(srcdir)/wrapper.sh.in \
$$(subst -wrapper,,$$@)
$(AM_V_at)$(MKDIR_P) .lib