Now builds .PL utilities in the utils/ subdirectory.
[p5sagit/p5-mst-13.2.git] / os2 / diff.Makefile
1 diff -cr ..\perl5os2.patch\perl5.001m.andy/Makefile.SH ./Makefile.SH
2 *** ../perl5os2.patch/perl5.001m.andy/Makefile.SH       Mon Oct 09 21:40:46 1995
3 --- ./Makefile.SH       Thu Sep 28 00:13:40 1995
4 ***************
5 *** 22,27 ****
6 --- 22,31 ----
7   *) suidperl='';;
8   esac
9   
10 + # In case Configure is not patched:
11 + : ${obj_ext=.o} ${obj_ext_regexp='\.o'} ${lib_ext=.a} ${ar=ar} ${firstmakefile=makefile}
12 + : ${exe_ext=} ${cldlibs="$libs $cryptlib"}
13
14   shrpenv=""
15   case "$d_shrplib" in
16   *define*)
17 ***************
18 *** 31,43 ****
19        *[0-9]) plibsuf=.$so.$patchlevel;;
20        *)           plibsuf=.$so;;
21       esac
22       case "$shrpdir" in
23        /usr/lib)        ;;
24        "")      ;;
25        *)               shrpenv="env LD_RUN_PATH=$shrpdir";;
26       esac
27       pldlflags="$cccdlflags";;
28 ! *)  plibsuf=.a
29       pldlflags="";;
30   esac
31   
32 --- 35,48 ----
33        *[0-9]) plibsuf=.$so.$patchlevel;;
34        *)           plibsuf=.$so;;
35       esac
36 +     if test "x$plibext" != "x" ; then  plibsuf=$plibext d_shrplib=custom ; fi
37       case "$shrpdir" in
38        /usr/lib)        ;;
39        "")      ;;
40        *)               shrpenv="env LD_RUN_PATH=$shrpdir";;
41       esac
42       pldlflags="$cccdlflags";;
43 ! *)  plibsuf=$lib_ext
44       pldlflags="";;
45   esac
46   
47 ***************
48 *** 53,59 ****
49   static_ai_list=' '
50   for f in $static_ext; do
51         base=`echo "$f" | sed 's/.*\///'`
52 !       static_list="$static_list lib/auto/$f/$base.a"
53         if test -f ext/$f/AutoInit.c; then
54             static_ai_list="$static_ai_list ext/$f/AutoInit.c"
55         fi
56 --- 58,64 ----
57   static_ai_list=' '
58   for f in $static_ext; do
59         base=`echo "$f" | sed 's/.*\///'`
60 !       static_list="$static_list lib/auto/$f/$base\$(A)"
61         if test -f ext/$f/AutoInit.c; then
62             static_ai_list="$static_ai_list ext/$f/AutoInit.c"
63         fi
64 ***************
65 *** 115,129 ****
66   static_ext = $static_list
67   ext = \$(dynamic_ext) \$(static_ext)
68   static_ext_autoinit = $static_ai_list
69 ! DYNALOADER = lib/auto/DynaLoader/DynaLoader.a
70
71   
72   libs = $libs $cryptlib
73   
74   public = perl $suidperl
75   
76   shellflags = $shellflags
77   
78   ## To use an alternate make, set \$altmake in config.sh.
79   MAKE = ${altmake-make}
80   !GROK!THIS!
81 --- 120,152 ----
82   static_ext = $static_list
83   ext = \$(dynamic_ext) \$(static_ext)
84   static_ext_autoinit = $static_ai_list
85 ! DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(A)
86   
87   libs = $libs $cryptlib
88 + cldlibs = $cldlibs
89   
90   public = perl $suidperl
91   
92   shellflags = $shellflags
93   
94 + ## To make it possible a build on a case-unsensitive filesystem
95
96 + firstmakefile = $firstmakefile
97
98 + ## Architecture-specific objects
99
100 + archobjs = $archobjs
101
102 + ## Extention of object files
103
104 + O = $obj_ext
105 + O_REGEXP = $obj_ext_regexp
106 + A = $lib_ext
107 + AR = $ar
108 + exe_ext = $exe_ext
109
110 + .SUFFIXES: .c \$(O)
111
112   ## To use an alternate make, set \$altmake in config.sh.
113   MAKE = ${altmake-make}
114   !GROK!THIS!
115 ***************
116 *** 153,163 ****
117   
118   c = $(c1) $(c2) $(c3) miniperlmain.c perlmain.c
119   
120 ! obj1 = $(mallocobj) gv.o toke.o perly.o op.o regcomp.o dump.o util.o mg.o
121 ! obj2 = hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o
122 ! obj3 = doop.o doio.o regexec.o taint.o deb.o globals.o
123   
124 ! obj = $(obj1) $(obj2) $(obj3)
125   
126   # Once perl has been Configure'd and built ok you build different
127   # perl variants (Debugging, Embedded, Multiplicity etc) by saying:
128 --- 175,185 ----
129   
130   c = $(c1) $(c2) $(c3) miniperlmain.c perlmain.c
131   
132 ! obj1 = $(mallocobj) gv$(O) toke$(O) perly$(O) op$(O) regcomp$(O) dump$(O) util$(O) mg$(O)
133 ! obj2 = hv$(O) av$(O) run$(O) pp_hot$(O) sv$(O) pp$(O) scope$(O) pp_ctl$(O) pp_sys$(O)
134 ! obj3 = doop$(O) doio$(O) regexec$(O) taint$(O) deb$(O) globals$(O)
135   
136 ! obj = $(obj1) $(obj2) $(obj3) $(archobjs)
137   
138   # Once perl has been Configure'd and built ok you build different
139   # perl variants (Debugging, Embedded, Multiplicity etc) by saying:
140 ***************
141 *** 175,184 ****
142   # grrr
143   SHELL = /bin/sh
144   
145 ! .c.o:
146         $(CCCMD) $(PLDLFLAGS) $*.c
147   
148 ! all: makefile miniperl $(private) $(public) $(dynamic_ext)
149         @echo " "; echo "       Making x2p stuff"; cd x2p; $(MAKE) all
150         
151   # This is now done by installman only if you actually want the man pages.
152 --- 197,206 ----
153   # grrr
154   SHELL = /bin/sh
155   
156 ! .c$(O):
157         $(CCCMD) $(PLDLFLAGS) $*.c
158   
159 ! all: $(firstmakefile) miniperl $(private) $(public) $(dynamic_ext)
160         @echo " "; echo "       Making x2p stuff"; cd x2p; $(MAKE) all
161         
162   # This is now done by installman only if you actually want the man pages.
163 ***************
164 *** 187,208 ****
165   # Phony target to force checking subdirectories.
166   # Apparently some makes require an action for the FORCE target.
167   FORCE:
168 !       @true
169   
170   # The $& notation tells Sequent machines that it can do a parallel make,
171   # and is harmless otherwise.
172   
173 ! miniperl: $& miniperlmain.o $(perllib)
174 !       $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain.o $(perllib) $(libs)
175   
176 ! miniperlmain.o: miniperlmain.c
177         $(CCCMD) $(PLDLFLAGS) $*.c
178   
179 ! perlmain.c: miniperlmain.c config.sh makefile $(static_ext_autoinit)
180         sh writemain $(DYNALOADER) $(static_ext) > tmp
181         sh mv-if-diff tmp perlmain.c
182   
183 ! perlmain.o: perlmain.c
184         $(CCCMD) $(PLDLFLAGS) $*.c
185   
186   # The file ext.libs is a list of libraries that must be linked in
187 --- 209,230 ----
188   # Phony target to force checking subdirectories.
189   # Apparently some makes require an action for the FORCE target.
190   FORCE:
191 !       @sh -c true
192   
193   # The $& notation tells Sequent machines that it can do a parallel make,
194   # and is harmless otherwise.
195   
196 ! miniperl: $& miniperlmain$(O) $(perllib)
197 !       $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain$(O) $(perllib) $(cldlibs)
198   
199 ! miniperlmain$(O): miniperlmain.c
200         $(CCCMD) $(PLDLFLAGS) $*.c
201   
202 ! perlmain.c: miniperlmain.c config.sh $(firstmakefile) $(static_ext_autoinit)
203         sh writemain $(DYNALOADER) $(static_ext) > tmp
204         sh mv-if-diff tmp perlmain.c
205   
206 ! perlmain$(O): perlmain.c
207         $(CCCMD) $(PLDLFLAGS) $*.c
208   
209   # The file ext.libs is a list of libraries that must be linked in
210 ***************
211 *** 211,238 ****
212   ext.libs: $(static_ext)
213         -@test -f ext.libs || touch ext.libs
214   
215 ! perl: $& perlmain.o $(perllib) $(DYNALOADER) $(static_ext) ext.libs
216 !       $(SHRPENV) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain.o $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs)
217   
218 ! pureperl: $& perlmain.o $(perllib) $(DYNALOADER) $(static_ext) ext.libs
219 !       purify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain.o $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs)
220   
221 - quantperl: $& perlmain.o $(perllib) $(DYNALOADER) $(static_ext) ext.libs
222 -       quantify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain.o $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs)
223   
224 ! $(perllib): $& perl.o $(obj)
225   !NO!SUBS!
226   
227   case "$d_shrplib" in
228   *define*)
229   $spitshell >>Makefile <<'!NO!SUBS!'
230 !       $(LD) $(LDDLFLAGS) -o $@ perl.o $(obj)
231   !NO!SUBS!
232   ;;
233   *)
234   $spitshell >>Makefile <<'!NO!SUBS!'
235         rm -f $(perllib)
236 !       ar rcu $(perllib) perl.o $(obj)
237         @$(ranlib) $(perllib)
238   !NO!SUBS!
239   ;;
240 --- 233,280 ----
241   ext.libs: $(static_ext)
242         -@test -f ext.libs || touch ext.libs
243   
244 ! perl: $& perlmain$(O) $(perllib) $(DYNALOADER) $(static_ext) ext.libs
245 !       $(SHRPENV) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(O) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs)
246
247 ! pureperl: $& perlmain$(O) $(perllib) $(DYNALOADER) $(static_ext) ext.libs
248 !       purify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(O) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs)
249   
250 ! quantperl: $& perlmain$(O) $(perllib) $(DYNALOADER) $(static_ext) ext.libs
251 !       quantify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(O) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs)
252
253 ! !NO!SUBS!
254   
255   
256 ! case "$d_shrplib" in
257 ! custom) ;;
258 ! *)
259 ! $spitshell >>Makefile <<'!NO!SUBS!'
260 ! $(perllib): $& perl$(O) $(obj)
261   !NO!SUBS!
262 + esac
263   
264   case "$d_shrplib" in
265   *define*)
266   $spitshell >>Makefile <<'!NO!SUBS!'
267 !       $(LD) $(LDDLFLAGS) -o $@ perl$(O) $(obj)
268   !NO!SUBS!
269   ;;
270 + custom)
271 + if test -r $osname/Makefile.SH ; then 
272 +   . $osname/Makefile.SH
273 +   $spitshell >>Makefile <<!GROK!THIS!
274
275 + Makefile: $osname/Makefile.SH
276
277 + !GROK!THIS!
278 + else
279 +   echo "Could not find $osname/Makefile.SH! Skipping target \$(perllib) in Makefile!"
280 + fi
281 + ;;
282   *)
283   $spitshell >>Makefile <<'!NO!SUBS!'
284         rm -f $(perllib)
285 !       $(AR) rcu $(perllib) perl$(O) $(obj)
286         @$(ranlib) $(perllib)
287   !NO!SUBS!
288   ;;
289 ***************
290 *** 245,254 ****
291   # checks as well as the special code to validate that the script in question
292   # has been invoked correctly.
293   
294 ! suidperl: $& sperl.o perlmain.o $(perllib) $(DYNALOADER) $(static_ext) ext.libs
295 !       $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o suidperl perlmain.o sperl.o $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs)
296   
297 ! sperl.o: perl.c perly.h patchlevel.h $(h)
298         $(RMS) sperl.c
299         $(LNS) perl.c sperl.c
300         $(CCCMD) -DIAMSUID sperl.c
301 --- 287,296 ----
302   # checks as well as the special code to validate that the script in question
303   # has been invoked correctly.
304   
305 ! suidperl: $& sperl$(O) perlmain$(O) $(perllib) $(DYNALOADER) $(static_ext) ext.libs
306 !       $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o suidperl perlmain$(O) sperl$(O) $(perllib) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs)
307   
308 ! sperl$(O): perl.c perly.h patchlevel.h $(h)
309         $(RMS) sperl.c
310         $(LNS) perl.c sperl.c
311         $(CCCMD) -DIAMSUID sperl.c
312 ***************
313 *** 258,264 ****
314   #     test -d lib/auto || mkdir lib/auto
315   #
316   preplibrary: miniperl lib/Config.pm
317 !       @./makedir lib/auto
318         @echo " AutoSplitting perl library"
319         @./miniperl -Ilib -e 'use AutoSplit; \
320                 autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm
321 --- 300,306 ----
322   #     test -d lib/auto || mkdir lib/auto
323   #
324   preplibrary: miniperl lib/Config.pm
325 !       @sh ./makedir lib/auto
326         @echo " AutoSplitting perl library"
327         @./miniperl -Ilib -e 'use AutoSplit; \
328                 autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm
329 ***************
330 *** 339,346 ****
331         @sh ext/util/make_ext static $@ LIBPERL_A=$(perllib)
332   
333   clean:
334 !       rm -f *.o *.a all perlmain.c
335         rm -f perl.exp ext.libs
336         -cd x2p; $(MAKE) clean
337         -cd pod; $(MAKE) clean
338         -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
339 --- 381,389 ----
340         @sh ext/util/make_ext static $@ LIBPERL_A=$(perllib)
341   
342   clean:
343 !       rm -f *$(O) *$(A) all perlmain.c
344         rm -f perl.exp ext.libs
345 +       -rm perl.export perl.dll perl.libexp perl.map perl.def
346         -cd x2p; $(MAKE) clean
347         -cd pod; $(MAKE) clean
348         -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
349 ***************
350 *** 356,362 ****
351         done
352         rm -f *.orig */*.orig *~ */*~ core t/core t/c t/perl
353         rm -rf $(addedbyconf)
354 !       rm -f makefile makefile.old
355         rm -f $(private)
356         rm -rf lib/auto
357         rm -f lib/.exists
358 --- 399,405 ----
359         done
360         rm -f *.orig */*.orig *~ */*~ core t/core t/c t/perl
361         rm -rf $(addedbyconf)
362 !       rm -f $(firstmakefile) makefile.old
363         rm -f $(private)
364         rm -rf lib/auto
365         rm -f lib/.exists
366 ***************
367 *** 377,383 ****
368   lint: perly.c $(c)
369         lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz
370   
371 ! makefile:     Makefile
372         $(MAKE) depend
373   
374   config.h: config.sh
375 --- 420,426 ----
376   lint: perly.c $(c)
377         lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz
378   
379 ! $(firstmakefile):     Makefile
380         $(MAKE) depend
381   
382   config.h: config.sh
383 ***************
384 *** 385,401 ****
385   
386   # When done, touch perlmain.c so that it doesn't get remade each time.
387   depend: makedepend
388 !       ./makedepend
389         - test -s perlmain.c && touch perlmain.c
390         cd x2p; $(MAKE) depend
391   
392   test: miniperl perl preplibrary $(dynamic_ext)
393         - cd t && chmod +x TEST */*.t
394 !       - cd t && (rm -f perl; $(LNS) ../perl perl) && ./perl TEST </dev/tty
395   
396   minitest: miniperl
397         - cd t && chmod +x TEST */*.t
398 !       - cd t && (rm -f perl; $(LNS) ../miniperl perl) \
399                 && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t </dev/tty
400   
401   clist:        $(c)
402 --- 428,444 ----
403   
404   # When done, touch perlmain.c so that it doesn't get remade each time.
405   depend: makedepend
406 !       sh ./makedepend
407         - test -s perlmain.c && touch perlmain.c
408         cd x2p; $(MAKE) depend
409   
410   test: miniperl perl preplibrary $(dynamic_ext)
411         - cd t && chmod +x TEST */*.t
412 !       - cd t && (rm -f perl$(exe_ext); $(LNS) ../perl$(exe_ext) perl$(exe_ext)) && ./perl TEST </dev/tty
413   
414   minitest: miniperl
415         - cd t && chmod +x TEST */*.t
416 !       - cd t && (rm -f perl$(exe_ext); $(LNS) ../miniperl$(exe_ext) perl$(exe_ext)) \
417                 && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t </dev/tty
418   
419   clist:        $(c)
420 ***************
421 *** 415,421 ****
422   case `pwd` in
423   *SH)
424       $rm -f ../Makefile
425 !     ln Makefile ../Makefile
426       ;;
427   esac
428 ! rm -f makefile
429 --- 458,464 ----
430   case `pwd` in
431   *SH)
432       $rm -f ../Makefile
433 !     $ln Makefile ../Makefile
434       ;;
435   esac
436 ! rm -f $firstmakefile