3 if test ! -f config.sh; then
5 ln ../../config.sh . || \
6 ln ../../../config.sh . || \
7 (echo "Can't find config.sh."; exit 1)
13 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
15 echo "Extracting Makefile (with variable substitutions)"
16 cat >Makefile <<!GROK!THIS!
17 # $Header: Makefile.SH,v 1.0.1.4 88/01/28 10:17:59 root Exp $
19 # $Log: Makefile.SH,v $
20 # Revision 1.0.1.4 88/01/28 10:17:59 root
21 # patch8: added perldb.man
23 # Revision 1.0.1.3 88/01/26 14:14:52 root
24 # Added mallocsrc stuff.
26 # Revision 1.0.1.2 88/01/26 08:46:04 root
27 # patch 4: make depend didn't work right if . wasn't in PATH.
29 # Revision 1.0.1.1 88/01/24 03:55:18 root
30 # patch 2: remove extra Log lines.
32 # Revision 1.0 87/12/18 16:11:50 root
45 mallocsrc = $mallocsrc
46 mallocobj = $mallocobj
51 cat >>Makefile <<'!NO!SUBS!'
57 manpages = perl.man perldb.man
61 sh = Makefile.SH makedepend.SH
63 h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h form.h handy.h
64 h2 = hash.h perl.h search.h spat.h stab.h str.h util.h
68 c1 = arg.c array.c cmd.c dump.c form.c hash.c $(mallocsrc)
69 c2 = search.c stab.c str.c util.c version.c
73 obj1 = arg.o array.o cmd.o dump.o form.o hash.o $(mallocobj)
74 obj2 = search.o stab.o str.o util.o version.o
80 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
86 $(CC) -c $(CFLAGS) $(LARGE) $*.c
88 all: $(public) $(private) $(util)
92 $(CC) $(LDFLAGS) $(LARGE) $(obj) perl.o $(libs) -o perl
95 @ echo Expect 2 shift/reduce errors...
99 perl.o: perl.c perly.c perl.h EXTERN.h search.h util.h INTERN.h handy.h
100 $(CC) -c $(CFLAGS) $(LARGE) perl.c
102 # if a .h file depends on another .h file...
106 perl.man: perl.man.1 perl.man.2
107 cat perl.man.1 perl.man.2 >perl.man
109 install: perl perl.man
110 # won't work with csh
111 export PATH || exit 1
112 - mv $(bin)/perl $(bin)/perl.old
113 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
115 for pub in $(public); do \
116 chmod 755 `basename $$pub`; \
118 - test $(bin) = /bin || rm -f /bin/perl
119 - test $(bin) = /bin || ln -s $(bin)/perl /bin || cp $(bin)/perl /bin
121 # - makedir `filexp $(lib)`
123 #if test `pwd` != `filexp $(lib)`; then \
124 #cp $(private) `filexp $(lib)`; \
126 # cd `filexp $(lib)`; \
127 #for priv in $(private); do \
128 #chmod 755 `basename $$priv`; \
130 - if test `pwd` != $(mansrc); then \
131 for page in $(manpages); do \
132 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
140 rm -f perl *.orig */*.orig *.o core $(addedbyconf)
142 # The following lint has practically everything turned on. Unfortunately,
143 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
144 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
148 lint $(lintflags) $(defs) $(c) > perl.fuzz
154 chmod 755 t/TEST t/base.* t/comp.* t/cmd.* t/io.* t/op.*
155 cd t && (rm -f perl; ln -s ../perl . || ln ../perl .) && TEST
158 echo $(c) | tr ' ' '\012' >.clist
161 echo $(h) | tr ' ' '\012' >.hlist
164 echo $(sh) | tr ' ' '\012' >.shlist
166 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
168 @ echo "You haven't done a "'"make depend" yet!'; exit 1
169 makedepend: makedepend.SH
170 /bin/sh makedepend.SH
176 ln Makefile ../Makefile