189 lines
6.5 KiB
Diff
189 lines
6.5 KiB
Diff
--- a/Makefile.SH
|
|
+++ b/Makefile.SH
|
|
@@ -373,16 +373,64 @@
|
|
$spitshell >>$Makefile <<!GROK!THIS!
|
|
# Macros to invoke a copy of our fully operational perl during the build.
|
|
PERL_EXE = perl\$(EXE_EXT)
|
|
-RUN_PERL = \$(LDLIBPTH) \$(RUN) $perl\$(EXE_EXT)
|
|
+BUILD_PERL_INC = -Ilib -I. \
|
|
+ -Icpan/AutoLoader/lib \
|
|
+ -Idist/Carp/lib \
|
|
+ -Idist/PathTools \
|
|
+ -Idist/PathTools/lib \
|
|
+ -Icpan/ExtUtils-Install/lib \
|
|
+ -Icpan/ExtUtils-MakeMaker/lib \
|
|
+ -Icpan/ExtUtils-Manifest/lib \
|
|
+ -Icpan/File-Path/lib \
|
|
+ -Iext/re \
|
|
+ -Idist/Term-ReadLine/lib \
|
|
+ -Idist/Exporter/lib \
|
|
+ -Iext/File-Find/lib \
|
|
+ -Icpan/Text-Tabs/lib \
|
|
+ -Idist/constant/lib \
|
|
+ -Icpan/version/lib \
|
|
+ -Icpan/Getopt-Long/lib \
|
|
+ -Icpan/Text-ParseWords/lib \
|
|
+ -Icpan/ExtUtils-PL2Bat/lib \
|
|
+ -Icpan/parent/lib \
|
|
+ -Idist/ExtUtils-ParseXS/lib \
|
|
+ -Idist/base/lib \
|
|
+ -Idist/XSLoader
|
|
+RUN_PERL = \$(LDLIBPTH) \$(RUN) $perl\$(EXE_EXT) \$(BUILD_PERL_INC)
|
|
+RUN_MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) \$(BUILD_PERL_INC)
|
|
!GROK!THIS!
|
|
;;
|
|
*)
|
|
$spitshell >>$Makefile <<!GROK!THIS!
|
|
# Macros to invoke a copy of our fully operational perl during the build.
|
|
PERL_EXE = perl\$(EXE_EXT)
|
|
-RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) -Ilib -I.
|
|
-!GROK!THIS!
|
|
- ;;
|
|
+BUILD_PERL_INC = -Ilib -I. \
|
|
+ -Icpan/AutoLoader/lib \
|
|
+ -Idist/Carp/lib \
|
|
+ -Idist/PathTools \
|
|
+ -Idist/PathTools/lib \
|
|
+ -Icpan/ExtUtils-Install/lib \
|
|
+ -Icpan/ExtUtils-MakeMaker/lib \
|
|
+ -Icpan/ExtUtils-Manifest/lib \
|
|
+ -Icpan/File-Path/lib \
|
|
+ -Iext/re \
|
|
+ -Idist/Term-ReadLine/lib \
|
|
+ -Idist/Exporter/lib \
|
|
+ -Iext/File-Find/lib \
|
|
+ -Icpan/Text-Tabs/lib \
|
|
+ -Idist/constant/lib \
|
|
+ -Icpan/version/lib \
|
|
+ -Icpan/Getopt-Long/lib \
|
|
+ -Icpan/Text-ParseWords/lib \
|
|
+ -Icpan/ExtUtils-PL2Bat/lib \
|
|
+ -Icpan/parent/lib \
|
|
+ -Idist/ExtUtils-ParseXS/lib \
|
|
+ -Idist/base/lib \
|
|
+ -Idist/XSLoader
|
|
+RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) \$(BUILD_PERL_INC)
|
|
+RUN_MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) \$(BUILD_PERL_INC)
|
|
+!GROK!THIS!
|
|
+ ;;
|
|
esac
|
|
|
|
$spitshell >>$Makefile <<!GROK!THIS!
|
|
@@ -706,12 +754,20 @@
|
|
|
|
!NO!SUBS!
|
|
|
|
-# Making utilities requires Cwd. If we have dynamic
|
|
-# loading, we only need miniperl and Cwd.$dlext. If we have static
|
|
-# loading, we need to build perl first.
|
|
+# Making utilities requires Cwd. If we have dynamic loading, we only need
|
|
+# miniperl and the Cwd extension. If we have static loading, we need to
|
|
+# build perl first. Use an explicit helper target for the dynamic case so
|
|
+# makes that do not know how to drive the lib/auto/Cwd output directly still
|
|
+# have a concrete dependency to build.
|
|
case "$usedl$static_cwd" in
|
|
defineundef)
|
|
- util_deps='$(MINIPERL_EXE) $(CONFIGPM) lib/auto/Cwd/Cwd$(DLSUFFIX) FORCE'
|
|
+ util_deps='$(MINIPERL_EXE) $(CONFIGPM) buildext-Cwd FORCE'
|
|
+ $spitshell >>$Makefile <<'!NO!SUBS!'
|
|
+.PHONY: buildext-Cwd
|
|
+buildext-Cwd: $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE $(PERLEXPORT) $(LIBPERL)
|
|
+ $(MINIPERL) make_ext.pl lib/auto/Cwd/Cwd$(DLSUFFIX) $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
|
|
+
|
|
+!NO!SUBS!
|
|
;;
|
|
definedefine)
|
|
util_deps='$(PERL_EXE) $(CONFIGPM) FORCE'
|
|
@@ -820,8 +876,8 @@
|
|
case "$osname" in
|
|
amigaos*)
|
|
$spitshell >>$Makefile <<'!NO!SUBS!'
|
|
-perlmain.c: $(MINIPERL_EXE) ext/ExtUtils-Miniperl/pm_to_blib
|
|
- $(MINIPERL) -MExtUtils::Miniperl -e 'writemain(\\"perlmain.c", @ARGV)' DynaLoader $(static_ext)
|
|
+perlmain.c: $(MINIPERL_EXE) $(CONFIGPM) ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
|
|
+ $(MINIPERL) -Iext/ExtUtils-Miniperl/lib -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
|
|
@@ -829,18 +885,24 @@
|
|
ext.libs: $(static_ext)
|
|
-@test -f ext.libs || touch ext.libs
|
|
|
|
+dist/XSLoader/XSLoader.pm: $(MINIPERL_EXE) $(CONFIGPM) dist/XSLoader/XSLoader_pm.PL
|
|
+ cd dist/XSLoader && ../../$(MINIPERL_EXE) -I../../lib XSLoader_pm.PL
|
|
+
|
|
!NO!SUBS!
|
|
;;
|
|
*)
|
|
$spitshell >>$Makefile <<'!NO!SUBS!'
|
|
-perlmain.c: $(MINIPERL_EXE) ext/ExtUtils-Miniperl/pm_to_blib
|
|
- $(MINIPERL) -MExtUtils::Miniperl -e 'writemain(\"perlmain.c", @ARGV)' DynaLoader $(static_ext)
|
|
+perlmain.c: $(MINIPERL_EXE) $(CONFIGPM) ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
|
|
+ $(MINIPERL) -Iext/ExtUtils-Miniperl/lib -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
|
|
# static extension Makefile's add to it.
|
|
ext.libs: $(static_ext)
|
|
-@test -f ext.libs || touch ext.libs
|
|
+
|
|
+dist/XSLoader/XSLoader.pm: $(MINIPERL_EXE) $(CONFIGPM) dist/XSLoader/XSLoader_pm.PL
|
|
+ cd dist/XSLoader && ../../$(MINIPERL_EXE) -I../../lib XSLoader_pm.PL
|
|
|
|
!NO!SUBS!
|
|
;;
|
|
@@ -1130,11 +1192,12 @@
|
|
# can in this makefile to decide if needs to run or not
|
|
# touch uni.data
|
|
|
|
-# $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5
|
|
-# But also this ensures that all extensions are built before we try to scan
|
|
+# Build this with miniperl plus the same expanded \@INC as RUN_PERL so
|
|
+# File::Spec can load PathTools without needing the XS Cwd extension.
|
|
+# $(ext) still ensures that all extensions are built before we try to scan
|
|
# them, which picks up Devel::PPPort's documentation.
|
|
-pod/perltoc.pod: $(perltoc_pod_prereqs) $(PERL_EXE) $(ext) pod/buildtoc
|
|
- $(RUN_PERL) -f pod/buildtoc -q
|
|
+pod/perltoc.pod: $(perltoc_pod_prereqs) $(MINIPERL_EXE) $(ext) pod/buildtoc
|
|
+ $(RUN_MINIPERL) -f pod/buildtoc -q
|
|
|
|
pod/perlapi.pod: pod/perlintern.pod
|
|
|
|
@@ -1300,11 +1363,11 @@
|
|
.PHONY: manisort manicheck
|
|
|
|
manisort: FORCE
|
|
- @perl Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
|
|
- perl Porting/manisort -q -o MANIFEST; sh -c true)
|
|
+ @$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
|
|
+ $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true)
|
|
|
|
manicheck: FORCE
|
|
- perl Porting/manicheck
|
|
+ $(RUN_PERL) Porting/manicheck
|
|
|
|
# Extensions:
|
|
# Names added to $(dynamic_ext) or $(static_ext) or $(nonxs_ext) will
|
|
--- a/write_buildcustomize.pl
|
|
+++ b/write_buildcustomize.pl
|
|
@@ -47,15 +47,16 @@
|
|
cpan/Getopt-Long/lib
|
|
cpan/Text-ParseWords/lib
|
|
cpan/ExtUtils-PL2Bat/lib
|
|
+ cpan/parent/lib
|
|
+ dist/ExtUtils-ParseXS/lib
|
|
+ dist/base/lib
|
|
+ dist/XSLoader
|
|
);
|
|
|
|
# These are for XS building on Win32, since nonxs and xs build simultaneously
|
|
# on Win32 if parallel building
|
|
push @toolchain, qw(
|
|
- dist/ExtUtils-ParseXS/lib
|
|
- cpan/parent/lib
|
|
cpan/ExtUtils-Constant/lib
|
|
- dist/base/lib
|
|
) if $^O eq 'MSWin32';
|
|
push @toolchain, 'ext/VMS-Filespec/lib' if $^O eq 'VMS';
|
|
|