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