summaryrefslogtreecommitdiff
path: root/os2/Makefile.SHs
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-10-04 22:37:43 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-10-06 04:01:55 +0000
commit017f25f12cde7f2349c4feace654ff43ec0681aa (patch)
treee63387ee76dc2935ff9ce98d6527205ee4fc782b /os2/Makefile.SHs
parent2eecd61590cdae0bfd61080e79b0196640ecd60a (diff)
downloadperl-017f25f12cde7f2349c4feace654ff43ec0681aa.tar.gz
Cumulative OS/2-related patch
Message-Id: <199810050637.CAA07781@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@1930
Diffstat (limited to 'os2/Makefile.SHs')
-rw-r--r--os2/Makefile.SHs63
1 files changed, 48 insertions, 15 deletions
diff --git a/os2/Makefile.SHs b/os2/Makefile.SHs
index 8223818133..aaeed530c2 100644
--- a/os2/Makefile.SHs
+++ b/os2/Makefile.SHs
@@ -8,11 +8,12 @@
perl_version="5.00${PATCHLEVEL}_$SUBVERSION"
case "$archname" in
- *-thread) dll_post=_thr
- perl_version="${perl_version}-threaded";;
- *) dll_post='' ;;
+ *-thread*) perl_version="${perl_version}-threaded";;
esac
+dll_post="`echo $perl_version | sum | awk '{print $1}'`"
+dll_post="`printf '%x' $dll_post | tr '[a-z]' '[A-Z]'`"
+
$spitshell >>Makefile <<!GROK!THIS!
PERL_VERSION = $perl_version
@@ -33,6 +34,7 @@ LD_OPT = $optimize
PERL_DLL_BASE = perl$dll_post
PERL_DLL = \$(PERL_DLL_BASE)\$(DLSUFFIX)
+CONFIG_ARGS = $config_args
!GROK!THIS!
@@ -50,12 +52,14 @@ perl.imp: perl5.def
echo 'emx_malloc emxlibcm 402 ?' >> $@
echo 'emx_realloc emxlibcm 403 ?' >> $@
+perl_dll: $(PERL_DLL)
+
$(PERL_DLL): $(obj) perl5.def perl$(OBJ_EXT)
$(LD) $(LD_OPT) $(LDDLFLAGS) -o $@ perl$(OBJ_EXT) $(obj) $(libs) perl5.def
perl5.def: perl.linkexp
echo "LIBRARY '$(PERL_DLL_BASE)' INITINSTANCE TERMINSTANCE" > $@
- echo DESCRIPTION "'Perl interpreter v$(PERL_VERSION), export autogenerated'" >>$@
+ echo DESCRIPTION "'Perl interpreter v$(PERL_VERSION), export autogenerated, built with $(CONFIG_ARGS)'" >>$@
echo STACKSIZE 32768 >>$@
echo CODE LOADONCALL >>$@
echo DATA LOADONCALL NONSHARED MULTIPLE >>$@
@@ -160,8 +164,8 @@ aout_perlmain.c: miniperlmain.c config.sh makefile $(static_ext_autoinit)
sh writemain $(DYNALOADER) $(aout_static_lib) > tmp
sh mv-if-diff tmp aout_perlmain.c
-miniperl_: $& miniperlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) ext.libs
- $(CC) $(LARGE) $(AOUT_CLDFLAGS) $(CCDLFLAGS) -o miniperl_ miniperlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) `cat ext.libs` $(libs)
+miniperl_: $& miniperlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL)
+ $(CC) $(LARGE) $(AOUT_CLDFLAGS) $(CCDLFLAGS) -o miniperl_ miniperlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) $(libs)
perl_: $& aout_perlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) $(AOUT_DYNALOADER) $(aout_static_ext) ext.libs
$(CC) $(LARGE) $(AOUT_CLDFLAGS) $(CCDLFLAGS) -o perl_ aout_perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER) $(aout_static_ext) $(AOUT_LIBPERL) `cat ext.libs` $(libs)
@@ -197,18 +201,47 @@ sys_test: perl_sys
sys_harness: perl_sys
- cd t && (rm -f perl_$(EXE_EXT); $(LNS) ../perl_sys$(EXE_EXT) perl$(EXE_EXT)) && env HARNESS_BAD_EXITCODE=2 ./perl harness </dev/tty
-lib/auto/OS2/*/%.a : ext/OS2/%/Makefile.aout
- cd ext/OS2/$(basename $(notdir $@)) ; make -f Makefile.aout config || echo "$make config failed, continuing anyway..."
- cd ext/OS2/$(basename $(notdir $@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
+!NO!SUBS!
-lib/auto/*/%.a : ext/%/Makefile.aout
- cd ext/$(basename $(notdir $@)) ; make -f Makefile.aout config || echo "$make config failed, continuing anyway..."
- cd ext/$(basename $(notdir $@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
+# Now we need to find directories in ./ext/ which are two level deep
+
+dirs=''
+preci='ext/%/Makefile.aout '
+for d in ext/*
+do
+ # echo "Checking '$d'..."
+ f="`echo $d/*/Makefile.PL`"
+ # SDBFile/sdbm, skip kid makefile
+ if test ! -e "$d/Makefile.PL" -a ! "$f" = ""; then
+ dirs="$dirs $d"
+ preci="$preci $d/%/Makefile.aout"
+ fi
+done
+
+$spitshell >>Makefile <<!GROK!THIS!
+.PRECIOUS : $preci
+
+!GROK!THIS!
+
+for d in $dirs
+do
+ p=`basename $d`
+ $spitshell >>Makefile <<!GROK!THIS!
+lib/auto/$p/*/%.a : ext/$p/%/Makefile.aout
+ @cd ext/$p/\$(basename \$(notdir \$@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
+ cd ext/$p/\$(basename \$(notdir \$@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
+
+$d/%/Makefile.aout : miniperl_
+ cd \$(dir \$@) ; ../../../miniperl_ -I ../../../lib Makefile.PL MAKEFILE=Makefile.aout INSTALLDIRS=perl
+
+!GROK!THIS!
-.PRECIOUS : ext/%/Makefile.aout ext/OS2/%/Makefile.aout
+done
-ext/OS2/%/Makefile.aout : miniperl_
- cd $(dir $@) ; ../../../miniperl_ -I ../../../lib Makefile.PL MAKEFILE=Makefile.aout INSTALLDIRS=perl
+$spitshell >>Makefile <<'!NO!SUBS!'
+lib/auto/*/%.a : ext/%/Makefile.aout
+ @cd ext/$(basename $(notdir $@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
+ cd ext/$(basename $(notdir $@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
ext/%/Makefile.aout : miniperl_
cd $(dir $@) ; ../../miniperl_ -I ../../lib Makefile.PL MAKEFILE=Makefile.aout INSTALLDIRS=perl