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)
18 *) mallocsrc="../$mallocsrc";;
20 echo "Extracting x2p/Makefile (with variable substitutions)"
21 cat >Makefile <<!GROK!THIS!
22 # $RCSfile: Makefile.SH,v $$Revision: 4.0.1.1 $$Date: 91/06/07 12:12:14 $
24 # $Log: Makefile.SH,v $
25 # Revision 4.0.1.1 91/06/07 12:12:14 lwall
26 # patch4: cflags now emits entire cc command except for the filename
28 # Revision 4.0 91/03/20 01:57:03 lwall
42 mallocsrc = $mallocsrc
43 mallocobj = $mallocobj
48 cat >>Makefile <<'!NO!SUBS!'
50 CCCMD = `sh cflags $@`
52 public = a2p s2p find2perl
56 manpages = a2p.man s2p.man
60 sh = Makefile.SH makedepend.SH
62 h = EXTERN.h INTERN.h config.h handy.h hash.h a2p.h str.h util.h
64 c = hash.c $(mallocsrc) str.c util.c walk.c
66 obj = hash.o $(mallocobj) str.o util.o walk.o
70 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
78 all: $(public) $(private) $(util)
82 $(CC) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
85 @ echo Expect 226 shift/reduce conflicts...
89 a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
90 $(CCCMD) $(LARGE) a2p.c
95 - mv $(bin)/a2p $(bin)/a2p.old 2>/dev/null
96 - mv $(bin)/s2p $(bin)/s2p.old 2>/dev/null
97 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
99 for pub in $(public); do \
100 chmod +x `basename $$pub`; \
102 - if test `pwd` != $(mansrc); then \
103 for page in $(manpages); do \
104 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
112 rm -f *.orig */*.orig core $(addedbyconf) a2p.c s2p find2perl all cflags
114 # The following lint has practically everything turned on. Unfortunately,
115 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
116 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
120 lint $(lintflags) $(defs) $(c) > a2p.fuzz
122 depend: ../makedepend
126 echo $(c) | tr ' ' '\012' >.clist
129 echo $(h) | tr ' ' '\012' >.hlist
132 echo $(sh) | tr ' ' '\012' >.shlist
134 config.sh: ../config.sh
138 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
140 @ echo "You haven't done a "'"make depend" yet!'; exit 1
141 makedepend: makedepend.SH
142 /bin/sh makedepend.SH
148 ln Makefile ../Makefile