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

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


On 11/13/18 9:49 PM, Eli Schwartz wrote:
> 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

Immediately after sending this, I notice it is based on top of the still
pending "scripts: fix some inaccurate Makefile targets":
https://lists.archlinux.org/pipermail/pacman-dev/2018-November/022918.html

It also completely obsoletes that patch by folding the same
$(LIBMAKEPKG_IN) dependency into one.

-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20181113/639d0613/attachment.asc>


More information about the pacman-dev mailing list