perl 1.0 patch 14: a2p incorrectly translates 'for (a in b)' construct.
[p5sagit/p5-mst-13.2.git] / Makefile.SH
CommitLineData
8d063cd8 1case $CONFIG in
2'')
3 if test ! -f config.sh; then
4 ln ../config.sh . || \
5 ln ../../config.sh . || \
6 ln ../../../config.sh . || \
7 (echo "Can't find config.sh."; exit 1)
8 fi
9 . config.sh
10 ;;
11esac
12case "$0" in
13*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
14esac
2e1b3b7e 15
16case "$d_symlink" in
17*define*) sln='ln -s' ;;
18*) sln='ln';;
19esac
20
8d063cd8 21echo "Extracting Makefile (with variable substitutions)"
22cat >Makefile <<!GROK!THIS!
2e1b3b7e 23# $Header: Makefile.SH,v 1.0.1.5 88/02/02 11:20:49 root Exp $
8d063cd8 24#
25# $Log: Makefile.SH,v $
2e1b3b7e 26# Revision 1.0.1.5 88/02/02 11:20:49 root
27# patch13: added d_symlink dependency, changed TEST to ./perl TEST.
28#
a559c259 29# Revision 1.0.1.4 88/01/28 10:17:59 root
30# patch8: added perldb.man
31#
a1cc2bdc 32# Revision 1.0.1.3 88/01/26 14:14:52 root
33# Added mallocsrc stuff.
34#
fdf95cbb 35# Revision 1.0.1.2 88/01/26 08:46:04 root
36# patch 4: make depend didn't work right if . wasn't in PATH.
37#
135863df 38# Revision 1.0.1.1 88/01/24 03:55:18 root
39# patch 2: remove extra Log lines.
8d063cd8 40#
135863df 41# Revision 1.0 87/12/18 16:11:50 root
8d063cd8 42# Initial revision
43#
8d063cd8 44
45CC = $cc
46bin = $bin
47lib = $lib
48mansrc = $mansrc
49manext = $manext
50CFLAGS = $ccflags -O
51LDFLAGS = $ldflags
52SMALL = $small
53LARGE = $large $split
a1cc2bdc 54mallocsrc = $mallocsrc
55mallocobj = $mallocobj
2e1b3b7e 56SLN = $sln
8d063cd8 57
58libs = $libnm -lm
59!GROK!THIS!
60
61cat >>Makefile <<'!NO!SUBS!'
62
a559c259 63public = perl perldb
8d063cd8 64
65private =
66
a559c259 67manpages = perl.man perldb.man
8d063cd8 68
69util =
70
71sh = Makefile.SH makedepend.SH
72
73h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h form.h handy.h
74h2 = hash.h perl.h search.h spat.h stab.h str.h util.h
75
76h = $(h1) $(h2)
77
a1cc2bdc 78c1 = arg.c array.c cmd.c dump.c form.c hash.c $(mallocsrc)
8d063cd8 79c2 = search.c stab.c str.c util.c version.c
80
81c = $(c1) $(c2)
82
a1cc2bdc 83obj1 = arg.o array.o cmd.o dump.o form.o hash.o $(mallocobj)
8d063cd8 84obj2 = search.o stab.o str.o util.o version.o
85
86obj = $(obj1) $(obj2)
87
88lintflags = -phbvxac
89
90addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
91
92# grrr
93SHELL = /bin/sh
94
95.c.o:
96 $(CC) -c $(CFLAGS) $(LARGE) $*.c
97
98all: $(public) $(private) $(util)
99 touch all
100
101perl: $(obj) perl.o
102 $(CC) $(LDFLAGS) $(LARGE) $(obj) perl.o $(libs) -o perl
103
104perl.c: perl.y
105 @ echo Expect 2 shift/reduce errors...
106 yacc perl.y
107 mv y.tab.c perl.c
108
109perl.o: perl.c perly.c perl.h EXTERN.h search.h util.h INTERN.h handy.h
110 $(CC) -c $(CFLAGS) $(LARGE) perl.c
111
112# if a .h file depends on another .h file...
113$(h):
114 touch $@
115
116perl.man: perl.man.1 perl.man.2
117 cat perl.man.1 perl.man.2 >perl.man
118
119install: perl perl.man
120# won't work with csh
121 export PATH || exit 1
122 - mv $(bin)/perl $(bin)/perl.old
123 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
124 cd $(bin); \
125for pub in $(public); do \
126chmod 755 `basename $$pub`; \
127done
128 - test $(bin) = /bin || rm -f /bin/perl
129 - test $(bin) = /bin || ln -s $(bin)/perl /bin || cp $(bin)/perl /bin
130# chmod 755 makedir
131# - makedir `filexp $(lib)`
132# - \
133#if test `pwd` != `filexp $(lib)`; then \
134#cp $(private) `filexp $(lib)`; \
135#fi
136# cd `filexp $(lib)`; \
137#for priv in $(private); do \
138#chmod 755 `basename $$priv`; \
139#done
140 - if test `pwd` != $(mansrc); then \
141for page in $(manpages); do \
142cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
143done; \
144fi
145
146clean:
147 rm -f *.o
148
149realclean:
150 rm -f perl *.orig */*.orig *.o core $(addedbyconf)
151
152# The following lint has practically everything turned on. Unfortunately,
153# you have to wade through a lot of mumbo jumbo that can't be suppressed.
154# If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
155# for that spot.
156
157lint:
158 lint $(lintflags) $(defs) $(c) > perl.fuzz
159
160depend: makedepend
fdf95cbb 161 ./makedepend
8d063cd8 162
163test: perl
164 chmod 755 t/TEST t/base.* t/comp.* t/cmd.* t/io.* t/op.*
2e1b3b7e 165 cd t && (rm -f perl; $(SLN) ../perl .) && ./perl TEST
8d063cd8 166
167clist:
168 echo $(c) | tr ' ' '\012' >.clist
169
170hlist:
171 echo $(h) | tr ' ' '\012' >.hlist
172
173shlist:
174 echo $(sh) | tr ' ' '\012' >.shlist
175
176# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
177$(obj):
178 @ echo "You haven't done a "'"make depend" yet!'; exit 1
179makedepend: makedepend.SH
180 /bin/sh makedepend.SH
181!NO!SUBS!
182$eunicefix Makefile
183case `pwd` in
184*SH)
185 $rm -f ../Makefile
186 ln Makefile ../Makefile
187 ;;
188esac