X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.SH;h=81b01368a9ce45f38bbdf4dd515f81a316418dce;hb=5bd07a3d26012a115fab327912ac8788755e1251;hp=6680a593fc7c688cccf90db0d36b88298217a3fb;hpb=9fec149bb652b6e9b0ac53649e1e535bc4e27d66;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Makefile.SH b/Makefile.SH index 6680a59..81b0136 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -26,6 +26,7 @@ esac linklibperl='$(LIBPERL)' shrpldflags='$(LDDLFLAGS)' ldlibpth='' +DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB' case "$useshrplib" in true) # Prefix all runs of 'miniperl' and 'perl' with @@ -76,6 +77,11 @@ true) hpux*) linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+s -Wl,+b$archlibexp/CORE -lperl" ;; + os390*) + shrpldflags='-W l,dll' + linklibperl='libperl.x' + DPERL_EXTERNAL_GLOB='' + ;; esac case "$ldlibpthname" in '') ;; @@ -137,6 +143,7 @@ CLDFLAGS = $ldflags mallocsrc = $mallocsrc mallocobj = $mallocobj LNS = $lns +CPS = $cp -f RMS = rm -f ranlib = $ranlib @@ -299,13 +306,21 @@ utilities: miniperl lib/Config.pm $(plextract) lib/lib.pm FORCE # Apparently some makes require an action for the FORCE target. FORCE: @sh -c true +!NO!SUBS! +$spitshell >>Makefile <>Makefile <<'!NO!SUBS!' miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h $(CCCMD) $(PLDLFLAGS) $*.c @@ -324,14 +339,6 @@ ext.libs: $(static_ext) !NO!SUBS! -# if test -f .patch ; then $spitshell >>Makefile <<'!NO!SUBS!' -# patchlevel.h: .patch -# perl fix_pl || (make -f Makefile.micro && ./microperl fix_pl) -# $(SHELL) Makefile.SH -# fi -# -# !NO!SUBS! - # How to build libperl. This is still rather convoluted. # Load up custom Makefile.SH fragment for shared loading and executables: case "$osname" in @@ -413,7 +420,7 @@ $(LIBPERL): $& perl$(OBJ_EXT) $(obj) $(LIBPERLEXPORT) case "$useshrplib" in true) $spitshell >>Makefile <<'!NO!SUBS!' - $(LD) $(SHRPLDFLAGS) -o $@ perl$(OBJ_EXT) $(obj) + $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) !NO!SUBS! case "$osname" in aix) @@ -478,16 +485,16 @@ miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT) $spitshell >>Makefile <<'!NO!SUBS!' perl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT) - $(SHRPENV) $(LDLIBPTH) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(LDLIBPTH) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) pureperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT) - $(SHRPENV) $(LDLIBPTH) purify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(LDLIBPTH) purify $(CC) -o pureperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) purecovperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT) - $(SHRPENV) $(LDLIBPTH) purecov $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o purecovperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(LDLIBPTH) purecov $(CC) -o purecovperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT) - $(SHRPENV) $(LDLIBPTH) quantify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(LDLIBPTH) quantify $(CC) -o quantperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) # This version, if specified in Configure, does ONLY those scripts which need # set-id emulation. Suidperl must be setuid root. It contains the "taint" @@ -495,7 +502,7 @@ quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs # has been invoked correctly. suidperl: $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT) - $(SHRPENV) $(LDLIBPTH) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o suidperl perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(LDLIBPTH) $(CC) -o suidperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) !NO!SUBS! @@ -503,7 +510,7 @@ fi $spitshell >>Makefile <<'!NO!SUBS!' -sperl$(OBJ_EXT): perl.c perly.h patchlevel.h $(h) +sperl$(OBJ_EXT): perl.c $(h) $(RMS) sperl.c $(LNS) perl.c sperl.c $(CCCMD) -DIAMSUID sperl.c @@ -600,7 +607,7 @@ install.html: all installhtml run_byacc: FORCE $(BYACC) -d perly.y - -chmod 664 perly.c + -chmod 664 perly.c perly.h sh $(shellflags) ./perly.fixer y.tab.c perly.c sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' \ -e 's/y\.tab/perly/g' perly.c >perly.tmp && mv perly.tmp perly.c @@ -650,10 +657,17 @@ CHMOD_W = chmod +w keywords.h: keywords.pl -perl keywords.pl -opcode.h opnames.h pp_proto.h pp.sym: opcode.pl +OPCODE_PL_OUTPUT = opcode.h opnames.h pp_proto.h pp.sym + +$(OPCODE_PL_OUTPUT): opcode.pl -perl opcode.pl -proto.h embed.h embedvar.h global.sym objXSUB.h perlapi.h perlapi.c pod/perlintern.pod pod/perlapi.pod: embed.pl pp.sym +# Really the prerequisites for the next rule should only be "embed.pl pp.sym" +# Writing it this way gives make a big hint to always run opcode.pl before +# embed.pl. The alternative - running embed.pl then opcode.pl causes embed.pl +# to be re-run next make invocation, and then all object files get recompiled. + +proto.h embed.h embedvar.h global.sym objXSUB.h perlapi.h perlapi.c pod/perlintern.pod pod/perlapi.pod: embed.pl $(OPCODE_PL_OUTPUT) -perl embed.pl ext/ByteLoader/byterun.h ext/ByteLoader/byterun.c ext/B/B/Asmdata.pm: bytecode.pl @@ -759,11 +773,11 @@ _cleaner2: rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old rm -f $(private) rm -rf lib/auto - rm -f lib/.exists lib/*/.exists + rm -f lib/.exists lib/*/.exists lib/*/*/.exists rm -f h2ph.man pstruct rm -rf .config rm -f testcompile compilelog - -rmdir lib/B lib/Data lib/Encode lib/IO/Socket lib/IO lib/Sys lib/Thread + -rmdir lib/B lib/Data lib/Encode lib/IO/Socket lib/IO lib/Filter/Util lib/Sys lib/Thread _realcleaner: @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=realclean @@ -779,7 +793,7 @@ _verycleaner: # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message # for that spot. -lint: perly.c $(c) +lint: $(c) lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz # Need to unset during recursion to go out of loop. @@ -848,12 +862,24 @@ ok: utilities okfile: utilities $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok +oknack: utilities + $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -A + +okfilenack: utilities + $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A + nok: utilities $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' nokfile: utilities $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok +noknack: utilities + $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -A + +nokfilenack: utilities + $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A + clist: $(c) echo $(c) | tr ' ' $(TRNL) >.clist