From: Perl 5 Porters Date: Wed, 10 Jul 1996 23:28:50 +0000 (+0000) Subject: perl 5.003_01: Makefile.SH X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=655635e8461b2c22a9c335034350a74c9f579c98;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_01: Makefile.SH Set shared library version number correctly on NeXT Updates to OS/2 support Correct typo in perl.exp Add universal.c Add configpm dependency to Config.pm Remove chmod from test target -- last modification of source tree --- diff --git a/Makefile.SH b/Makefile.SH index 7eaa4e4..2972373 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -25,19 +25,25 @@ esac shrpenv="" case "$d_shrplib" in *define*) + pldlflags="$cccdlflags" patchlevel=`egrep '^#define[ ]+PATCHLEVEL' patchlevel.h \ | awk '{print $3}'` - case "$patchlevel" in - *[0-9]) plibsuf=.$so.$patchlevel;; - *) plibsuf=.$so;; - esac - if test "x$plibext" != "x" ; then plibsuf=$plibext d_shrplib=custom ; fi - case "$shrpdir" in - /usr/lib) ;; - "") ;; - *) shrpenv="env LD_RUN_PATH=$shrpdir";; - esac - pldlflags="$cccdlflags";; + if test -z "$isnext_4" + then + case "$patchlevel" in + *[0-9]) plibsuf=.$so.$patchlevel;; + *) plibsuf=.$so;; + esac + case "$shrpdir" in + /usr/lib) ;; + "") ;; + *) shrpenv="env LD_RUN_PATH=$shrpdir";; + esac + else + # NeXT uses $patchlevel to set the current version of the dynamic + # library produced later. And the Major release number in the name + plibsuf=.5.$so + fi;; *) plibsuf=$lib_ext pldlflags="";; esac @@ -51,30 +57,23 @@ for f in $dynamic_ext; do done static_list=' ' -static_ai_list=' ' for f in $static_ext; do base=`echo "$f" | sed 's/.*\///'` static_list="$static_list lib/auto/$f/$base\$(LIB_EXT)" - if test -f ext/$f/AutoInit.c; then - static_ai_list="$static_ai_list ext/$f/AutoInit.c" - fi - if test -f ext/$f/AutoInit.pl; then - static_ai_list="$static_ai_list ext/$f/AutoInit.pl" - fi done +: ${bin_sh=/bin/sh} + echo "Extracting Makefile (with variable substitutions)" -$spitshell >Makefile <<'!NO!SUBS!' +rm -f Makefile +$spitshell >Makefile <>Makefile < tmp sh mv-if-diff tmp perlmain.c perlmain$(OBJ_EXT): perlmain.c - $(CCCMD) $(PLDLFLAGS) $*.c + $(CCCMD) $(MAB) $(PLDLFLAGS) $*.c # The file ext.libs is a list of libraries that must be linked in # for static extensions, e.g. -lm -lgdbm, etc. The individual @@ -252,22 +251,35 @@ ext.libs: $(static_ext) -@test -f ext.libs || touch ext.libs perl: $& perlmain$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) ext.libs - $(SHRPENV) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs) + $(SHRPENV) $(CC) $(LARGE) $(MAB) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs) pureperl: $& perlmain$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) ext.libs - purify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs) + purify $(CC) $(LARGE) $(MAB) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs) quantperl: $& perlmain$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) ext.libs - quantify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs) + quantify $(CC) $(LARGE) $(MAB) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs) $(perllib): $& perl$(OBJ_EXT) $(obj) !NO!SUBS! case "$d_shrplib" in *define*) +if test -z "$isnext_4" +then $spitshell >>Makefile <<'!NO!SUBS!' $(LD) $(LDDLFLAGS) -o $@ perl$(OBJ_EXT) $(obj) !NO!SUBS! +else +$spitshell >>Makefile <>Makefile <<'!NO!SUBS!' + libtool -dynamic -undefined warning -framework System \ + -compatibility_version 1 -current_version $$version \ + -prebind -seg1addr 0x27000000 -install_name $(shrpdir)/$@ \ + -o $@ perl.o $(obj) +!NO!SUBS! +fi ;; custom) if test -r $osname/Makefile.SHs ; then @@ -282,11 +294,18 @@ else fi ;; *) +if test -z "$isnext_4" +then $spitshell >>Makefile <<'!NO!SUBS!' rm -f $(perllib) $(AR) rcu $(perllib) perl$(OBJ_EXT) $(obj) @$(ranlib) $(perllib) !NO!SUBS! +else +$spitshell >>Makefile <<'!NO!SUBS!' + libtool -static -o $(perllib) perl.o $(obj) +!NO!SUBS! +fi ;; esac @@ -298,12 +317,12 @@ $spitshell >>Makefile <<'!NO!SUBS!' # has been invoked correctly. suidperl: $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) ext.libs - $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o suidperl perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs) + $(CC) $(LARGE) $(MAB) $(CLDFLAGS) $(CCDLFLAGS) -o suidperl perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs) sperl$(OBJ_EXT): perl.c perly.h patchlevel.h $(h) $(RMS) sperl.c $(LNS) perl.c sperl.c - $(CCCMD) -DIAMSUID sperl.c + $(CCCMD) $(MAB) -DIAMSUID sperl.c $(RMS) sperl.c # We have to call our ./makedir because Ultrix 4.3 make can't handle the line @@ -316,7 +335,7 @@ preplibrary: miniperl lib/Config.pm $(plextract) autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm # Take care to avoid modifying lib/Config.pm without reason -lib/Config.pm: config.sh miniperl +lib/Config.pm: config.sh miniperl configpm ./miniperl configpm tmp sh mv-if-diff tmp lib/Config.pm @@ -349,6 +368,7 @@ run_byacc: FORCE @ echo 'Expect' 130 shift/reduce and 1 reduce/reduce conflict $(BYACC) -d perly.y sh $(shellflags) ./perly.fixer y.tab.c perly.c + sed -e s/stderr/Perl_debug_log/g perly.c >perly.tmp && mv perly.tmp perly.c mv y.tab.h perly.h echo 'extern YYSTYPE yylval;' >>perly.h - perl vms/vms_yfix.pl perly.c perly.h vms/perly_c.vms vms/perly_h.vms @@ -445,7 +465,10 @@ $(FIRSTMAKEFILE): Makefile $(MAKEDEPEND) $(MAKE) depend MAKEDEPEND= config.h: config.sh - /bin/sh config_h.SH + $(SHELL) config_h.SH + +perl.exp: perl_exp.SH config.sh + $(SHELL) perl_exp.SH # When done, touch perlmain.c so that it doesn't get remade each time. depend: makedepend @@ -458,11 +481,9 @@ makedepend: makedepend.SH config.sh sh ./makedepend.SH test: miniperl perl preplibrary $(dynamic_ext) - - cd t && chmod +x TEST */*.t - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../perl$(EXE_EXT) perl$(EXE_EXT)) && ./perl TEST