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 87/12/18 16:11:50 root Exp $
19 # $Log: Makefile.SH,v $
20 # Revision 1.0 87/12/18 16:11:50 root
23 # Revision 1.0 87/12/18 16:01:07 root
41 cat >>Makefile <<'!NO!SUBS!'
51 sh = Makefile.SH makedepend.SH
53 h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h form.h handy.h
54 h2 = hash.h perl.h search.h spat.h stab.h str.h util.h
58 c1 = arg.c array.c cmd.c dump.c form.c hash.c malloc.c
59 c2 = search.c stab.c str.c util.c version.c
63 obj1 = arg.o array.o cmd.o dump.o form.o hash.o malloc.o
64 obj2 = search.o stab.o str.o util.o version.o
70 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
76 $(CC) -c $(CFLAGS) $(LARGE) $*.c
78 all: $(public) $(private) $(util)
82 $(CC) $(LDFLAGS) $(LARGE) $(obj) perl.o $(libs) -o perl
85 @ echo Expect 2 shift/reduce errors...
89 perl.o: perl.c perly.c perl.h EXTERN.h search.h util.h INTERN.h handy.h
90 $(CC) -c $(CFLAGS) $(LARGE) perl.c
92 # if a .h file depends on another .h file...
96 perl.man: perl.man.1 perl.man.2
97 cat perl.man.1 perl.man.2 >perl.man
99 install: perl perl.man
100 # won't work with csh
101 export PATH || exit 1
102 - mv $(bin)/perl $(bin)/perl.old
103 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
105 for pub in $(public); do \
106 chmod 755 `basename $$pub`; \
108 - test $(bin) = /bin || rm -f /bin/perl
109 - test $(bin) = /bin || ln -s $(bin)/perl /bin || cp $(bin)/perl /bin
111 # - makedir `filexp $(lib)`
113 #if test `pwd` != `filexp $(lib)`; then \
114 #cp $(private) `filexp $(lib)`; \
116 # cd `filexp $(lib)`; \
117 #for priv in $(private); do \
118 #chmod 755 `basename $$priv`; \
120 - if test `pwd` != $(mansrc); then \
121 for page in $(manpages); do \
122 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
130 rm -f perl *.orig */*.orig *.o core $(addedbyconf)
132 # The following lint has practically everything turned on. Unfortunately,
133 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
134 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
138 lint $(lintflags) $(defs) $(c) > perl.fuzz
144 chmod 755 t/TEST t/base.* t/comp.* t/cmd.* t/io.* t/op.*
145 cd t && (rm -f perl; ln -s ../perl . || ln ../perl .) && TEST
148 echo $(c) | tr ' ' '\012' >.clist
151 echo $(h) | tr ' ' '\012' >.hlist
154 echo $(sh) | tr ' ' '\012' >.shlist
156 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
158 @ echo "You haven't done a "'"make depend" yet!'; exit 1
159 makedepend: makedepend.SH
160 /bin/sh makedepend.SH
166 ln Makefile ../Makefile