Commit | Line | Data |
---|---|---|
2304df62 AD |
1 | case $CONFIG in |
2 | '') | |
3 | if test -f config.sh; then TOP=.; | |
4 | elif test -f ../config.sh; then TOP=..; | |
5 | elif test -f ../../config.sh; then TOP=../..; | |
6 | elif test -f ../../../config.sh; then TOP=../../..; | |
7 | elif test -f ../../../../config.sh; then TOP=../../../..; | |
8 | else | |
9 | echo "Can't find config.sh."; exit 1 | |
10 | fi | |
11 | . $TOP/config.sh | |
12 | ;; | |
13 | esac | |
14 | : This forces SH files to create target in same directory as SH file. | |
15 | : This is so that make depend always knows where to find SH derivatives. | |
16 | case "$0" in | |
17 | */*) cd `expr X$0 : 'X\(.*\)/'` ;; | |
18 | esac | |
19 | ||
2304df62 AD |
20 | case "$d_dosuid" in |
21 | *define*) suidperl='suidperl' ;; | |
22 | *) suidperl='';; | |
23 | esac | |
24 | ||
d96ebe2e | 25 | shrpdir=$archlibexp/CORE |
26 | ||
27 | case "$useshrplib" in | |
28 | true) | |
655635e8 | 29 | pldlflags="$cccdlflags" |
d96ebe2e | 30 | case "$osname" in |
31 | os2) shrpenv='' ;; | |
32 | *) shrpenv="env LD_RUN_PATH=$shrpdir";; | |
655635e8 | 33 | esac |
d96ebe2e | 34 | case "${osname}${osvers}" in |
35 | next4*) | |
36 | # Can't we do this in the hint file? | |
37 | ld='libtool -dynamic -undefined warning -framework System \ | |
38 | -compatibility_version 1 -current_version $(PATCHLEVEL) \ | |
39 | -prebind -seg1addr 0x27000000 -install_name $(SHRPDIR)/$@' | |
40 | ;; | |
655635e8 | 41 | esac |
760ac839 | 42 | ;; |
d96ebe2e | 43 | *) |
44 | pldlflags='' | |
45 | shrpenv='' | |
46 | ;; | |
ecfc5424 AD |
47 | esac |
48 | ||
a0d0e21e LW |
49 | : Prepare dependency lists for Makefile. |
50 | dynamic_list=' ' | |
51 | for f in $dynamic_ext; do | |
52 | : the dependency named here will never exist | |
ecfc5424 | 53 | base=`echo "$f" | sed 's/.*\///'` |
75f92628 | 54 | dynamic_list="$dynamic_list lib/auto/$f/$base.$dlext" |
a0d0e21e LW |
55 | done |
56 | ||
57 | static_list=' ' | |
a0d0e21e LW |
58 | for f in $static_ext; do |
59 | base=`echo "$f" | sed 's/.*\///'` | |
cd4d8a96 | 60 | static_list="$static_list lib/auto/$f/$base\$(LIB_EXT)" |
a0d0e21e LW |
61 | done |
62 | ||
2304df62 | 63 | echo "Extracting Makefile (with variable substitutions)" |
655635e8 | 64 | $spitshell >Makefile <<!GROK!THIS! |
a0d0e21e | 65 | # Makefile.SH |
85e6fe83 LW |
66 | # This file is derived from Makefile.SH. Any changes made here will |
67 | # be lost the next time you run Configure. | |
655635e8 | 68 | # Makefile is used to generate $firstmakefile. The only difference |
69 | # is that $firstmakefile has the dependencies filled in at the end. | |
2304df62 | 70 | # |
fed7345c | 71 | # |
2304df62 AD |
72 | # I now supply perly.c with the kits, so don't remake perly.c without byacc |
73 | BYACC = $byacc | |
74 | CC = $cc | |
232e078e | 75 | LD = $ld |
16d20bd9 | 76 | |
2304df62 AD |
77 | LDFLAGS = $ldflags |
78 | CLDFLAGS = $ldflags | |
85e6fe83 | 79 | |
2304df62 AD |
80 | SMALL = $small |
81 | LARGE = $large $split | |
82 | mallocsrc = $mallocsrc | |
83 | mallocobj = $mallocobj | |
85e6fe83 | 84 | LNS = $lns |
2304df62 | 85 | RMS = rm -f |
85e6fe83 LW |
86 | ranlib = $ranlib |
87 | ||
16d20bd9 AD |
88 | # The following are mentioned only to make metaconfig include the |
89 | # appropriate questions in Configure. If you want to change these, | |
8e07c86e | 90 | # edit config.sh instead, or specify --man1dir=/wherever on |
16d20bd9 AD |
91 | # installman commandline. |
92 | bin = $installbin | |
93 | scriptdir = $scriptdir | |
d96ebe2e | 94 | shrpdir = $archlibexp/CORE |
16d20bd9 AD |
95 | privlib = $installprivlib |
96 | man1dir = $man1dir | |
97 | man1ext = $man1ext | |
98 | man3dir = $man3dir | |
99 | man3ext = $man3ext | |
100 | ||
85e6fe83 LW |
101 | # The following are used to build and install shared libraries for |
102 | # dynamic loading. | |
103 | LDDLFLAGS = $lddlflags | |
104 | CCDLFLAGS = $ccdlflags | |
a0d0e21e | 105 | DLSUFFIX = .$dlext |
ecfc5424 | 106 | PLDLFLAGS = $pldlflags |
d96ebe2e | 107 | LIBPERL = $libperl |
ecfc5424 | 108 | SHRPENV = $shrpenv |
a0d0e21e LW |
109 | |
110 | dynamic_ext = $dynamic_list | |
111 | static_ext = $static_list | |
112 | ext = \$(dynamic_ext) \$(static_ext) | |
cd4d8a96 | 113 | DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT) |
2304df62 AD |
114 | |
115 | libs = $libs $cryptlib | |
116 | ||
909b3858 | 117 | public = perl $suidperl utilities translators |
2304df62 AD |
118 | |
119 | shellflags = $shellflags | |
120 | ||
d96ebe2e | 121 | # This is set to MAKE=$make if your $make command doesn't |
122 | # do it for you. | |
123 | $make_set_make | |
4633a7c4 LW |
124 | |
125 | # These variables will be used in a future version to make | |
126 | # the make file more portable to non-unix systems. | |
127 | AR = $ar | |
128 | EXE_EXT = $exe_ext | |
129 | LIB_EXT = $lib_ext | |
130 | OBJ_EXT = $obj_ext | |
131 | PATH_SEP = $path_sep | |
132 | ||
133 | FIRSTMAKEFILE = $firstmakefile | |
134 | ||
135 | # Any special object files needed by this architecture, e.g. os2/os2.obj | |
136 | ARCHOBJS = $archobjs | |
137 | ||
cd4d8a96 | 138 | .SUFFIXES: .c \$(OBJ_EXT) |
139 | ||
d96ebe2e | 140 | # grrr |
141 | SHELL = $sh | |
655635e8 | 142 | |
2304df62 AD |
143 | !GROK!THIS! |
144 | ||
85e6fe83 | 145 | ## In the following dollars and backticks do not need the extra backslash. |
2304df62 AD |
146 | $spitshell >>Makefile <<'!NO!SUBS!' |
147 | ||
d96ebe2e | 148 | CCCMD = `sh $(shellflags) cflags $(LIBPERL) $@` |
2304df62 | 149 | |
fed7345c | 150 | private = preplibrary lib/ExtUtils/Miniperl.pm lib/Config.pm |
2304df62 | 151 | |
4633a7c4 LW |
152 | # Files to be built with variable substitution before miniperl |
153 | # is available. | |
154 | sh = Makefile.SH cflags.SH config_h.SH makeaperl.SH makedepend.SH \ | |
155 | makedir.SH perl_exp.SH writemain.SH | |
156 | ||
157 | shextract = Makefile cflags config.h makeaperl makedepend \ | |
655635e8 | 158 | makedir perl.exp writemain |
4633a7c4 LW |
159 | |
160 | # Files to be built with variable substitution after miniperl is | |
161 | # available. Dependencies handled manually below (for now). | |
2304df62 | 162 | |
909b3858 | 163 | pl = pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL |
4633a7c4 | 164 | |
909b3858 | 165 | plextract = pod/pod2html pod/pod2latex pod/pod2man pod/pod2text |
4633a7c4 LW |
166 | |
167 | addedbyconf = UU $(shextract) $(plextract) pstruct | |
2304df62 | 168 | |
fed7345c | 169 | h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h |
a0d0e21e | 170 | h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h |
2304df62 | 171 | h3 = opcode.h patchlevel.h perl.h perly.h pp.h proto.h regcomp.h |
d96ebe2e | 172 | h4 = regexp.h scope.h sv.h unixish.h util.h perlio.h |
2304df62 AD |
173 | h = $(h1) $(h2) $(h3) $(h4) |
174 | ||
a0d0e21e LW |
175 | c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c |
176 | c2 = perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c | |
760ac839 | 177 | c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c universal.c globals.c perlio.c |
2304df62 | 178 | |
a0d0e21e | 179 | c = $(c1) $(c2) $(c3) miniperlmain.c perlmain.c |
2304df62 | 180 | |
cd4d8a96 | 181 | obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) |
182 | obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT) | |
760ac839 | 183 | obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) |
655635e8 | 184 | |
4633a7c4 | 185 | obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS) |
2304df62 | 186 | |
a0d0e21e LW |
187 | # Once perl has been Configure'd and built ok you build different |
188 | # perl variants (Debugging, Embedded, Multiplicity etc) by saying: | |
d96ebe2e | 189 | # make clean; make LIBPERL=libperl<type>.a |
a0d0e21e LW |
190 | # where <type> is some combination of 'd' and(or) 'e' or 'm'. |
191 | # See cflags to understand how this works. | |
192 | # | |
d96ebe2e | 193 | # This mechanism is getting clunky and might not even work any more. |
194 | # EMBEDDING is on by default, and MULTIPLICITY doesn't work. | |
195 | # | |
a0d0e21e | 196 | |
2304df62 AD |
197 | lintflags = -hbvxac |
198 | ||
cd4d8a96 | 199 | .c$(OBJ_EXT): |
d96ebe2e | 200 | $(CCCMD) $(PLDLFLAGS) $*.c |
2304df62 | 201 | |
655635e8 | 202 | all: $(FIRSTMAKEFILE) miniperl $(private) $(plextract) $(public) $(dynamic_ext) |
909b3858 | 203 | @echo " "; echo " Everything is up to date." |
204 | ||
205 | translators: miniperl lib/Config.pm FORCE | |
a0d0e21e | 206 | @echo " "; echo " Making x2p stuff"; cd x2p; $(MAKE) all |
8e07c86e | 207 | |
909b3858 | 208 | utilities: miniperl lib/Config.pm FORCE |
209 | @echo " "; echo " Making utilities"; cd utils; $(MAKE) all | |
210 | ||
211 | ||
16d20bd9 AD |
212 | # This is now done by installman only if you actually want the man pages. |
213 | # @echo " "; echo " Making docs"; cd pod; $(MAKE) all; | |
85e6fe83 LW |
214 | |
215 | # Phony target to force checking subdirectories. | |
e50aee73 | 216 | # Apparently some makes require an action for the FORCE target. |
85e6fe83 | 217 | FORCE: |
4633a7c4 | 218 | @sh -c true |
85e6fe83 | 219 | |
2304df62 AD |
220 | # The $& notation tells Sequent machines that it can do a parallel make, |
221 | # and is harmless otherwise. | |
c07a80fd | 222 | # The miniperl -w -MExporter line is a basic cheap test to catch errors |
223 | # before make goes on to run preplibrary and then MakeMaker on extensions. | |
224 | # This is very handy because later errors are often caused by miniperl | |
225 | # build problems but that's not obvious to the novice. | |
226 | # The Module used here must not depend on Config or any extensions. | |
2304df62 | 227 | |
d96ebe2e | 228 | miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) |
229 | $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) $(LIBPERL) $(libs) | |
73169306 | 230 | @./miniperl -w -Ilib -MExporter -e 0 || $(MAKE) minitest |
2304df62 | 231 | |
cd4d8a96 | 232 | miniperlmain$(OBJ_EXT): miniperlmain.c |
d96ebe2e | 233 | $(CCCMD) $(PLDLFLAGS) $*.c |
ecfc5424 | 234 | |
655635e8 | 235 | perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE) |
a0d0e21e LW |
236 | sh writemain $(DYNALOADER) $(static_ext) > tmp |
237 | sh mv-if-diff tmp perlmain.c | |
85e6fe83 | 238 | |
cd4d8a96 | 239 | perlmain$(OBJ_EXT): perlmain.c |
d96ebe2e | 240 | $(CCCMD) $(PLDLFLAGS) $*.c |
85e6fe83 | 241 | |
a0d0e21e LW |
242 | # The file ext.libs is a list of libraries that must be linked in |
243 | # for static extensions, e.g. -lm -lgdbm, etc. The individual | |
244 | # static extension Makefile's add to it. | |
fed7345c | 245 | ext.libs: $(static_ext) |
a0d0e21e | 246 | -@test -f ext.libs || touch ext.libs |
85e6fe83 | 247 | |
d96ebe2e | 248 | perl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs |
249 | $(SHRPENV) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) | |
85e6fe83 | 250 | |
d96ebe2e | 251 | pureperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs |
252 | purify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) | |
2304df62 | 253 | |
d96ebe2e | 254 | quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs |
255 | quantify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) | |
2304df62 | 256 | |
ecfc5424 | 257 | !NO!SUBS! |
d96ebe2e | 258 | # How to build libperl. This is still rather convoluted. |
259 | # Load up custom Makefile.SH fragments? | |
260 | if test -r $osname/Makefile.SHs ; then | |
261 | . $osname/Makefile.SHs | |
262 | $spitshell >>Makefile <<!GROK!THIS! | |
cd4d8a96 | 263 | |
264 | Makefile: $osname/Makefile.SHs | |
cd4d8a96 | 265 | !GROK!THIS! |
266 | else | |
9c9e9f08 | 267 | $spitshell >>Makefile <<!NO!SUBS! |
268 | $(LIBPERL): $& perl$(OBJ_EXT) $(obj) | |
269 | !NO!SUBS! | |
d96ebe2e | 270 | case "$useshrplib" in |
271 | true) | |
272 | $spitshell >>Makefile <<'!NO!SUBS!' | |
273 | $(LD) $(LDDLFLAGS) -o $@ perl$(OBJ_EXT) $(obj) | |
ecfc5424 | 274 | !NO!SUBS! |
d96ebe2e | 275 | ;; |
276 | *) | |
277 | $spitshell >>Makefile <<'!NO!SUBS!' | |
278 | rm -f $(LIBPERL) | |
279 | $(AR) rcu $(LIBPERL) perl$(OBJ_EXT) $(obj) | |
280 | @$(ranlib) $(LIBPERL) | |
655635e8 | 281 | !NO!SUBS! |
d96ebe2e | 282 | ;; |
283 | esac | |
655635e8 | 284 | fi |
d96ebe2e | 285 | |
ecfc5424 | 286 | $spitshell >>Makefile <<'!NO!SUBS!' |
2304df62 AD |
287 | |
288 | # This version, if specified in Configure, does ONLY those scripts which need | |
289 | # set-id emulation. Suidperl must be setuid root. It contains the "taint" | |
290 | # checks as well as the special code to validate that the script in question | |
291 | # has been invoked correctly. | |
292 | ||
d96ebe2e | 293 | suidperl: $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs |
294 | $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o suidperl perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs) | |
2304df62 | 295 | |
cd4d8a96 | 296 | sperl$(OBJ_EXT): perl.c perly.h patchlevel.h $(h) |
2304df62 | 297 | $(RMS) sperl.c |
85e6fe83 | 298 | $(LNS) perl.c sperl.c |
d96ebe2e | 299 | $(CCCMD) -DIAMSUID sperl.c |
2304df62 AD |
300 | $(RMS) sperl.c |
301 | ||
fec02dd3 AD |
302 | # We have to call our ./makedir because Ultrix 4.3 make can't handle the line |
303 | # test -d lib/auto || mkdir lib/auto | |
304 | # | |
4633a7c4 | 305 | preplibrary: miniperl lib/Config.pm $(plextract) |
cd4d8a96 | 306 | @sh ./makedir lib/auto |
a0d0e21e LW |
307 | @echo " AutoSplitting perl library" |
308 | @./miniperl -Ilib -e 'use AutoSplit; \ | |
309 | autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm | |
2304df62 | 310 | |
75f92628 | 311 | # Take care to avoid modifying lib/Config.pm without reason |
655635e8 | 312 | lib/Config.pm: config.sh miniperl configpm |
75f92628 AD |
313 | ./miniperl configpm tmp |
314 | sh mv-if-diff tmp lib/Config.pm | |
2304df62 | 315 | |
37120919 AD |
316 | lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl minimod.pl lib/Config.pm |
317 | ./miniperl minimod.pl > tmp && mv tmp $@ | |
fed7345c | 318 | |
4633a7c4 LW |
319 | $(plextract): miniperl lib/Config.pm |
320 | ./miniperl -Ilib $@.PL | |
321 | ||
16d20bd9 AD |
322 | install: all install.perl install.man |
323 | ||
cd4d8a96 | 324 | install.perl: all installperl |
2304df62 | 325 | ./perl installperl |
a0d0e21e | 326 | |
cd4d8a96 | 327 | install.man: all installman |
16d20bd9 AD |
328 | ./perl installman |
329 | ||
330 | # Not implemented yet. | |
cd4d8a96 | 331 | #install.html: all installhtml |
16d20bd9 AD |
332 | # ./perl installhtml |
333 | ||
a0d0e21e | 334 | # I now supply perly.c with the kits, so the following section is |
56febc5e AD |
335 | # used only if you force byacc to run by saying |
336 | # make run_byacc | |
337 | # Since we patch up the byacc output, the perly.fixer script needs | |
338 | # to run with precisely the same version of byacc as I use. You | |
339 | # normally shouldn't remake perly.[ch]. | |
340 | ||
232e078e | 341 | run_byacc: FORCE |
c07a80fd | 342 | @ echo 'Expect' 130 shift/reduce and 1 reduce/reduce conflict |
56febc5e AD |
343 | $(BYACC) -d perly.y |
344 | sh $(shellflags) ./perly.fixer y.tab.c perly.c | |
760ac839 | 345 | sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' perly.c >perly.tmp && mv perly.tmp perly.c |
56febc5e AD |
346 | mv y.tab.h perly.h |
347 | echo 'extern YYSTYPE yylval;' >>perly.h | |
4633a7c4 | 348 | - perl vms/vms_yfix.pl perly.c perly.h vms/perly_c.vms vms/perly_h.vms |
56febc5e AD |
349 | |
350 | # We don't want to regenerate perly.c and perly.h, but they might | |
351 | # appear out-of-date after a patch is applied or a new distribution is | |
352 | # made. | |
353 | perly.c: perly.y | |
cd4d8a96 | 354 | -@sh -c true |
56febc5e AD |
355 | |
356 | perly.h: perly.y | |
cd4d8a96 | 357 | -@sh -c true |
a0d0e21e | 358 | |
e50aee73 AD |
359 | # The following three header files are generated automatically |
360 | # keywords.h: keywords.pl | |
361 | # opcode.h: opcode.pl | |
362 | # embed.h: embed.pl global.sym interp.sym | |
363 | # The correct versions should be already supplied with the perl kit, | |
364 | # in case you don't have perl available. | |
365 | # To force them to run, type | |
366 | # make regen_headers | |
367 | regen_headers: FORCE | |
368 | perl keywords.pl | |
369 | perl opcode.pl | |
370 | perl embed.pl | |
8e07c86e | 371 | |
a0d0e21e LW |
372 | # Extensions: |
373 | # Names added to $(dynamic_ext) or $(static_ext) will automatically | |
fed7345c | 374 | # get built. There should ordinarily be no need to change any of |
a0d0e21e LW |
375 | # this part of makefile. |
376 | # | |
377 | # The dummy dependency is a place holder in case $(dynamic_ext) or | |
378 | # $(static_ext) is empty. | |
379 | # | |
380 | # DynaLoader may be needed for extensions that use Makefile.PL. | |
381 | ||
382 | $(DYNALOADER): miniperl preplibrary FORCE | |
d96ebe2e | 383 | @sh ext/util/make_ext static $@ LIBPERL_A=$(LIBPERL) |
a0d0e21e LW |
384 | |
385 | d_dummy $(dynamic_ext): miniperl preplibrary $(DYNALOADER) FORCE | |
d96ebe2e | 386 | @sh ext/util/make_ext dynamic $@ LIBPERL_A=$(LIBPERL) |
a0d0e21e LW |
387 | |
388 | s_dummy $(static_ext): miniperl preplibrary $(DYNALOADER) FORCE | |
d96ebe2e | 389 | @sh ext/util/make_ext static $@ LIBPERL_A=$(LIBPERL) |
2304df62 AD |
390 | |
391 | clean: | |
cd4d8a96 | 392 | rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c |
fed7345c | 393 | rm -f perl.exp ext.libs |
d96ebe2e | 394 | -rm -f perl.export perl.dll perl.libexp perl.map perl.def |
a0d0e21e | 395 | -cd pod; $(MAKE) clean |
909b3858 | 396 | -cd utils; $(MAKE) clean |
397 | -cd x2p; $(MAKE) clean | |
75f92628 | 398 | -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \ |
42793c05 | 399 | sh ext/util/make_ext clean $$x ; \ |
a0d0e21e | 400 | done |
d96ebe2e | 401 | rm -f perl suidperl miniperl $(LIBPERL) |
2304df62 AD |
402 | |
403 | realclean: clean | |
4633a7c4 | 404 | -cd os2; rm -f Makefile |
909b3858 | 405 | -cd pod; $(MAKE) realclean |
406 | -cd utils; $(MAKE) realclean | |
407 | -cd x2p; $(MAKE) realclean | |
8e07c86e | 408 | -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \ |
42793c05 | 409 | sh ext/util/make_ext realclean $$x ; \ |
a0d0e21e | 410 | done |
42793c05 | 411 | rm -f *.orig */*.orig *~ */*~ core t/core t/c t/perl |
a0d0e21e | 412 | rm -rf $(addedbyconf) |
cd4d8a96 | 413 | rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old |
fed7345c | 414 | rm -f $(private) |
a0d0e21e | 415 | rm -rf lib/auto |
232e078e | 416 | rm -f lib/.exists |
16d20bd9 | 417 | rm -f h2ph.man pstruct |
a0d0e21e | 418 | rm -rf .config |
75f92628 | 419 | @echo "Note that make realclean does not delete config.sh" |
2304df62 | 420 | |
ecfc5424 AD |
421 | clobber: realclean |
422 | rm -f config.sh cppstdin | |
fed7345c | 423 | |
ecfc5424 AD |
424 | distclean: clobber |
425 | ||
2304df62 AD |
426 | # The following lint has practically everything turned on. Unfortunately, |
427 | # you have to wade through a lot of mumbo jumbo that can't be suppressed. | |
428 | # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message | |
429 | # for that spot. | |
430 | ||
431 | lint: perly.c $(c) | |
432 | lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz | |
433 | ||
cd4d8a96 | 434 | # Need to unset during recursion to go out of loop |
435 | ||
436 | MAKEDEPEND = makedepend | |
437 | ||
438 | $(FIRSTMAKEFILE): Makefile $(MAKEDEPEND) | |
439 | $(MAKE) depend MAKEDEPEND= | |
a0d0e21e | 440 | |
75f92628 | 441 | config.h: config.sh |
655635e8 | 442 | $(SHELL) config_h.SH |
443 | ||
444 | perl.exp: perl_exp.SH config.sh | |
445 | $(SHELL) perl_exp.SH | |
75f92628 | 446 | |
a0d0e21e | 447 | # When done, touch perlmain.c so that it doesn't get remade each time. |
2304df62 | 448 | depend: makedepend |
cd4d8a96 | 449 | sh ./makedepend |
a0d0e21e | 450 | - test -s perlmain.c && touch perlmain.c |
2304df62 AD |
451 | cd x2p; $(MAKE) depend |
452 | ||
cd4d8a96 | 453 | # Cannot postpone this until $firstmakefile is ready ;-) |
454 | makedepend: makedepend.SH config.sh | |
455 | sh ./makedepend.SH | |
456 | ||
d96ebe2e | 457 | check test: miniperl perl preplibrary $(dynamic_ext) |
cd4d8a96 | 458 | - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../perl$(EXE_EXT) perl$(EXE_EXT)) && ./perl TEST </dev/tty |
2304df62 | 459 | |
d96ebe2e | 460 | # Can't depend on lib/Config.pm because that might be where miniperl |
461 | # is crashing. | |
462 | minitest: miniperl | |
463 | @echo "You may see some irrelevant test failures if you have been unable" | |
464 | @echo "to build lib/Config.pm." | |
cd4d8a96 | 465 | - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \ |
16d20bd9 AD |
466 | && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t </dev/tty |
467 | ||
85e6fe83 | 468 | clist: $(c) |
2304df62 AD |
469 | echo $(c) | tr ' ' '\012' >.clist |
470 | ||
85e6fe83 | 471 | hlist: $(h) |
2304df62 AD |
472 | echo $(h) | tr ' ' '\012' >.hlist |
473 | ||
85e6fe83 | 474 | shlist: $(sh) |
2304df62 AD |
475 | echo $(sh) | tr ' ' '\012' >.shlist |
476 | ||
4633a7c4 LW |
477 | pllist: $(pl) |
478 | echo $(pl) | tr ' ' '\012' >.pllist | |
479 | ||
760ac839 LW |
480 | Makefile: Makefile.SH ./config.sh |
481 | $(SHELL) Makefile.SH | |
482 | ||
483 | distcheck : FORCE | |
484 | perl '-MExtUtils::Manifest=&fullcheck' -e 'fullcheck()' | |
485 | ||
486 | manifest : | |
487 | perl '-MExtUtils::Manifest=&mkmanifest' -e 'mkmanifest()' | |
488 | ||
2304df62 AD |
489 | # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE |
490 | # If this runs make out of memory, delete /usr/include lines. | |
491 | !NO!SUBS! | |
492 | ||
85e6fe83 | 493 | $eunicefix Makefile |
2304df62 AD |
494 | case `pwd` in |
495 | *SH) | |
85e6fe83 | 496 | $rm -f ../Makefile |
cd4d8a96 | 497 | $ln Makefile ../Makefile |
2304df62 AD |
498 | ;; |
499 | esac | |
cd4d8a96 | 500 | $rm -f $firstmakefile |