Upgrade to Net::Ping 2.09.
[p5sagit/p5-mst-13.2.git] / os2 / Makefile.SHs
CommitLineData
f9c39ab5 1# This file is read by Makefile.SH to produce rules for $(LIBPERL) (and
e95c8f0e 2# some additional rules as well).
3
4# Rerun `sh Makefile.SH; make depend' after making any change.
5
6# Additional rules supported: perl_, aout_test, aout_install, use them
7# for a.out style perl (which may fork).
8
cceca5ed 9perl_fullversion="5.00${PERL_VERSION}_$PERL_SUBVERSION"
3aefca04 10case "$archname" in
cceca5ed 11 *-thread*) perl_fullversion="${perl_fullversion}-threaded";;
3aefca04 12esac
13
3cfae81b 14dll_post="`echo $perl_fullversion | sum | sed -e 's/^0*//' | awk '{print $1}'`"
017f25f1 15dll_post="`printf '%x' $dll_post | tr '[a-z]' '[A-Z]'`"
16
b732e2e2 17aout_extra_libs=''
18aout_extra_sep=''
19for 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=' '
24done
25
e95c8f0e 26$spitshell >>Makefile <<!GROK!THIS!
27
cceca5ed 28PERL_FULLVERSION = $perl_fullversion
3aefca04 29
e96326af 30OPTIMIZE = $optimize
6756f2f0 31AOUT_OPTIMIZE = \$(OPTIMIZE)
0eb4ebd7 32AOUT_CCCMD = \$(CC) -DPERL_CORE $aout_ccflags \$(AOUT_OPTIMIZE)
e95c8f0e 33AOUT_AR = $aout_ar
34AOUT_OBJ_EXT = $aout_obj_ext
35AOUT_LIB_EXT = $aout_lib_ext
f9c39ab5 36AOUT_LIBPERL = libperl$aout_lib_ext
e95c8f0e 37AOUT_CLDFLAGS = $aout_ldflags
38
dd3366de 39AOUT_LIBPERL_DLL = libperl_dll$aout_lib_ext
72ea3524 40AOUT_CCCMD_DLL = \$(CC) -DDOSISH -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS -DTWO_POT_OPTIMIZE -DPERL_EMERGENCY_SBRK
491527d0 41AOUT_CLDFLAGS_DLL = -Zexe -Zmt -Zcrtdll -Zstack 32000
dd3366de 42
764df951 43# No -DPERL_CORE
44SO_CCCMD = \$(CC) $ccflags \$(OPTIMIZE)
45
f07bc2fb 46LD_OPT = \$(OPTIMIZE)
9e2a34c1 47PERL_DLL_LD_OPT = -Zmap -Zlinker /map
84902520 48
3aefca04 49PERL_DLL_BASE = perl$dll_post
50PERL_DLL = \$(PERL_DLL_BASE)\$(DLSUFFIX)
d6a255e6 51TEST_PERL_DLL = perl_dll_t
017f25f1 52CONFIG_ARGS = $config_args
b732e2e2 53AOUT_EXTRA_LIBS = $aout_extra_libs
3aefca04 54
e95c8f0e 55!GROK!THIS!
82835e01 56
57$spitshell >>Makefile <<'!NO!SUBS!'
5ba48348 58$(LIBPERL): perl.imp $(PERL_DLL) perl5.def libperl_override.lib
f9c39ab5 59 emximp -o $(LIBPERL) perl.imp
82835e01 60
5ba48348 61libperl_override.imp: os2/os2add.sym
62 ./miniperl -wnle 'print "$$_\t$(PERL_DLL_BASE)\t$$_\t?"' os2/os2add.sym > tmp.imp
63 echo 'strdup $(PERL_DLL_BASE) Perl_strdup ?' >> tmp.imp
64 echo 'putenv $(PERL_DLL_BASE) Perl_putenv ?' >> tmp.imp
65 sh mv-if-diff tmp.imp $@
66
67libperl_override.lib: libperl_override.imp
68 emximp -o $@ libperl_override.imp
69
3aefca04 70$(AOUT_LIBPERL_DLL): perl.imp $(PERL_DLL) perl5.def
dd3366de 71 emximp -o $(AOUT_LIBPERL_DLL) perl.imp
72
82835e01 73perl.imp: perl5.def
74 emximp -o perl.imp perl5.def
df3ef7a9 75 echo 'emx_calloc emxlibcm 400 ?' >> $@
76 echo 'emx_free emxlibcm 401 ?' >> $@
77 echo 'emx_malloc emxlibcm 402 ?' >> $@
78 echo 'emx_realloc emxlibcm 403 ?' >> $@
82835e01 79
764df951 80.PHONY: perl_dll installcmd aout_clean aout_install aout_install.perl \
81 perlrexx test_prep_perl_ test_prep_perl_sys test_prep_perl_stat \
82 test_prep_perl_stat_aout test_prep_various \
83 stat_aout_harness aout_harness stat_harness sys_harness all_harness \
84 stat_aout_test aout_test stat_test sys_test all_test
85
017f25f1 86perl_dll: $(PERL_DLL)
87
d6a255e6 88perl_dll_t: t/$(PERL_DLL)
89
90t/$(PERL_DLL): $(PERL_DLL)
91 $(LNS) $(PERL_DLL) t/$(PERL_DLL)
92
3aefca04 93$(PERL_DLL): $(obj) perl5.def perl$(OBJ_EXT)
9e2a34c1 94 $(LD) $(LD_OPT) $(LDDLFLAGS) $(PERL_DLL_LD_OPT) -o $@ perl$(OBJ_EXT) $(obj) $(libs) perl5.def || ( rm $(PERL_DLL) && sh -c false )
82835e01 95
3cfae81b 96perl5.olddef: perl.linkexp
3aefca04 97 echo "LIBRARY '$(PERL_DLL_BASE)' INITINSTANCE TERMINSTANCE" > $@
23da6c43 98 echo DESCRIPTION "'Perl interpreter v$(PERL_FULLVERSION), export autogenerated'" >>$@
82835e01 99 echo STACKSIZE 32768 >>$@
100 echo CODE LOADONCALL >>$@
101 echo DATA LOADONCALL NONSHARED MULTIPLE >>$@
102 echo EXPORTS >>$@
82835e01 103!NO!SUBS!
104
105if [ ! -z "$myttyname" ] ; then
106 $spitshell >>Makefile <<'!NO!SUBS!'
107 echo ' "ttyname"' >>$@
108!NO!SUBS!
109fi
110
111$spitshell >>Makefile <<'!NO!SUBS!'
112 cat perl.linkexp >>$@
113
114# grep -v '"\(malloc\|realloc\|free\)"' perl.linkexp >>$@
115
116
82835e01 117perl.exports: perl.exp EXTERN.h perl.h
ff68c719 118 (echo "#include \"EXTERN.h\" \n#include \"perl.h\" \n#include \"perl.exp\""; \
119 echo "malloc\nrealloc\ncalloc\nfree") | \
82835e01 120 $(CC) -DEMBED -E - | \
121 awk '{if ($$2 == "") print $$1}' | sort | uniq > $@
122
3aefca04 123perl.linkexp: perl.exports perl.map os2/os2.sym
dd96f567 124 cat perl.exports os2/os2.sym perl.map | sort | uniq -d | sed -e 's/\w\+/ "\0"/' > perl.linkexp
82835e01 125
84902520 126# We link miniperl statically, since .DLL depends on $(DYNALOADER)
127
bd0dd1d8 128miniperl.map miniperl: $(obj) perl$(OBJ_EXT) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT)
74294fdf 129 $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) perl$(OBJ_EXT) `echo $(obj)|sed -e 's/\bop\./opmini./g'` $(libs) -Zmap -Zlinker /map/PM:VIO
bd0dd1d8 130 @./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
82835e01 131
dd96f567 132depend: os2ish.h dlfcn.h os2thread.h os2.c
82835e01 133
134# Stupid make? Needed...
135os2$(OBJ_EXT) : os2.c
136
137os2.c: os2/os2.c os2ish.h
491527d0 138 cp -f $< $@
82835e01 139
e95c8f0e 140dl_os2.c: os2/dl_os2.c os2ish.h
491527d0 141 cp -f $< $@
e95c8f0e 142
82835e01 143os2ish.h: os2/os2ish.h
491527d0 144 cp -f $< $@
82835e01 145
dd96f567 146os2thread.h: os2/os2thread.h
491527d0 147 cp -f $< $@
dd96f567 148
e95c8f0e 149dlfcn.h: os2/dlfcn.h
491527d0 150 cp -f $< $@
e95c8f0e 151
764df951 152# Non-Forking dynamically loaded perl
dd3366de 153
764df951 154perl___$(EXE_EXT) perl___: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
155 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl___ perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) -Zlinker /map/PM:VIO
e95c8f0e 156
53285a48 157# This one is compiled -Zsys, so cannot do many things:
158
764df951 159# Remove -Zcrtdll
160STAT_CLDFLAGS = -Zexe -Zomf -Zmt -Zstack 32000
161
162# Non-forking dynamically loaded perl with a wrong CRT library:
163
164perl_stat: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
165 $(SHRPENV) $(CC) $(STAT_CLDFLAGS) $(CCDLFLAGS) -o $@ perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) -Zlinker /map/PM:VIO
166
53285a48 167# Remove -Zcrtdll, add -Zsys
764df951 168SYS_CLDFLAGS = $(STAT_CLDFLAGS) -Zsys
169
170# Non-Forking dynamically loaded perl without EMX - so with wrong CRT library
53285a48 171
172perl_sys: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
764df951 173 $(SHRPENV) $(CC) $(SYS_CLDFLAGS) $(CCDLFLAGS) -o $@ perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) -Zlinker /map/PM:VIO
53285a48 174
82835e01 175installcmd :
e71dd89f 176 @perl -e 'die qq{Give the option INSTALLCMDDIR=... to make!} if $$ARGV[0] eq ""' $(INSTALLCMDDIR)
177 ./miniperl -Ilib os2/perl2cmd.pl $(INSTALLCMDDIR)
82835e01 178
e95c8f0e 179# Aout section:
180
181aout_obj = $(addsuffix $(AOUT_OBJ_EXT),$(basename $(obj)))
182AOUT_DYNALOADER = $(addsuffix $(AOUT_LIB_EXT),$(basename $(DYNALOADER)))
b732e2e2 183aout_ext = $(dynamic_ext) $(AOUT_EXTRA_LIBS)
184aout_static_ext = $(addsuffix $(AOUT_LIB_EXT),$(basename $(aout_ext)))
185aout_static_lib = $(addsuffix $(LIB_EXT),$(basename $(aout_ext)))
e95c8f0e 186
dd3366de 187aout_static_ext_dll = $(addsuffix $(AOUT_LIB_EXT),$(basename $(static_ext)))
188DYNALOADER_OBJ = ext/DynaLoader/DynaLoader$(OBJ_EXT)
189aout_static_ext_dll = $(addsuffix $(AOUT_LIB_EXT),$(basename $(static_ext)))
190AOUT_DYNALOADER_OBJ = $(addsuffix $(AOUT_OBJ_EXT),$(basename $(DYNALOADER_OBJ)))
191
192$(AOUT_DYNALOADER_OBJ) : $(DYNALOADER_OBJ)
193 emxaout -o $@ $<
194
195$(DYNALOADER_OBJ) : $(DYNALOADER)
196 @sh -c true
197
f9c39ab5 198$(AOUT_LIBPERL) : $(aout_obj) perl$(AOUT_OBJ_EXT)
dd3366de 199 rm -f $@
200 $(AOUT_AR) rcu $@ perl$(AOUT_OBJ_EXT) $(aout_obj)
e95c8f0e 201
202.c$(AOUT_OBJ_EXT):
203 $(AOUT_CCCMD) $(PLDLFLAGS) -c $*.c
204
bd0dd1d8 205opmini$(AOUT_OBJ_EXT): op.c
206 $(AOUT_CCCMD) $(PLDLFLAGS) -DPERL_EXTERNAL_GLOB -o opmini$(AOUT_OBJ_EXT) -c op.c
207
dd3366de 208perlmain(AOUT_OBJ_EXT): perlmain.c
209 $(AOUT_CCCMD_DLL) $(PLDLFLAGS) -c perlmain.c
210
e95c8f0e 211aout_perlmain.c: miniperlmain.c config.sh makefile $(static_ext_autoinit)
212 sh writemain $(DYNALOADER) $(aout_static_lib) > tmp
213 sh mv-if-diff tmp aout_perlmain.c
214
764df951 215_preplibrary = miniperl lib/Config.pm lib/lib.pm lib/re.pm
216
217miniperl_: $& miniperlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) opmini$(AOUT_OBJ_EXT) $(_preplibrary)
74294fdf 218 $(CC) $(AOUT_CLDFLAGS) $(CCDLFLAGS) -o miniperl_ miniperlmain$(AOUT_OBJ_EXT) opmini$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) $(libs)
e95c8f0e 219
764df951 220# Forking statically loaded perl
221
222perl_$(EXE_EXT) perl_: $& aout_perlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) $(AOUT_DYNALOADER) $(aout_static_ext) ext.libs
74294fdf 223 $(CC) $(AOUT_CLDFLAGS) $(CCDLFLAGS) -o perl_ aout_perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER) $(aout_static_ext) $(AOUT_LIBPERL) `cat ext.libs` $(libs)
e95c8f0e 224
764df951 225# Remove -Zcrtdll
226STAT_AOUT_CLDFLAGS = -Zexe -Zmt -Zstack 32000
227
228# Forking dynamically loaded perl with a wrong CRT library:
229
230perl_stat_aout$(EXE_EXT) perl_stat_aout: $& perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER_OBJ) $(aout_static_ext_dll) $(AOUT_LIBPERL_DLL) ext.libs
231 $(SHRPENV) $(CC) $(STAT_AOUT_CLDFLAGS) $(CCDLFLAGS) -o $@ perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER_OBJ) $(aout_static_ext_dll) $(AOUT_LIBPERL_DLL) `cat ext.libs` $(libs)
232
9e2a34c1 233PERLREXX_DLL = perlrexx.dll
234
235perl : perl__ perl___ $(PERLREXX_DLL)
760ac839 236
764df951 237# Dynamically loaded PM-application perl:
238
239perl__$(EXE_EXT) perl__: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
74294fdf 240 $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl__ perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) -Zlinker /PM:PM
760ac839 241
dd3366de 242# Forking dynamically loaded perl:
243
764df951 244perl$(EXE_EXT) perl: $& perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER_OBJ) $(aout_static_ext_dll) $(AOUT_LIBPERL_DLL) ext.libs
74294fdf 245 $(CC) $(AOUT_CLDFLAGS_DLL) $(CCDLFLAGS) -o perl perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER_OBJ) $(aout_static_ext_dll) $(AOUT_LIBPERL_DLL) `cat ext.libs` $(libs)
dd3366de 246
247clean: aout_clean
248
e95c8f0e 249aout_clean:
250 -rm *perl_.* *.o *.a lib/auto/*/*.a ext/*/Makefile.aout
251
252aout_install: perl_ aout_install.perl
253
254aout_install.perl: perl_ installperl
255 ./perl_ installperl
256
9e2a34c1 257perlrexx: $(PERLREXX_DLL)
764df951 258 @sh -c true
259
260perlrexx.c: os2/perlrexx.c
261 @cp -f os2/$@ $@
262
263# Remove -Zexe, add -Zdll -Zso. No stack needed
264SO_CLDFLAGS = -Zdll -Zso -Zomf -Zmt -Zsys
265
266# A callable-from-REXX DLL
267
9e2a34c1 268$(PERLREXX_DLL): perlrexx$(OBJ_EXT) perlrexx.def
764df951 269 $(SHRPENV) $(CC) $(SO_CLDFLAGS) $(CCDLFLAGS) -o $@ perlrexx$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) perlrexx.def
270
9e2a34c1 271perlrexx.def: miniperl $(_preplibrary)
764df951 272 echo "LIBRARY 'perlrexx' INITINSTANCE TERMINSTANCE" > tmp.def
273 echo "DESCRIPTION '@#perl5-porters@perl.org:`miniperl -Ilib -MConfig -e 'print \$$]'`#@ REXX to Perl `miniperl -Ilib -MConfig -e 'print \$$Config{version}'` interface'" >> tmp.def
274 echo "EXPORTS" >> tmp.def
275 echo ' "PERL"' >> tmp.def
276 echo ' "PERLTERM"' >> tmp.def
277 echo ' "PERLINIT"' >> tmp.def
278 echo ' "PERLEXIT"' >> tmp.def
279 echo ' "PERLEVAL"' >> tmp.def
9e2a34c1 280 echo ' "PERLLASTERROR"' >> tmp.def
281 echo ' "PERLEVALSUBCOMMAND"' >> tmp.def
282 echo ' "PERLEXPORTALL"' >> tmp.def
283 echo ' "PERLDROPALL"' >> tmp.def
284 echo ' "PERLDROPALLEXIT"' >> tmp.def
764df951 285 sh mv-if-diff tmp.def $@
286
287
288perlrexx$(OBJ_EXT): perlrexx.c
289 $(SO_CCCMD) $(PLDLFLAGS) -c perlrexx.c
290
291# To test with harness, one needed to HARNESS_IGNORE_EXITCODE=2
760ac839 292
764df951 293# Define to be empty to get a TTY test
294REDIR_TEST = 2>&1 | tee 00_$@
53285a48 295
764df951 296test_prep_perl_: test_prep_pre miniperl_ ./perl_$(EXE_EXT)
297 PERL=./perl_ $(MAKE) _test_prep
53285a48 298
764df951 299test_prep_various: test_prep_pre miniperl $(dynamic_ext) $(TEST_PERL_DLL)
300
301test_prep_perl_sys: test_prep_various ./perl_sys$(EXE_EXT)
302 PERL=./perl_sys $(MAKE) _test_prep
303
304test_prep_perl___: test_prep_various ./perl___$(EXE_EXT)
305 PERL=./perl___ $(MAKE) _test_prep
306
307test_prep_perl_stat: test_prep_various ./perl_stat$(EXE_EXT)
308 PERL=./perl_stat $(MAKE) _test_prep
309
310test_prep_perl_stat_aout: test_prep_various ./perl_stat_aout$(EXE_EXT)
311 PERL=./perl_stat_aout $(MAKE) _test_prep
312
313aout_test: test_prep_perl_
314 PERL=./perl_ $(MAKE) _test
315
316aout_harness: test_prep_perl_
317 -PERL=./perl_ $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
318
319sys_test: test_prep_perl_sys
320 PERL=./perl_sys $(MAKE) _test
321
322sys_harness: test_prep_perl_sys
323 -PERL=./perl_sys $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
324
325stat_test: test_prep_perl_stat
326 PERL=./perl_stat $(MAKE) _test
327
328stat_harness: test_prep_perl_stat
329 -PERL=./perl_stat $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
330
331stat_aout_test: test_prep_perl_stat_aout
332 PERL=./perl_stat_aout $(MAKE) _test
333
334stat_aout_harness: test_prep_perl_stat_aout
335 -PERL=./perl_stat_aout $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
336
337perl___test: test_prep_perl___
338 PERL=./perl___ $(MAKE) _test
339
340perl___harness: test_prep_perl___
341 -PERL=./perl___ $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
342
343all_test: test aout_test perl___test sys_test stat_test stat_aout_test
344
345all_harness: test_harness aout_harness perl___harness sys_harness stat_harness stat_aout_harness
53285a48 346
017f25f1 347!NO!SUBS!
e95c8f0e 348
5f929d0c 349# Now we need to find directories in ./ext/ which are up to 3 level deep
350# Currently (2001/06) there is no directories 4 levels deep.
351# (Only directories so that there is no Makefile.PL some levels up matter.)
017f25f1 352
353dirs=''
5f929d0c 354ddirs=''
017f25f1 355preci='ext/%/Makefile.aout '
356for d in ext/*
357do
5f929d0c 358 # echo "...Checking '$d'..."
359 # skip the kid if the parent exists: cmp SDBFile/sdbm, done by MakeMaker
360 if test ! -e "$d/Makefile.PL"; then
361 # Need to treat subdirectories manually
362 # echo "...Checking subdirs of '$d'..."
363 d_treated=''
364 for dd in $d/*
365 do
366 if test ! -d $dd; then
367 continue
368 fi
369 if test -e "$dd/Makefile.PL"; then
370 if test "X$d_treated" = "X"; then
371 d_treated=1
372 # echo "...Found parentless 2-level deep Makefile.PL's in $d/*/:" $d/*/Makefile.PL
373 dirs="$dirs $d"
374 preci="$preci $d/%/Makefile.aout"
375 fi
376 else
377 # Need to treat subsubdirectories manually
378 dd_treated=''
379 for ddd in $dd/*
380 do
381 if test ! -d $ddd; then
382 continue
383 fi
384 if test -e "$ddd/Makefile.PL"; then
385 if test "X$dd_treated" = "X"; then
386 dd_treated=1
387 # echo "...Found parentless 3-level deep Makefile.PL's in $dd/*/:" $dd/*/Makefile.PL
388 ddirs="$ddirs $dd"
389 preci="$preci $dd/%/Makefile.aout"
390 fi
391 fi
392 done
393 fi
394 done
017f25f1 395 fi
396done
397
398$spitshell >>Makefile <<!GROK!THIS!
399.PRECIOUS : $preci
400
764df951 401# Set this to FORCE to force a rebuilt of aout extensions
402
403AOUT_EXTENSIONS_FORCE =
404
017f25f1 405!GROK!THIS!
406
5f929d0c 407for d in $ddirs
408do
409 # Remove the leading component ext/
410 dd=`dirname $d`
411 pp=`basename $dd`
412 p=$pp/`basename $d`
413 $spitshell >>Makefile <<!GROK!THIS!
414lib/auto/$p/*/%.a : $d/%/Makefile.aout
415 @cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
416 cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
417
764df951 418$d/%/Makefile.aout : miniperl_ \$(_preplibrary) \$(AOUT_EXTENSIONS_FORCE)
419 cd \$(dir \$@) ; ../../../../miniperl_ -I ../../../../lib Makefile.PL FIRST_MAKEFILE=Makefile.aout INSTALLDIRS=perl
5f929d0c 420
421!GROK!THIS!
422
423done
424
017f25f1 425for d in $dirs
426do
427 p=`basename $d`
428 $spitshell >>Makefile <<!GROK!THIS!
5f929d0c 429lib/auto/$p/*/%.a : $d/%/Makefile.aout
430 @cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
431 cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
017f25f1 432
764df951 433$d/%/Makefile.aout : miniperl_ \$(_preplibrary) \$(AOUT_EXTENSIONS_FORCE)
434 cd \$(dir \$@) ; ../../../miniperl_ -I ../../../lib Makefile.PL FIRST_MAKEFILE=Makefile.aout INSTALLDIRS=perl
017f25f1 435
436!GROK!THIS!
e95c8f0e 437
017f25f1 438done
760ac839 439
764df951 440# We need to special-case OS2/DLL/DLL.a, since the recipe above will
441# try to find it in ext/OS2/DLL
442
017f25f1 443$spitshell >>Makefile <<'!NO!SUBS!'
764df951 444lib/auto/OS2/DLL/DLL.a : lib/auto/OS2/REXX/REXX.a
445 @sh -c true
446
017f25f1 447lib/auto/*/%.a : ext/%/Makefile.aout
448 @cd ext/$(basename $(notdir $@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
449 cd ext/$(basename $(notdir $@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
760ac839 450
764df951 451ext/%/Makefile.aout : miniperl_ \$(_preplibrary) \$(AOUT_EXTENSIONS_FORCE)
452 cd $(dir $@) ; ../../miniperl_ -I ../../lib Makefile.PL FIRST_MAKEFILE=Makefile.aout INSTALLDIRS=perl
e95c8f0e 453
82835e01 454!NO!SUBS!