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\(.*\)/'` ;;
17 *define*) sln='ln -s' ;;
21 echo "Extracting Makefile (with variable substitutions)"
22 cat >Makefile <<!GROK!THIS!
23 # $Header: Makefile.SH,v 1.0.1.5 88/02/02 11:20:49 root Exp $
25 # $Log: Makefile.SH,v $
26 # Revision 1.0.1.5 88/02/02 11:20:49 root
27 # patch13: added d_symlink dependency, changed TEST to ./perl TEST.
29 # Revision 1.0.1.4 88/01/28 10:17:59 root
30 # patch8: added perldb.man
32 # Revision 1.0.1.3 88/01/26 14:14:52 root
33 # Added mallocsrc stuff.
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.
38 # Revision 1.0.1.1 88/01/24 03:55:18 root
39 # patch 2: remove extra Log lines.
41 # Revision 1.0 87/12/18 16:11:50 root
54 mallocsrc = $mallocsrc
55 mallocobj = $mallocobj
61 cat >>Makefile <<'!NO!SUBS!'
67 manpages = perl.man perldb.man
71 sh = Makefile.SH makedepend.SH
73 h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h form.h handy.h
74 h2 = hash.h perl.h search.h spat.h stab.h str.h util.h
78 c1 = arg.c array.c cmd.c dump.c form.c hash.c $(mallocsrc)
79 c2 = search.c stab.c str.c util.c version.c
83 obj1 = arg.o array.o cmd.o dump.o form.o hash.o $(mallocobj)
84 obj2 = search.o stab.o str.o util.o version.o
90 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
96 $(CC) -c $(CFLAGS) $(LARGE) $*.c
98 all: $(public) $(private) $(util)
102 $(CC) $(LDFLAGS) $(LARGE) $(obj) perl.o $(libs) -o perl
105 @ echo Expect 2 shift/reduce errors...
109 perl.o: perl.c perly.c perl.h EXTERN.h search.h util.h INTERN.h handy.h
110 $(CC) -c $(CFLAGS) $(LARGE) perl.c
112 # if a .h file depends on another .h file...
116 perl.man: perl.man.1 perl.man.2
117 cat perl.man.1 perl.man.2 >perl.man
119 install: 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
125 for pub in $(public); do \
126 chmod 755 `basename $$pub`; \
128 - test $(bin) = /bin || rm -f /bin/perl
129 - test $(bin) = /bin || ln -s $(bin)/perl /bin || cp $(bin)/perl /bin
131 # - makedir `filexp $(lib)`
133 #if test `pwd` != `filexp $(lib)`; then \
134 #cp $(private) `filexp $(lib)`; \
136 # cd `filexp $(lib)`; \
137 #for priv in $(private); do \
138 #chmod 755 `basename $$priv`; \
140 - if test `pwd` != $(mansrc); then \
141 for page in $(manpages); do \
142 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
150 rm -f perl *.orig */*.orig *.o core $(addedbyconf)
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
158 lint $(lintflags) $(defs) $(c) > perl.fuzz
164 chmod 755 t/TEST t/base.* t/comp.* t/cmd.* t/io.* t/op.*
165 cd t && (rm -f perl; $(SLN) ../perl .) && ./perl TEST
168 echo $(c) | tr ' ' '\012' >.clist
171 echo $(h) | tr ' ' '\012' >.hlist
174 echo $(sh) | tr ' ' '\012' >.shlist
176 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
178 @ echo "You haven't done a "'"make depend" yet!'; exit 1
179 makedepend: makedepend.SH
180 /bin/sh makedepend.SH
186 ln Makefile ../Makefile