summaryrefslogtreecommitdiff
path: root/Makefile.SH
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-09-29 08:03:31 +0000
committerNicholas Clark <nick@ccl4.org>2021-09-29 08:24:25 +0000
commit8f194132568163e2753e1878f7c8a0aa8a5f25a3 (patch)
tree6460a5a85217e85238b035a402898f947ec8bb91 /Makefile.SH
parentf48aa24d4a3e93ace72b85f2af901c136ea3a77a (diff)
downloadperl-8f194132568163e2753e1878f7c8a0aa8a5f25a3.tar.gz
The Makefile must run makedef.pl with -Ilib on the command line
It can't rely on adding 'lib' to @INC in a BEGIN block because during the build not all modules *are* in lib yet. For miniperl the two are not equivalent - adding -Ilib means that lib/buildcustomize.pl is run, and this sets up @INC properly to include all the toolchain modules in dist and cpan. In particular, constant is dual life and hence not available as lib/constant.pm until it has been copied from dist/constant/lib as part of the build process. Hence with a parallel build on AIX, before this commit there was a race condition between the job that builds dist/constant and the job that builds perl.exp. Sometimes the race was lost, resulting in a mysterious failed build. All other users of makedef.pl already invoke it with the appropriate -Ilib or -I..\lib, so this change won't affect them.
Diffstat (limited to 'Makefile.SH')
-rwxr-xr-xMakefile.SH4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.SH b/Makefile.SH
index 47119ebcc4..df2436ff82 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -847,7 +847,7 @@ PERLEXPORT = perl.exp
esac
$spitshell >>$Makefile <<'!NO!SUBS!'
perl.exp: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH)
- $(MINIPERL) makedef.pl --sort-fold PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" > perl.exp
+ ./$(MINIPERLEXP) -Ilib makedef.pl --sort-fold PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" > perl.exp
!NO!SUBS!
;;
@@ -856,7 +856,7 @@ os2)
MINIPERLEXP = miniperl
perl5.def: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH) miniperl.map
- $(MINIPERL) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def
+ ./$(MINIPERLEXP) -Ilib makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def
!NO!SUBS!
;;