In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/1927e203ff157957a4c28ff5a935927a92e8b48d?hp=c72cb6ab5d35e3fb80cc6b454c008c01c3064b95>
- Log ----------------------------------------------------------------- commit 1927e203ff157957a4c28ff5a935927a92e8b48d Merge: c72cb6a 3a03112 Author: Nicholas Clark <[email protected]> Date: Sat Jul 13 13:29:38 2013 +0200 Merge the refactoring of the Makefile install targets into blead. commit 3a03112500788fd8a2bf6c86b751b38a450b0e47 Author: Nicholas Clark <[email protected]> Date: Wed Apr 25 22:00:09 2012 +0200 Don't call CPAN to install any "extra" modules for the install-notify target. Previously the Makefile's install-notify target built extra.install just like the other 5 install targets. However, the other 5 actually install perl, whereas install-notify (a.k.a. no-install) runs installperl and installman with the --notify option (formerly -n), to cause them to print what they would do but take no action. Hence if -Dextras was used, make no-install would actually install the extra modules, but nothing else. This is inconsistent. M Makefile.SH commit d618fe714273452c0536fde1f0be7eaa1e7241d3 Author: Nicholas Clark <[email protected]> Date: Wed Apr 25 20:04:08 2012 +0200 Inline the Makefile rule for extra.install into all 6 targets which use it. This eliminates 6 recursive calls from Makefile to itself. As five of these are generated from a loop in Makefile.SH, this isn't massive code duplication. It's not obvious how to merge the sixth without increasing the code complexity. Additionally, if the user has specified extra modules to download and build from CPAN using Configure's -Dextra, this avoids building perl, the non-XS modules and the CPAN modules twice on make install. M Makefile.SH commit 07f58f840247dc1b28a31da1bab0207872fdce2e Author: Nicholas Clark <[email protected]> Date: Wed Apr 25 18:28:39 2012 +0200 Refactor Makefile.SH to generate the install-* targets in a loop. This slightly reduces the line count, merges five-fold duplication into one, and works toward removing 5 recursive calls from Makefile to itself. M Makefile.SH commit 97f2b15752001f1cd927e4b339e45c5d631ba590 Author: Nicholas Clark <[email protected]> Date: Wed Apr 25 18:05:24 2012 +0200 In Makefile.SH, use the long names for options passed to install{perl,man} This makes it clearer what is going on, and enables a simplifying refactoring. M Makefile.SH commit 6784814bae49a9e0f26db3808d8c3e67e688cc57 Author: Nicholas Clark <[email protected]> Date: Tue Apr 24 18:41:47 2012 +0200 Refactor the Makefile so that the install target depends on install-all. Also, add targets install_notify and install-notify, as synonyms for no_install and no-install. Previously install, install-all and install_all were all generated by the same rule. These changes make future refactoring easier. M Makefile.SH ----------------------------------------------------------------------- Summary of changes: Makefile.SH | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Makefile.SH b/Makefile.SH index 46c2620..ef30479 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -1006,27 +1006,31 @@ extras.install: $(PERL_EXE) .PHONY: install install-strip install-all install-verbose install-silent \ no-install install.perl install.man install.html -install_strip install-strip: - $(MAKE) STRIPFLAGS=-s install DESTDIR="$(DESTDIR)" +# Set this to an empty string to avoid an attempt of rebuild before install +INSTALL_DEPENDENCE = all -install install_all install-all: - $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) DESTDIR="$(DESTDIR)" +no_install no-install: install-notify -install_verbose install-verbose: - $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-V DESTDIR="$(DESTDIR)" +install: install-all +!NO!SUBS! -install_silent install-silent: - $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-S DESTDIR="$(DESTDIR)" +for name in all notify silent strip verbose; do + flags="--$name"; + $spitshell >>$Makefile <<EOT -no_install no-install: - $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-n DESTDIR="$(DESTDIR)" +install_$name install-$name: \$(INSTALL_DEPENDENCE) installperl all installman + \$(RUN_PERL) installperl --destdir=\$(DESTDIR) ${flags%--all} \$(INSTALLFLAGS) \$(STRIPFLAGS) + \$(RUN_PERL) installman --destdir=\$(DESTDIR) ${flags%--all} +EOT -# Set this to an empty string to avoid an attempt of rebuild before install -INSTALL_DEPENDENCE = all + test $name = notify || echo ' -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib -MCPAN -e '\''@ARGV&&install(@ARGV)'\'' `cat extras.lst`' >>$Makefile +done + +$spitshell >>$Makefile <<'!NO!SUBS!' install.perl: $(INSTALL_DEPENDENCE) installperl $(RUN_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS) - -@test ! -s extras.lst || $(MAKE) extras.install + -@test ! -s extras.lst || PATH="`pwd`:\${PATH}" PERL5LIB="`pwd`/lib" \$(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst` install.man: all installman $(RUN_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS) -- Perl5 Master Repository
