2 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
6 if test ! -f config.sh; then
8 ln -s ../config.sh . || \
9 ln ../../config.sh . || \
10 ln ../../../config.sh . || \
11 (echo "Can't find config.sh."; exit 1)
16 echo "Extracting x2p/Makefile (with variable substitutions)"
17 cat >Makefile <<!GROK!THIS!
18 # $RCSfile: Makefile.SH,v $$Revision: 4.0.1.2 $$Date: 91/11/05 19:19:04 $
20 # $Log: Makefile.SH,v $
21 # Revision 4.0.1.2 91/11/05 19:19:04 lwall
22 # patch11: random cleanup
24 # Revision 4.0.1.1 91/06/07 12:12:14 lwall
25 # patch4: cflags now emits entire cc command except for the filename
27 # Revision 4.0 91/03/20 01:57:03 lwall
41 mallocsrc = $mallocsrc
42 mallocobj = $mallocobj
47 cat >>Makefile <<'!NO!SUBS!'
49 CCCMD = `sh cflags $@`
51 public = a2p s2p find2perl
55 manpages = a2p.man s2p.man
59 sh = Makefile.SH makedepend.SH
61 h = EXTERN.h INTERN.h config.h handy.h hash.h a2p.h str.h util.h
63 c = hash.c $(mallocsrc) str.c util.c walk.c
65 obj = hash.o $(mallocobj) str.o util.o walk.o
69 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
77 all: $(public) $(private) $(util)
81 $(CC) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
84 @ echo Expect 226 shift/reduce conflicts...
88 a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
89 $(CCCMD) $(LARGE) a2p.c
94 - mv $(bin)/a2p $(bin)/a2p.old 2>/dev/null
95 - mv $(bin)/s2p $(bin)/s2p.old 2>/dev/null
96 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
98 for pub in $(public); do \
99 chmod +x `basename $$pub`; \
101 - if test `pwd` != $(mansrc); then \
102 for page in $(manpages); do \
103 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
111 rm -f *.orig */*.orig core $(addedbyconf) a2p.c s2p find2perl all cflags
113 # The following lint has practically everything turned on. Unfortunately,
114 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
115 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
119 lint $(lintflags) $(defs) $(c) > a2p.fuzz
121 depend: $(mallocsrc) ../makedepend
125 echo $(c) | tr ' ' '\012' >.clist
128 echo $(h) | tr ' ' '\012' >.hlist
131 echo $(sh) | tr ' ' '\012' >.shlist
133 config.sh: ../config.sh
137 malloc.c: ../malloc.c
138 sed 's/"perl.h"/"..\/perl.h"/' ../malloc.c >malloc.c
140 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
142 @ echo "You haven't done a "'"make depend" yet!'; exit 1
143 makedepend: makedepend.SH
144 /bin/sh makedepend.SH
150 ln Makefile ../Makefile