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