diff options
-rw-r--r-- | Makefile.SH | 38 | ||||
-rw-r--r-- | ext/DynaLoader/Makefile.PL | 7 | ||||
-rw-r--r-- | ext/util/make_ext | 1 | ||||
-rw-r--r-- | writemain.SH | 4 |
4 files changed, 30 insertions, 20 deletions
diff --git a/Makefile.SH b/Makefile.SH index 6f99951e57..f61d0db359 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -237,7 +237,7 @@ dynamic_ext = $dynamic_list static_ext = $static_list nonxs_ext = $nonxs_list ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext) -DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT) +DYNALOADER = DynaLoader\$(OBJ_EXT) libs = $perllibs $cryptlib @@ -546,12 +546,12 @@ Makefile: $Makefile_s !GROK!THIS! else $spitshell >>Makefile <<'!NO!SUBS!' -$(LIBPERL): $& $(obj) $(LIBPERLEXPORT) +$(LIBPERL): $& $(obj) $(DYNALOADER) $(LIBPERLEXPORT) !NO!SUBS! case "$useshrplib" in true) $spitshell >>Makefile <<'!NO!SUBS!' - $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(libs) + $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) !NO!SUBS! case "$osname" in aix) @@ -566,7 +566,7 @@ $(LIBPERL): $& $(obj) $(LIBPERLEXPORT) *) $spitshell >>Makefile <<'!NO!SUBS!' rm -f $(LIBPERL) - $(AR) rcu $(LIBPERL) $(obj) + $(AR) rcu $(LIBPERL) $(obj) $(DYNALOADER) @$(ranlib) $(LIBPERL) !NO!SUBS! ;; @@ -617,19 +617,21 @@ NAMESPACEFLAGS = -force_flat_namespace ;; esac $spitshell >>Makefile <<'!NO!SUBS!' -miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT) +miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(obj) opmini$(OBJ_EXT) -@rm -f miniperl.xok $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o miniperl \ - miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs) + `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \ + miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(libs) $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest !NO!SUBS! ;; *) $spitshell >>Makefile <<'!NO!SUBS!' -miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT) +miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(obj) opmini$(OBJ_EXT) -@rm -f miniperl.xok $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl \ - miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs) + `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \ + miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(libs) $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest !NO!SUBS! ;; @@ -637,20 +639,20 @@ miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT) $spitshell >>Makefile <<'!NO!SUBS!' -perl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT) +perl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) -@rm -f miniperl.xok - $(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) # Purify/Quantify Perls. -pureperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT) - $(SHRPENV) $(LDLIBPTH) purify $(CC) -o pureperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) +pureperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) + $(SHRPENV) $(LDLIBPTH) purify $(CC) -o pureperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) -purecovperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT) - $(SHRPENV) $(LDLIBPTH) purecov $(CC) -o purecovperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) +purecovperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) + $(SHRPENV) $(LDLIBPTH) purecov $(CC) -o purecovperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) -quantperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT) - $(SHRPENV) $(LDLIBPTH) quantify $(CC) -o quantperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) +quantperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) + $(SHRPENV) $(LDLIBPTH) quantify $(CC) -o quantperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) # Valgrind perl (currently Linux only) @@ -747,8 +749,8 @@ microperl: # checks as well as the special code to validate that the script in question # has been invoked correctly. -suidperl$(EXE_EXT): $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT) - $(SHRPENV) $(LDLIBPTH) $(CC) -o suidperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) +suidperl$(EXE_EXT): $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) + $(SHRPENV) $(LDLIBPTH) $(CC) -o suidperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) !NO!SUBS! diff --git a/ext/DynaLoader/Makefile.PL b/ext/DynaLoader/Makefile.PL index 30853c68df..f76994ef22 100644 --- a/ext/DynaLoader/Makefile.PL +++ b/ext/DynaLoader/Makefile.PL @@ -32,3 +32,10 @@ test-xs: '; } +sub MY::static { + ' +static :: $(FIRST_MAKEFILE) $(OBJECT) + $(RM_RF) $(PERL_SRC)/$(OBJECT) + $(CP) $(OBJECT) $(PERL_SRC)/$(OBJECT) +'; +} diff --git a/ext/util/make_ext b/ext/util/make_ext index 30d007c279..d90b057b2a 100644 --- a/ext/util/make_ext +++ b/ext/util/make_ext @@ -65,6 +65,7 @@ ext*) # Remove ext/ prefix and /pm_to_blib suffix pname=`echo "$extspec" | sed -e 's:^ext/::' -e 's:/pm_to_blib$::' ` ;; *::*) # Convert :: to / pname=`echo "$extspec" | sed -e 's/::/\//g' ` ;; +*.o) pname=`echo "$extspec" | sed -e 's/\.o//'` ;; *) pname="$extspec" ;; esac # echo "Converted $extspec to $pname" diff --git a/writemain.SH b/writemain.SH index 0b5bd07600..400329f5f1 100644 --- a/writemain.SH +++ b/writemain.SH @@ -39,8 +39,8 @@ args='' : Remove any .a suffixes and any leading path components for file in $orig ; do case "$file" in - *.a) file=`echo $file | sed 's/\.a//g'` - ;; + *.a) file=`echo $file | sed 's/\.a//g'`;; + *.o) file=`echo $file | sed 's/\.o//g'`;; esac case "$file" in ext/*) file=`echo $file | sed 's:ext/\(.*\)/[^/]*:\1:'` |