[pacman-dev] [PATCH 4/5] autotools: be more templated when generating our scripts

Eli Schwartz eschwartz at archlinux.org
Wed Nov 14 02:49:28 UTC 2018


All of these depend on the same pattern .sh.in and more recently, they
all depend on libmakepkg as well. There's no real reason to include
separate targets for them just to establish dependency rules.

Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---

In retrospect, this should always have been done I guess, even if back
in the day, makepkg would have had additional deps on LIBMAKEPKG_IN that
nothing else did.

 scripts/Makefile.am | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index f81b1a49..d6f70ef3 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -169,7 +169,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 $(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 $@
@@ -190,10 +190,6 @@ $(COMPLETION_IN): %: %.in Makefile
 
 all-am: $(COMPLETION_IN)
 
-makepkg: \
-	$(srcdir)/makepkg.sh.in \
-	$(LIBMAKEPKG_IN)
-
 makepkg-template: \
 	$(srcdir)/makepkg-template.pl.in \
 	Makefile
@@ -202,14 +198,6 @@ makepkg-template: \
 	$(AM_V_GEN)$(edit) $< > $@
 	$(AM_V_at)chmod +x,a-w $@
 
-pacman-db-upgrade: $(srcdir)/pacman-db-upgrade.sh.in $(LIBMAKEPKG_IN)
-
-pacman-key: $(srcdir)/pacman-key.sh.in $(LIBMAKEPKG_IN)
-
-pkgdelta: $(srcdir)/pkgdelta.sh.in $(LIBMAKEPKG_IN)
-
-repo-add: $(srcdir)/repo-add.sh.in $(LIBMAKEPKG_IN)
-
 repo-remove: repo-add
 	$(AM_V_at)$(RM) repo-remove
 	$(AM_V_at)$(LN_S) repo-add repo-remove
-- 
2.19.1


More information about the pacman-dev mailing list