Changeset 3220 for trunk


Ignore:
Timestamp:
Apr 29, 2007, 3:34:20 PM (18 years ago)
Author:
bird
Message:

Build a.out and link omf. Drop -Zexe.

Location:
trunk/essentials/dev-lang/perl
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/essentials/dev-lang/perl/Configure

    r3190 r3220  
    71327132        elif $test -f /lib64/rld; then
    71337133                nm_opt='-p'     # 64-bit Irix
     7134        elif $test "X$osname" = "os2"; then
     7135                nm_opt='-pa'    # OS/2 - must include the aliases
    71347136        else
    71357137                nm_opt=''
     
    72977299echo " "
    72987300$echo $n "This may take a while...$c" >&4
     7301$echo $n "(dbg: running $nm $nm_opt on $*)" >&4
    72997302
    73007303for file in $*; do
     
    73117314xxx='[ADTSIW]'
    73127315if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx  *//p'";\
     7316        eval $xscan;\
     7317        $contains '^fprintf$' libc.list >/dev/null 2>&1; then
     7318                eval $xrun
     7319elif test "X$osname" = "Xos2" && com="$sed -n -e 's/^.* [ADTSIWe]  *_//p' -e 's/^_std_//' -e 's/^.* [ADTSIWe]  *//p'";\
    73137320        eval $xscan;\
    73147321        $contains '^fprintf$' libc.list >/dev/null 2>&1; then
     
    73867393                        echo "Ok." >&4
    73877394                elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
     7395                        if test "$ar" = "ar"; then
     7396                                $echo $n "ar doesn't do the trick, sorry. giving up." >&4
     7397                        fi
    73887398                        # Repeat libc to extract forwarders to DLL entries too
    73897399                        for thisname in $libnames $libc; do
  • trunk/essentials/dev-lang/perl/Makefile.SH

    r3192 r3220  
    529529os2)
    530530        $spitshell >>Makefile <<'!NO!SUBS!'
    531 MINIPERLEXP             = miniperl
     531MINIPERLEXP             = miniperl$(EXE_EXT)
    532532
    533533perl5.def: $(MINIPERLEXP) makedef.pl config.sh $(SYM) $(SYMH) miniperl.map
  • trunk/essentials/dev-lang/perl/Makefile.kmk

    r3219 r3220  
    4242        +$(GMAKE) MAKE=$(GMAKE) test
    4343
    44 
  • trunk/essentials/dev-lang/perl/ext/Time/HiRes/Makefile.PL

    r3181 r3220  
    2121
    2222my $ld_exeext = ($^O eq 'cygwin' ||
    23                  $^O eq 'os2' && $Config{ldflags} =~ /-Zexe\b/) ? '.exe' : '';
     23                 $^O eq 'os2') ? '.exe' : '';
    2424
    2525unless($ENV{PERL_CORE}) {
  • trunk/essentials/dev-lang/perl/hints/os2.sh

    r3197 r3220  
    1111# Note that symbol extraction code gives wrong answers (sometimes?) on
    1212# gethostent and setsid.
    13 
    14 # Optimization (GNU make 3.74 cannot be loaded :-():
    15 emxload -m 30 sh.exe ls.exe tr.exe id.exe sed.exe # make.exe
    16 emxload -m 30 grep.exe egrep.exe fgrep.exe cat.exe rm.exe mv.exe cp.exe
    17 emxload -m 30 uniq.exe basename.exe sort.exe awk.exe echo.exe
    1813
    1914path_sep=\;
     
    10398libpth="$libpth $libemx"
    10499
    105 #set `cmd /c emxrev -f emxlibcm`
    106 #emxcrtrev=$5
    107 # indented to not put it into config.sh
    108   #_defemxcrtrev=-D_EMX_CRT_REV_=$emxcrtrev
    109   _defemxcrtrev=-D_EMX_CRT_REV_=61
    110 
    111100so='dll'
    112101
     
    135124fflushNULL="define"
    136125
    137 aout_d_shrplib='undef'
    138 aout_useshrplib='false'
    139 aout_obj_ext='.o'
    140 aout_lib_ext='.a'
    141 aout_ar='ar'
    142 aout_plibext='.a'
    143 aout_lddlflags="-Zdll $ld_dll_optimize"
    144 
    145 # Cannot have 32000K stack: get SYS0170  ?!
    146 aout_ldflags='-Zexe -Zstack 16000 '
    147 
    148 # To get into config.sh:
    149 aout_ldflags="$aout_ldflags"
    150 
    151 aout_d_fork='define'
    152 aout_ccflags="-DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev "
    153 aout_cppflags="-DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev "
    154 aout_use_clib='libc_dll'
    155 aout_usedl='undef'
    156 aout_archobjs="os2.o dl_os2.o"
    157 # Not listed in dynamic_ext, but needed for AOUT static_ext nevertheless
    158 aout_extra_static_ext="OS2::DLL"
    159 
    160 # variable which have different values for aout compile
    161 used_aout='d_shrplib useshrplib plibext lib_ext obj_ext ar plibext d_fork lddlflags ldflags ccflags use_clib usedl archobjs cppflags'
    162 
    163 if [ "$emxaout" != "" ]; then
    164     d_shrplib="$aout_d_shrplib"
    165     useshrplib="$aout_useshrplib"
    166     obj_ext="$aout_obj_ext"
    167     lib_ext="$aout_lib_ext"
    168     ar="$aout_ar"
    169     plibext="$aout_plibext"
    170     d_fork='define'
    171     lddlflags="$aout_lddlflags"
    172     ldflags="$aout_ldflags"
    173     ccflags="$aout_ccflags"
    174     cppflags="$aout_cppflags"
    175     use_clib="$aout_use_clib"
    176     usedl="$aout_usedl"
    177 else
    178     d_shrplib='define'
    179     useshrplib='true'
    180     obj_ext='.o'
    181     lib_ext='.lib'
    182     ar='emxomfar'
    183     plibext='.lib'
    184     d_fork='define'
    185     lddlflags="-Zdll -Zomf "
    186     # Recursive regmatch may eat 2.5M of stack alone.
    187     ldflags='-Zexe -Zomf -Zstack 32000 '
    188     ccflags="-Zomf -DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev"
    189     use_clib='libc_dll'
    190     usedl='define'
    191 fi
     126# Not listed in dynamic_ext, but needed for static_ext nevertheless
     127extra_static_ext="OS2::DLL"
     128
     129d_shrplib='define'
     130useshrplib='true'
     131obj_ext='.o'
     132lib_ext='.a'
     133ar='ar'
     134plibext='.a'
     135d_fork='define'
     136lddlflags="-Zdll -Zomf "
     137# Recursive regmatch may eat 2.5M of stack alone.
     138ldflags='-Zomf -Zhigh-mem -Zstack 32000 '
     139ccflags="-DDOSISH -DOS2=2 -DEMBED -I."
     140use_clib='libc_dll'
     141usedl='define'
     142
    192143
    193144# indented to miss config.sh
     
    261212lns='cp'
    262213
    263 nm_opt='-p'
     214nm_opt='-pa'
    264215
    265216####### We define these functions ourselves
     
    424375case "$usethreads" in
    425376$define|true|[yY]*)
    426         ccflags="$ccflags"
    427         cppflags="$cppflags"  # Do we really need to set this?
    428         aout_ccflags="-DUSE_THREADS $aout_ccflags"
    429         aout_cppflags="-DUSE_THREADS $aout_cppflags"
    430         aout_lddlflags="$aout_lddlflags"
    431         aout_ldflags="$aout_ldflags"
     377        ccflags="$ccflags -DUSE_THREADS"
     378        cppflags="$cppflags -DUSE_THREADS"  # Do we really need to set this?
    432379        ;;
    433380esac
  • trunk/essentials/dev-lang/perl/os2/Makefile.SHs

    r3200 r3220  
    44# Rerun `sh Makefile.SH; make depend' after making any change.
    55
    6 # Additional rules supported: perl_, aout_test, aout_install, use them
    7 # for a.out style perl (which may fork).
     6# Additional rules supported: perl_
    87
    98perl_fullversion="5.00${PERL_VERSION}_$PERL_SUBVERSION"
     
    1413dll_post="`echo $perl_fullversion | sum | sed -e 's/^0*//' | awk '{print $1}'`"
    1514dll_post="`printf '%x' $dll_post | tr '[a-z]' '[A-Z]'`"
    16 
    17 aout_extra_libs=''
    18 aout_extra_sep=''
    19 for xxx in $aout_extra_static_ext; do
    20   aout_extra_dir=`echo "$xxx" | sed -e 's/::/\//g'`
    21   aout_extra_lib="lib/auto/$aout_extra_dir/"`basename "$aout_extra_dir"`
    22   aout_extra_libs="$aout_extra_libs$aout_extra_sep$aout_extra_lib$aout_lib_ext"
    23   aout_extra_sep=' '
    24 done
     15if test -z "dll_post"; then
     16    echo "error: dll_post is emtpy.";
     17    exit 1;
     18fi
    2519
    2620$spitshell >>Makefile <<!GROK!THIS!
    2721
    2822PERL_FULLVERSION = $perl_fullversion
    29 
    30 AOUT_OPTIMIZE   = \$(OPTIMIZE)
    31 AOUT_CCCMD      = \$(CC) -DPERL_CORE $aout_ccflags \$(AOUT_OPTIMIZE)
    32 AOUT_AR         = $aout_ar
    33 AOUT_OBJ_EXT    = $aout_obj_ext
    34 AOUT_LIB_EXT    = $aout_lib_ext
    35 AOUT_LIBPERL    = libperl$aout_lib_ext
    36 AOUT_CLDFLAGS   = $aout_ldflags
    37 
    38 AOUT_LIBPERL_DLL        = libperl_dll$aout_lib_ext
    39 AOUT_CCCMD_DLL  = \$(CC) -DDOSISH -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS -DTWO_POT_OPTIMIZE -DPERL_EMERGENCY_SBRK
    40 AOUT_CLDFLAGS_DLL       = -Zexe -Zmt -Zcrtdll -Zstack 32000
    4123
    4224# No -DPERL_CORE
     
    4426
    4527LD_OPT          =
    46 PERL_DLL_LD_OPT = -Zdll -Zmap -Zargs-wild
     28PERL_DLL_LD_OPT = -Zdll -Zomf -Zhigh-mem -Zmap
    4729
    4830PERL_DLL_BASE   = perl$dll_post
     
    5032TEST_PERL_DLL   = perl_dll_t
    5133CONFIG_ARGS     = $config_args
    52 AOUT_EXTRA_LIBS = $aout_extra_libs
    5334
    5435!GROK!THIS!
     
    5637$spitshell >>Makefile <<'!NO!SUBS!'
    5738PREPLIBRARY_LIBPERL = $(LIBPERL)
    58 $(LIBPERL): perl.imp perl5.def libperl_override.lib
    59         emximp -o $(LIBPERL) perl.imp
    60         cp $(LIBPERL) perl.lib
    61 
    62 imp_version: $(FIRSTMAKEFILE)
     39$(LIBPERL) perl.lib: perl.imp perl5.def libperl_override.a
     40        emximp -o $@ perl.imp
     41        cp $@ perl.lib
     42
     43imp_version: #$(FIRSTMAKEFILE) -crap
    6344        echo $(PERL_DLL_BASE) > $@
    6445
    65 libperl_override.imp: os2/os2add.sym miniperl imp_version
    66         ./miniperl -wnle 'print "$$_\t$(PERL_DLL_BASE)\t$$_\t?"' os2/os2add.sym > $@
     46libperl_override.imp: os2/os2add.sym miniperl$(EXE_EXT) imp_version
     47        ./miniperl$(EXE_EXT) -wnle 'print "$$_\t$(PERL_DLL_BASE)\t$$_\t?"' os2/os2add.sym > $@
    6748        echo    'strdup $(PERL_DLL_BASE)        Perl_strdup     ?' >> $@
    6849        echo    'putenv $(PERL_DLL_BASE)        Perl_putenv     ?' >> $@
    6950
    70 libperl_override.lib: libperl_override.imp
     51libperl_override.a: libperl_override.imp
    7152        emximp -o $@ libperl_override.imp
    7253
     
    7455        echo    '_main  $(PERL_DLL_BASE)        _dll_perlmain   ?' > $@
    7556
    76 libperl_dllmain.lib: libperl_dllmain.imp
     57libperl_dllmain$(LIB_EXT): libperl_dllmain.imp
    7758        emximp -o $@ libperl_dllmain.imp
    7859
    79 libperl_dllmain.a: libperl_dllmain.imp
    80         emximp -o $@ libperl_dllmain.imp
    81 
    82 $(AOUT_LIBPERL_DLL): perl.imp $(PERL_DLL) perl5.def
    83         emximp -o $(AOUT_LIBPERL_DLL) perl.imp
    84 
    8560perl.imp: perl5.def imp_version
    86         emximp -o perl.imp perl5.def
    87 #       echo    'emx_calloc             emxlibcm        400     ?' >> $@
    88 #       echo    'emx_free               emxlibcm        401     ?' >> $@
    89 #       echo    'emx_malloc             emxlibcm        402     ?' >> $@
    90 #       echo    'emx_realloc            emxlibcm        403     ?' >> $@
    91 
    92 .PHONY: perl_dll installcmd aout_clean aout_install aout_install.perl \
    93         perlrexx test_prep_perl_ test_prep_perl_sys test_prep_perl_stat \
    94         test_prep_perl_stat_aout test_prep_various \
    95         stat_aout_harness aout_harness stat_harness sys_harness all_harness \
    96         stat_aout_test aout_test stat_test sys_test all_test \
    97         perl___harness test_harness_redir
     61        emximp -o $@ perl5.def
     62
     63
     64.PHONY: perl_dll installcmd perlrexx test_prep_perl_ test_prep_various all_harness \
     65        all_test test_harness_redir
    9866
    9967perl_dll: $(PERL_DLL)
     
    10270
    10371t/$(PERL_DLL): $(PERL_DLL)
    104         $(LNS) $(PERL_DLL) t/$(PERL_DLL)
     72        cp -f $(PERL_DLL) t/$(PERL_DLL)
    10573
    10674$(PERL_DLL): $(obj) perl5.def perl$(OBJ_EXT) perlmain$(OBJ_EXT) $(DYNALOADER)
     
    139107# We link miniperl statically, since .DLL depends on $(DYNALOADER)
    140108
    141 miniperl.map: miniperl
    142 
    143 miniperl.exe: miniperl
    144 
    145 miniperl: $(obj) perl$(OBJ_EXT) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT)
    146         $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) perl$(OBJ_EXT) `echo $(obj)|sed -e 's/\bop\./opmini./g'` $(libs) -Zmap -Zargs-wild
    147         @./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
    148 
    149 depend: os2ish.h dlfcn.h os2thread.h os2.c
    150 
    151 # Stupid make? Needed...
    152 os2$(OBJ_EXT) : os2.c
    153 
    154 os2.c: os2/os2.c os2ish.h
    155         cp -f $< $@
    156 
    157 dl_os2.c: os2/dl_os2.c os2ish.h
    158         cp -f $< $@
     109miniperl.map: miniperl$(EXE_EXT)
     110
     111miniperl$(EXE_EXT): $(obj) perl$(OBJ_EXT) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT)
     112        $(CC) $(CLDFLAGS) -o $@ miniperlmain$(OBJ_EXT) perl$(OBJ_EXT) `echo $(obj)|sed -e 's/\bop\./opmini./g'` $(libs) -Zmap -Zargs-wild
     113        @./miniperl$(EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
     114
     115depend: os2ish.h os2thread.h
     116
     117# Deal with os2/* stuff
     118os2$(OBJ_EXT): os2.c os2ish.h os2thread.h
     119os2.c:
     120        ln -s os2/$@ $@
     121dl_os2.c: os2/dl_os2.c
     122        ln -s os2/$@ $@
     123perlrexx$(OBJ_EXT): perlrexx.c os2ish.h os2thread.h
     124perlrexx.c:
     125        ln -s os2/$@ $@
    159126
    160127os2ish.h: os2/os2ish.h
    161         cp -f $< $@
     128        ln -s os2/$@ $@
    162129
    163130os2thread.h: os2/os2thread.h
    164         cp -f $< $@
    165 
    166 dlfcn.h: os2/dlfcn.h
    167         cp -f $< $@
    168 
    169 # Non-Forking dynamically loaded perl
    170 # Make many: they are useful in low-memory conditions (floppy boot?  Lot of shared memory used?)
    171 
    172 perl___$(EXE_EXT) perl___: $& libperl_dllmain$(LIB_EXT)
    173         $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl___ libperl_dllmain$(LIB_EXT)
    174         $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 8192 -o perl___8 libperl_dllmain$(LIB_EXT)
    175         $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 4096 -o perl___4 libperl_dllmain$(LIB_EXT) 
    176         $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 2048 -o perl___2 libperl_dllmain$(LIB_EXT)
    177         $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 1024 -o perl___1 libperl_dllmain$(LIB_EXT)
    178         $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 512 -o perl___05 libperl_dllmain$(LIB_EXT)
    179         $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 320 -o perl___03 libperl_dllmain$(LIB_EXT)
    180 
    181 # This one is compiled -Zsys, so cannot do many things:
    182 
    183 # Remove -Zcrtdll
    184 STAT_CLDFLAGS = -Zexe -Zomf -Zmt -Zstack 32000
    185 
    186 # Non-forking dynamically loaded perl with a wrong CRT library:
    187 
    188 perl_stat perl_stat$(EXE_EXT): $& libperl_dllmain$(LIB_EXT)
    189         $(SHRPENV) $(CC) $(STAT_CLDFLAGS) $(CCDLFLAGS) -o perl_stat libperl_dllmain$(LIB_EXT) 
    190 
    191 # Remove -Zcrtdll, add -Zsys
    192 SYS_CLDFLAGS = $(STAT_CLDFLAGS) -Zsys
    193 
    194 # Non-Forking dynamically loaded perl without EMX - so with wrong CRT library
    195 
    196 perl_sys perl_sys$(EXE_EXT): $& libperl_dllmain$(LIB_EXT)
    197         $(SHRPENV) $(CC) $(SYS_CLDFLAGS) $(CCDLFLAGS) -o perl_sys libperl_dllmain$(LIB_EXT) 
     131        ln -s os2/$@ $@
    198132
    199133installcmd :
    200134        @perl -e 'die qq{Give the option INSTALLCMDDIR=... to make!} if $$ARGV[0] eq ""' $(INSTALLCMDDIR)
    201         ./miniperl -Ilib os2/perl2cmd.pl $(INSTALLCMDDIR)
    202 
    203 # Aout section:
    204 
    205 aout_obj = $(addsuffix $(AOUT_OBJ_EXT),$(basename $(obj)))
    206 AOUT_DYNALOADER = $(addsuffix $(AOUT_LIB_EXT),$(basename $(DYNALOADER)))
    207 aout_ext = $(static_ext) $(dynamic_ext) $(AOUT_EXTRA_LIBS)
    208 aout_static_ext = $(addsuffix $(AOUT_LIB_EXT),$(basename $(aout_ext)))
    209 aout_static_lib = $(addsuffix $(LIB_EXT),$(basename $(aout_ext)))
    210 
    211 aout_static_ext_dll = $(addsuffix $(AOUT_LIB_EXT),$(basename $(static_ext)))
    212 DYNALOADER_OBJ = ext/DynaLoader/DynaLoader$(OBJ_EXT)
    213 aout_static_ext_dll = $(addsuffix $(AOUT_LIB_EXT),$(basename $(static_ext)))
    214 AOUT_DYNALOADER_OBJ = $(addsuffix $(AOUT_OBJ_EXT),$(basename $(DYNALOADER_OBJ)))
    215 
    216 ifneq ($(OBJ_EXT),$(AOUT_OBJ_EXT))
    217 $(AOUT_DYNALOADER_OBJ) : $(DYNALOADER_OBJ)
    218         emxaout -o $@ $<
    219 endif   
    220 
    221 $(DYNALOADER_OBJ) : $(DYNALOADER)
    222         @sh -c true
    223 
    224 $(AOUT_LIBPERL) : $(aout_obj) perl$(AOUT_OBJ_EXT)
    225         rm -f $@
    226         $(AOUT_AR) rcu $@ perl$(AOUT_OBJ_EXT) $(aout_obj)
    227         cp $@ perl$(AOUT_LIB_EXT)
    228 
    229 ifneq ($(OBJ_EXT),$(AOUT_OBJ_EXT))
    230 
    231 .c$(AOUT_OBJ_EXT):
    232         $(AOUT_CCCMD) $(PLDLFLAGS) -c $*.c
    233 
    234 opmini$(AOUT_OBJ_EXT): op.c
    235         $(AOUT_CCCMD) $(PLDLFLAGS) -DPERL_EXTERNAL_GLOB -o opmini$(AOUT_OBJ_EXT) -c op.c
    236 
    237 perlmain(AOUT_OBJ_EXT): perlmain.c
    238         $(AOUT_CCCMD_DLL) $(PLDLFLAGS) -c perlmain.c
    239    
    240 endif   
    241 
    242 # Assume that extensions are at most 4 deep (this is so with 5.8.1)
    243 aout_extlist: $(aout_static_ext) $(AOUT_DYNALOADER)
    244         echo lib/auto/*.a lib/auto/*/*.a lib/auto/*/*/*.a lib/auto/*/*/*/*.a | tr ' ' '\n' | grep -v '\*' > $@
    245 
    246 aout_perlmain.c: miniperlmain.c config.sh makefile $(static_ext_autoinit) $(aout_static_ext) writemain aout_extlist
    247         sh writemain `cat aout_extlist` > aout_perlmain.c
    248 
    249 _preplibrary = miniperl lib/Config.pm lib/lib.pm lib/re.pm
    250 
    251 miniperl_: $& miniperlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) opmini$(AOUT_OBJ_EXT) $(_preplibrary)
    252         $(CC) $(AOUT_CLDFLAGS) $(CCDLFLAGS) -o miniperl_ miniperlmain$(AOUT_OBJ_EXT) opmini$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) $(libs)
    253 
    254 # Forking statically loaded perl
    255 
    256 # Need a miniperl_ dependency, since $(AOUT_DYNALOADER) is build via implicit
    257 # rules, thus would not rebuild miniperl_ via an explicit rule
    258 
    259 perl_$(EXE_EXT) perl_: $& miniperl_ aout_perlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) $(AOUT_DYNALOADER) $(aout_static_ext) ext.libs aout_extlist
    260         $(CC) $(AOUT_CLDFLAGS) $(CCDLFLAGS) $(OPTIMIZE) -o perl_ aout_perlmain$(AOUT_OBJ_EXT) `cat aout_extlist` $(AOUT_LIBPERL) `cat ext.libs` $(libs)
    261 
    262 # Remove -Zcrtdll
    263 STAT_AOUT_CLDFLAGS = -Zexe -Zmt -Zstack 32000
    264 
    265 # Forking dynamically loaded perl with a wrong CRT library:
    266 
    267 perl_stat_aout$(EXE_EXT) perl_stat_aout: $& libperl_dllmain$(AOUT_LIB_EXT)
    268         $(SHRPENV) $(CC) $(STAT_AOUT_CLDFLAGS) $(CCDLFLAGS) $(OPTIMIZE) -o perl_stat_aout libperl_dllmain$(AOUT_LIB_EXT)
     135        ./miniperl$(EXE_EXT) -Ilib os2/perl2cmd.pl $(INSTALLCMDDIR)
     136
     137_preplibrary = miniperl$(EXE_EXT) lib/Config.pm lib/lib.pm lib/re.pm
    269138
    270139PERLREXX_DLL = perlrexx.dll
    271140
    272 perl perl$(EXE_EXT) : perl__ perl___ $(PERLREXX_DLL) $(PERL_DLL)
    273 
    274141# Dynamically loaded PM-application perl:
    275 
    276 perl__$(EXE_EXT) perl__: $& libperl_dllmain$(LIB_EXT)
    277         $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl__ libperl_dllmain$(LIB_EXT) -Zlinker /PM:PM
     142perl__$(EXE_EXT): $& $(PERL_DLL) libperl_dllmain$(LIB_EXT)
     143        $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o $@ libperl_dllmain$(LIB_EXT) -Zlinker /PM:PM
    278144
    279145# Forking dynamically loaded perl:
    280 
    281 perl$(EXE_EXT) perl: $& libperl_dllmain$(AOUT_LIB_EXT)
    282         $(CC) $(AOUT_CLDFLAGS_DLL) $(CCDLFLAGS) -o perl libperl_dllmain$(AOUT_LIB_EXT)
    283 
    284 clean: aout_clean
    285 
    286 aout_clean:
    287         -rm *perl_.* *.o *.a lib/auto/*/*.a lib/auto/*/*/*.a lib/auto/*/*/*/*.a ext/*/Makefile.aout ext/*/*/Makefile.aout  ext/*/*/*/Makefile.aout
    288 
    289 aout_install: perl_ aout_install.perl
    290 
    291 aout_install.perl: perl_ installperl
    292         ./perl_ installperl --destdir="$(DESTDIR)"
     146perl$(EXE_EXT): $& $(PERLREXX_DLL) $(PERL_DLL) libperl_dllmain$(LIB_EXT)
     147        $(CC) $(CLDFLAGS_DLL) $(CCDLFLAGS) -o $@ libperl_dllmain$(LIB_EXT)
     148
     149clean: os2_clean
     150
     151os2_clean:
     152        rm -f *.map perlrexx.dll perl___[0-9]*
    293153
    294154perlrexx: $(PERLREXX_DLL)
    295155        @sh -c true
    296156
    297 perlrexx.c: os2/perlrexx.c
    298         @cp -f os2/$@ $@
    299 
    300157# Remove -Zexe, add -Zdll -Zso.  No stack needed
    301158SO_CLDFLAGS = -Zdll -Zomf
     
    306163        $(SHRPENV) $(CC) $(SO_CLDFLAGS) $(CCDLFLAGS) -o $@ perlrexx$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) perlrexx.def
    307164
    308 perlrexx.def: miniperl $(_preplibrary)
     165perlrexx.def: miniperl$(EXE_EXT) $(_preplibrary)
    309166        echo    "LIBRARY 'perlrexx' INITINSTANCE TERMINSTANCE"  > $@
    310         echo    "DESCRIPTION '@#perl5-porters@perl.org:`miniperl -Ilib -MConfig -e 'print \$$]'`#@ REXX to Perl `miniperl -Ilib -MConfig -e 'print \$$Config{version}'` interface'" >> $@
     167        echo    "DESCRIPTION '@#perl5-porters@perl.org:`miniperl$(EXE_EXT) -Ilib -MConfig -e 'print \$$]'`#@ REXX to Perl `miniperl$(EXE_EXT) -Ilib -MConfig -e 'print \$$Config{version}'` interface'" >> $@
    311168        echo    "EXPORTS"                                       >> $@
    312169        echo    '  "_PERL"'                                     >> $@
     
    325182        $(SO_CCCMD) $(PLDLFLAGS) -c perlrexx.c
    326183
     184
    327185# To test with harness, one needed to HARNESS_IGNORE_EXITCODE=2
    328186
     
    330188REDIR_TEST = 2>&1 | tee 00_$@
    331189
    332 test_prep_perl_: test_prep_pre miniperl_ ./perl_$(EXE_EXT)
     190test_prep_perl_: test_prep_pre miniperl_$(EXE_EXT) ./perl_$(EXE_EXT)
    333191        PERL=./perl_ $(MAKE) _test_prep
    334192
    335 test_prep_various: test_prep_pre miniperl $(dynamic_ext) $(TEST_PERL_DLL)
    336 
    337 test_prep_perl_sys: test_prep_various ./perl_sys$(EXE_EXT)
    338         PERL=./perl_sys $(MAKE) _test_prep
    339 
    340 test_prep_perl___: test_prep_various ./perl___$(EXE_EXT)
    341         PERL=./perl___ $(MAKE) _test_prep
    342 
    343 test_prep_perl_stat: test_prep_various ./perl_stat$(EXE_EXT)
    344         PERL=./perl_stat $(MAKE) _test_prep
    345 
    346 test_prep_perl_stat_aout: test_prep_various ./perl_stat_aout$(EXE_EXT)
    347         PERL=./perl_stat_aout $(MAKE) _test_prep
    348 
    349 aout_test: test_prep_perl_
    350         PERL=./perl_ $(MAKE) _test
    351 
    352 aout_harness: test_prep_perl_
    353         -PERL=./perl_ $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
    354 
    355 sys_test: test_prep_perl_sys
    356         PERL=./perl_sys $(MAKE) _test
    357 
    358 sys_harness: test_prep_perl_sys
    359         -PERL=./perl_sys $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
    360 
    361 stat_test: test_prep_perl_stat
    362         PERL=./perl_stat $(MAKE) _test
    363 
    364 stat_harness: test_prep_perl_stat
    365         -PERL=./perl_stat $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
    366 
    367 stat_aout_test: test_prep_perl_stat_aout
    368         PERL=./perl_stat_aout $(MAKE) _test
    369 
    370 stat_aout_harness: test_prep_perl_stat_aout
    371         -PERL=./perl_stat_aout $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
    372 
    373 perl___test: test_prep_perl___
    374         PERL=./perl___ $(MAKE) _test
    375 
    376 perl___harness: test_prep_perl___
    377         -PERL=./perl___ $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
    378 
    379 all_test: test aout_test perl___test sys_test stat_test stat_aout_test
     193test_prep_various: test_prep_pre miniperl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
     194
     195all_test: test
    380196
    381197test_harness_redir: test_prep
    382198        -PERL=./perl $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
    383199
    384 all_harness: test_harness_redir aout_harness perl___harness sys_harness stat_harness stat_aout_harness
     200all_harness: test_harness_redir
    385201
    386202!NO!SUBS!
    387203
    388 # Now we need to find directories in ./ext/ which are up to 3 level deep
    389 # Currently (2001/06) there is no directories 4 levels deep.
    390 # (Only directories so that there is no Makefile.PL some levels up matter.)
    391 
    392 dirs=''
    393 ddirs=''
    394 preci='ext/%/Makefile.aout '
    395 for d in ext/*
    396 do
    397         # echo "...Checking '$d'..."
    398         # skip the kid if the parent exists: cmp SDBFile/sdbm, done by MakeMaker
    399         if test ! -e "$d/Makefile.PL"; then
    400             # Need to treat subdirectories manually
    401             # echo "...Checking subdirs of '$d'..."
    402             d_treated=''
    403             for dd in $d/*
    404             do
    405                 if test ! -d $dd; then
    406                     continue
    407                 fi
    408                 if test -e "$dd/Makefile.PL"; then
    409                     if test "X$d_treated" = "X"; then
    410                         d_treated=1
    411                         # echo "...Found parentless 2-level deep Makefile.PL's in $d/*/:" $d/*/Makefile.PL
    412                         dirs="$dirs $d"
    413                         preci="$preci $d/%/Makefile.aout"
    414                     fi
    415                 else
    416                     # Need to treat subsubdirectories manually
    417                     dd_treated=''
    418                     for ddd in $dd/*            # ext/*/*/*/Makefile.PL
    419                     do
    420                         if test ! -d $ddd; then
    421                             continue
    422                         fi
    423                         if test -e "$ddd/Makefile.PL"; then
    424                             if test "X$dd_treated" = "X"; then
    425                                 dd_treated=1
    426                                 # echo "...Found parentless 3-level deep Makefile.PL's in $dd/*/:" $dd/*/Makefile.PL
    427                                 ddirs="$ddirs $dd"
    428                                 preci="$preci $dd/%/Makefile.aout"
    429                             fi
    430                         fi
    431                     done
    432                 fi
    433            done
    434         fi
    435 done
    436 
    437 # ext/threads is marked as NORECURS, so we need to specialcase it
    438 if echo "$static_ext $dynamic_ext" | grep -q threads/shared ; then
    439    preci="$preci ext/threads/%/Makefile.aout"
    440    dirs="$dirs ext/threads"
    441 fi
    442 
    443 $spitshell >>Makefile <<!GROK!THIS!
    444 .PRECIOUS : $preci
    445 
    446 # Set this to FORCE to force a rebuilt of aout extensions
    447 
    448 AOUT_EXTENSIONS_FORCE =
    449 
    450 !GROK!THIS!
    451 
    452 for d in $ddirs
    453 do
    454     # Remove the leading component ext/
    455     dd=`dirname $d`
    456     pp=`basename $dd`
    457     p=$pp/`basename $d`
    458     $spitshell >>Makefile <<!GROK!THIS!
    459 lib/auto/$p/*/%.a : $d/%/Makefile.aout
    460         @cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
    461         cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
    462 
    463 $d/%/Makefile.aout : miniperl_ \$(_preplibrary) \$(AOUT_EXTENSIONS_FORCE)
    464         cd \$(dir \$@) ; ../../../../miniperl_ -I ../../../../lib Makefile.PL FIRST_MAKEFILE=Makefile.aout INSTALLDIRS=perl PERL_CORE=1
    465 
    466 !GROK!THIS!
    467 
    468 done
    469 
    470 for d in $dirs
    471 do
    472     p=`basename $d`
    473     $spitshell >>Makefile <<!GROK!THIS!
    474 lib/auto/$p/*/%.a : $d/%/Makefile.aout
    475         @cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
    476         cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
    477 
    478 $d/%/Makefile.aout : miniperl_ \$(_preplibrary) \$(AOUT_EXTENSIONS_FORCE)
    479         cd \$(dir \$@) ; ../../../miniperl_ -I ../../../lib Makefile.PL FIRST_MAKEFILE=Makefile.aout INSTALLDIRS=perl PERL_CORE=1
    480 
    481 !GROK!THIS!
    482 
    483 done
    484 
    485 # We need to special-case OS2/DLL/DLL.a, since the recipe above will
    486 # try to find it in ext/OS2/DLL
    487 
    488 $spitshell >>Makefile <<'!NO!SUBS!'
    489 lib/auto/OS2/DLL/DLL.a : lib/auto/OS2/REXX/REXX.a
    490         @sh -c true
    491 
    492 lib/auto/*/%.a : ext/%/Makefile.aout
    493         @cd ext/$(basename $(notdir $@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
    494         cd ext/$(basename $(notdir $@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
    495 
    496 ext/%/Makefile.aout : miniperl_ $(_preplibrary) $(AOUT_EXTENSIONS_FORCE)
    497         cd $(dir $@) ; ../../miniperl_ -I ../../lib Makefile.PL FIRST_MAKEFILE=Makefile.aout INSTALLDIRS=perl PERL_CORE=1
    498 
    499 !NO!SUBS!
  • trunk/essentials/dev-lang/perl/os2/dl_os2.c

    r3206 r3220  
    165165}
    166166
    167 char *
     167const char *
    168168dlerror(void)
    169169{
Note: See TracChangeset for help on using the changeset viewer.