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.2 88/01/26 08:46:04 root Exp $
19 # $Log: Makefile.SH,v $
20 # Revision 1.0.1.2 88/01/26 08:46:04 root
21 # patch 4: make depend didn't work right if . wasn't in PATH.
23 # Revision 1.0.1.1 88/01/24 03:55:18 root
24 # patch 2: remove extra Log lines.
26 # Revision 1.0 87/12/18 16:11:50 root
43 cat >>Makefile <<'!NO!SUBS!'
53 sh = Makefile.SH makedepend.SH
55 h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h form.h handy.h
56 h2 = hash.h perl.h search.h spat.h stab.h str.h util.h
60 c1 = arg.c array.c cmd.c dump.c form.c hash.c malloc.c
61 c2 = search.c stab.c str.c util.c version.c
65 obj1 = arg.o array.o cmd.o dump.o form.o hash.o malloc.o
66 obj2 = search.o stab.o str.o util.o version.o
72 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
78 $(CC) -c $(CFLAGS) $(LARGE) $*.c
80 all: $(public) $(private) $(util)
84 $(CC) $(LDFLAGS) $(LARGE) $(obj) perl.o $(libs) -o perl
87 @ echo Expect 2 shift/reduce errors...
91 perl.o: perl.c perly.c perl.h EXTERN.h search.h util.h INTERN.h handy.h
92 $(CC) -c $(CFLAGS) $(LARGE) perl.c
94 # if a .h file depends on another .h file...
98 perl.man: perl.man.1 perl.man.2
99 cat perl.man.1 perl.man.2 >perl.man
101 install: perl perl.man
102 # won't work with csh
103 export PATH || exit 1
104 - mv $(bin)/perl $(bin)/perl.old
105 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
107 for pub in $(public); do \
108 chmod 755 `basename $$pub`; \
110 - test $(bin) = /bin || rm -f /bin/perl
111 - test $(bin) = /bin || ln -s $(bin)/perl /bin || cp $(bin)/perl /bin
113 # - makedir `filexp $(lib)`
115 #if test `pwd` != `filexp $(lib)`; then \
116 #cp $(private) `filexp $(lib)`; \
118 # cd `filexp $(lib)`; \
119 #for priv in $(private); do \
120 #chmod 755 `basename $$priv`; \
122 - if test `pwd` != $(mansrc); then \
123 for page in $(manpages); do \
124 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
132 rm -f perl *.orig */*.orig *.o core $(addedbyconf)
134 # The following lint has practically everything turned on. Unfortunately,
135 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
136 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
140 lint $(lintflags) $(defs) $(c) > perl.fuzz
146 chmod 755 t/TEST t/base.* t/comp.* t/cmd.* t/io.* t/op.*
147 cd t && (rm -f perl; ln -s ../perl . || ln ../perl .) && TEST
150 echo $(c) | tr ' ' '\012' >.clist
153 echo $(h) | tr ' ' '\012' >.hlist
156 echo $(sh) | tr ' ' '\012' >.shlist
158 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
160 @ echo "You haven't done a "'"make depend" yet!'; exit 1
161 makedepend: makedepend.SH
162 /bin/sh makedepend.SH
168 ln Makefile ../Makefile