From 71f837e45ea56eb7457759fbb31164f62c10a112 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sat, 3 Nov 2018 20:46:42 -0400 Subject: 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 --- scripts/Makefile.am | 16 ++-------------- 1 file 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 -- cgit v1.2.3-54-g00ecf