2 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
6 if test ! -f config.sh; then
8 ln ../../config.sh . || \
9 ln ../../../config.sh . || \
10 (echo "Can't find config.sh."; exit 1)
17 *) mallocsrc="../$mallocsrc";;
19 echo "Extracting x2p/Makefile (with variable substitutions)"
20 cat >Makefile <<!GROK!THIS!
21 # $Header: Makefile.SH,v 3.0.1.4 90/03/01 10:28:09 lwall Locked $
23 # $Log: Makefile.SH,v $
24 # Revision 3.0.1.4 90/03/01 10:28:09 lwall
25 # patch9: a2p didn't allow logical expressions everywhere it should
27 # Revision 3.0.1.3 89/12/21 20:29:00 lwall
28 # patch7: Configure now lets you pick between yacc or bison
30 # Revision 3.0.1.2 89/11/17 15:49:55 lwall
31 # patch: in x2p/Makefile.SH, removed reference to nm library
33 # Revision 3.0.1.1 89/10/26 23:29:11 lwall
34 # patch1: in x2p/Makefile.SH, added dependency on ../config.sh
36 # Revision 3.0 89/10/18 15:33:52 lwall
39 # Revision 2.0.1.2 88/09/07 17:13:30 lwall
40 # patch14: added redirection of stderr to /dev/null
42 # Revision 2.0.1.1 88/07/11 23:13:39 root
43 # patch2: now expects more shift/reduce errors
45 # Revision 2.0 88/06/05 00:15:31 root
46 # Baseline version 2.0.
56 CFLAGS = $ccflags $optimize
60 mallocsrc = $mallocsrc
61 mallocobj = $mallocobj
66 cat >>Makefile <<'!NO!SUBS!'
72 manpages = a2p.man s2p.man
76 sh = Makefile.SH makedepend.SH
78 h = EXTERN.h INTERN.h config.h handy.h hash.h a2p.h str.h util.h
80 c = hash.c $(mallocsrc) str.c util.c walk.c
82 obj = hash.o $(mallocobj) str.o util.o walk.o
86 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
92 $(CC) -c $(CFLAGS) $(LARGE) $*.c
94 all: $(public) $(private) $(util)
98 $(CC) $(LARGE) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
101 @ echo Expect 232 shift/reduce conflicts...
105 a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h
106 $(CC) -c $(CFLAGS) $(LARGE) a2p.c
109 # won't work with csh
110 export PATH || exit 1
111 - mv $(bin)/a2p $(bin)/a2p.old 2>/dev/null
112 - mv $(bin)/s2p $(bin)/s2p.old 2>/dev/null
113 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
115 for pub in $(public); do \
116 chmod +x `basename $$pub`; \
119 # - ./makedir `filexp $(lib)`
121 #if test `pwd` != `filexp $(lib)`; then \
122 #cp $(private) `filexp $(lib)`; \
124 # cd `filexp $(lib)`; \
125 #for priv in $(private); do \
126 #chmod +x `basename $$priv`; \
128 - if test `pwd` != $(mansrc); then \
129 for page in $(manpages); do \
130 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
138 rm -f a2p *.orig */*.orig *.o core $(addedbyconf)
140 # The following lint has practically everything turned on. Unfortunately,
141 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
142 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
146 lint $(lintflags) $(defs) $(c) > a2p.fuzz
148 depend: ../makedepend
152 echo $(c) | tr ' ' '\012' >.clist
155 echo $(h) | tr ' ' '\012' >.hlist
158 echo $(sh) | tr ' ' '\012' >.shlist
160 config.sh: ../config.sh
164 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
166 @ echo "You haven't done a "'"make depend" yet!'; exit 1
167 makedepend: makedepend.SH
168 /bin/sh makedepend.SH
174 ln Makefile ../Makefile