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