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.3 88/01/26 14:14:52 root Exp $
19 # $Log: Makefile.SH,v $
20 # Revision 1.0.1.3 88/01/26 14:14:52 root
21 # Added mallocsrc stuff.
23 # Revision 1.0.1.2 88/01/26 08:46:04 root
24 # patch 4: make depend didn't work right if . wasn't in PATH.
26 # Revision 1.0.1.1 88/01/24 03:55:18 root
27 # patch 2: remove extra Log lines.
29 # Revision 1.0 87/12/18 16:11:50 root
42 mallocsrc = $mallocsrc
43 mallocobj = $mallocobj
48 cat >>Makefile <<'!NO!SUBS!'
58 sh = Makefile.SH makedepend.SH
60 h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h form.h handy.h
61 h2 = hash.h perl.h search.h spat.h stab.h str.h util.h
65 c1 = arg.c array.c cmd.c dump.c form.c hash.c $(mallocsrc)
66 c2 = search.c stab.c str.c util.c version.c
70 obj1 = arg.o array.o cmd.o dump.o form.o hash.o $(mallocobj)
71 obj2 = search.o stab.o str.o util.o version.o
77 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
83 $(CC) -c $(CFLAGS) $(LARGE) $*.c
85 all: $(public) $(private) $(util)
89 $(CC) $(LDFLAGS) $(LARGE) $(obj) perl.o $(libs) -o perl
92 @ echo Expect 2 shift/reduce errors...
96 perl.o: perl.c perly.c perl.h EXTERN.h search.h util.h INTERN.h handy.h
97 $(CC) -c $(CFLAGS) $(LARGE) perl.c
99 # if a .h file depends on another .h file...
103 perl.man: perl.man.1 perl.man.2
104 cat perl.man.1 perl.man.2 >perl.man
106 install: perl perl.man
107 # won't work with csh
108 export PATH || exit 1
109 - mv $(bin)/perl $(bin)/perl.old
110 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
112 for pub in $(public); do \
113 chmod 755 `basename $$pub`; \
115 - test $(bin) = /bin || rm -f /bin/perl
116 - test $(bin) = /bin || ln -s $(bin)/perl /bin || cp $(bin)/perl /bin
118 # - makedir `filexp $(lib)`
120 #if test `pwd` != `filexp $(lib)`; then \
121 #cp $(private) `filexp $(lib)`; \
123 # cd `filexp $(lib)`; \
124 #for priv in $(private); do \
125 #chmod 755 `basename $$priv`; \
127 - if test `pwd` != $(mansrc); then \
128 for page in $(manpages); do \
129 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
137 rm -f perl *.orig */*.orig *.o core $(addedbyconf)
139 # The following lint has practically everything turned on. Unfortunately,
140 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
141 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
145 lint $(lintflags) $(defs) $(c) > perl.fuzz
151 chmod 755 t/TEST t/base.* t/comp.* t/cmd.* t/io.* t/op.*
152 cd t && (rm -f perl; ln -s ../perl . || ln ../perl .) && TEST
155 echo $(c) | tr ' ' '\012' >.clist
158 echo $(h) | tr ' ' '\012' >.hlist
161 echo $(sh) | tr ' ' '\012' >.shlist
163 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
165 @ echo "You haven't done a "'"make depend" yet!'; exit 1
166 makedepend: makedepend.SH
167 /bin/sh makedepend.SH
173 ln Makefile ../Makefile