In perl.git, the branch smoke-me/Makefile-norecurse has been updated <http://perl5.git.perl.org/perl.git/commitdiff/d84889fca46ae3f4c17202141ebf887ce07914b8?hp=63c6c7fd05a8e3406dd98c1929cf7673253f5b0d>
- Log ----------------------------------------------------------------- commit d84889fca46ae3f4c17202141ebf887ce07914b8 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 eliminates 5 recursive calls from Makefile to itself. M Makefile.SH commit 1dfa5b7491b7b7dc78d30a14267e1f77badd0e88 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 98dfedd034257e4fcb5d99acaae2b26cb19a2837 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 commit c54695d0962b1cdbdfb4174addaf2107ac0dc867 Author: Nicholas Clark <[email protected]> Date: Wed Apr 25 15:48:33 2012 +0200 Add a no-op option --strip to installman. This intentionally does nothing. --strip for installperl instructs it to strip the installed binaries. Hence by permitting installman to accept --strip without error Makefile.SH can be simplified, as it's possible to pass identical flags to both install scripts. M installman ----------------------------------------------------------------------- Summary of changes: Makefile.SH | 27 +++++++++++++++------------ installman | 5 ++++- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Makefile.SH b/Makefile.SH index ba5ab79..d18a510 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -1082,23 +1082,26 @@ 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) + -@test ! -s extras.lst || \$(MAKE) extras.install + \$(RUN_PERL) installman --destdir=\$(DESTDIR) ${flags%--all} +EOT +done -# Set this to an empty string to avoid an attempt of rebuild before install -INSTALL_DEPENDENCE = all +$spitshell >>$Makefile <<'!NO!SUBS!' install.perl: $(INSTALL_DEPENDENCE) installperl $(RUN_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS) diff --git a/installman b/installman index 73cf9e2..59903e4 100755 --- a/installman +++ b/installman @@ -36,9 +36,12 @@ my $usage = --verbose (or -V) report all progress. --silent (or -S) be silent. Only report errors.\n"; +# --strip intentionally does nothing. By permitting installman to accept it +# without error, the Makefile can pass the same options to installperl and +# installman, which permits more simplification there than this comment costs. GetOptions( \%opts, qw( man1dir=s man1ext=s man3dir=s man3ext=s - destdir:s notify|n help|h|? silent|S verbose|V)) + destdir:s notify|n help|h|? silent|S verbose|V strip)) || die $usage; die $usage if $opts{help}; $opts{destdir} //= ''; -- Perl5 Master Repository
