## In the following dollars and backticks do not need the extra backslash.
$spitshell >>$Makefile <<!GROK!THIS!
-private = preplibrary \$(CONFIGPM) \$(CONFIGPOD) lib/ExtUtils/Miniperl.pm git_version.h lib/buildcustomize.pl
+private = preplibrary \$(CONFIGPM) \$(CONFIGPOD) git_version.h lib/buildcustomize.pl
# Files to be built with variable substitution before miniperl
# is available.
x2p/find2perl: $x2p_deps
cd x2p; \$(LDLIBPTH) \$(MAKE) find2perl
-utilities: $util_deps
+utils/Makefile: \$(MINIPERL_EXE) \$(CONFIGPM) utils/Makefile.PL
+ \$(MINIPERL) -Ilib utils/Makefile.PL
+
+utilities: utils/Makefile $util_deps
@echo " "; echo " Making utilities"; cd utils; \$(LDLIBPTH) \$(MAKE) all
!GROK!THIS!
generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
$(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs)
-perlmain.c: $(MINIPERL_EXE) lib/ExtUtils/Miniperl.pm
- $(MINIPERL) -Ilib -MExtUtils::Miniperl -e 'writemain(@ARGV)' DynaLoader $(static_ext) > perlmain.c
+perlmain.c: $(MINIPERL_EXE) ext/ExtUtils-Miniperl/pm_to_blib
+ $(MINIPERL) -Ilib -MExtUtils::Miniperl -e 'writemain(\"perlmain.c", @ARGV)' DynaLoader $(static_ext)
# The file ext.libs is a list of libraries that must be linked in
# for static extensions, e.g. -lm -lgdbm, etc. The individual
-@rm -f miniperl.xok
$(SHRPENV) $(LDLIBPTH) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-!NO!SUBS!
-
-case "${osname}${osvers}" in
-linux*|darwin*)
- $spitshell >>$Makefile <<'!NO!SUBS!'
-# Valgrind perl (currently Linux, Darwin only)
-
-perl.valgrind.config: config.sh
- @echo "Checking usemymalloc='n' in config.sh..."
- @grep "^usemymalloc=" config.sh
- @grep "^usemymalloc='n'" config.sh >/dev/null || exit 1
- @echo "And of course you have to have valgrind..."
- $(VALGRIND) $(VG_TEST) || exit 1
-!NO!SUBS!
- ;;
-esac
-
-$spitshell >>$Makefile <<'!NO!SUBS!'
-
# Microperl. This is just a convenience thing if one happens to
# build also the full Perl and therefore the real big Makefile:
# usually one should manually explicitly issue the below command.
$(CONFIGPOD): config.sh $(MINIPERL_EXE) configpm Porting/Glossary lib/Config_git.pl
$(MINIPERL) configpm
-lib/ExtUtils/Miniperl.pm: miniperlmain.c $(MINIPERL_EXE) minimod.pl $(CONFIGPM)
- $(MINIPERL) minimod.pl > lib/ExtUtils/Miniperl.pm
-
unidatafiles $(unidatafiles) pod/perluniprops.pod: uni.data
uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
.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)
rm -rf t/tmp*
rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
rm -rf $(addedbyconf)
- rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old
+ rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old utils/Makefile
rm -f $(private)
rm -rf $(unidatafiles) $(unidatadirs)
rm -rf lib/auto
$spitshell >>$Makefile <<'!NO!SUBS!'
# Targets for valgrind testing:
-test_prep.valgrind: test_prep perl.valgrind
-
-test.valgrind check.valgrind: test_prep perl.valgrind.config
+test.valgrind check.valgrind: test_prep
+ @echo "Checking usemymalloc='n' in config.sh..."
+ @grep "^usemymalloc=" config.sh
+ @grep "^usemymalloc='n'" config.sh >/dev/null || exit 1
+ @echo "And of course you have to have valgrind..."
+ $(VALGRIND) $(VG_TEST) || exit 1
PERL_VALGRIND=1 VALGRIND='$(VALGRIND)' $(RUN_TESTS) choose
-
-test_notty.valgrind: test_prep.valgrind perl.valgrind.config
- PERL_VALGRIND=1 $(RUN_TESTS) no-tty
!NO!SUBS!
;;
esac