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.6 90/10/16 11:28:18 lwall Locked $
23 # $Log: Makefile.SH,v $
24 # Revision 3.0.1.6 90/10/16 11:28:18 lwall
25 # patch29: various portability fixes
27 # Revision 3.0.1.5 90/08/13 22:41:05 lwall
28 # patch28: shift/reduce count was off for a2p's Makefile
30 # Revision 3.0.1.4 90/03/01 10:28:09 lwall
31 # patch9: a2p didn't allow logical expressions everywhere it should
33 # Revision 3.0.1.3 89/12/21 20:29:00 lwall
34 # patch7: Configure now lets you pick between yacc or bison
36 # Revision 3.0.1.2 89/11/17 15:49:55 lwall
37 # patch: in x2p/Makefile.SH, removed reference to nm library
39 # Revision 3.0.1.1 89/10/26 23:29:11 lwall
40 # patch1: in x2p/Makefile.SH, added dependency on ../config.sh
42 # Revision 3.0 89/10/18 15:33:52 lwall
45 # Revision 2.0.1.2 88/09/07 17:13:30 lwall
46 # patch14: added redirection of stderr to /dev/null
48 # Revision 2.0.1.1 88/07/11 23:13:39 root
49 # patch2: now expects more shift/reduce errors
51 # Revision 2.0 88/06/05 00:15:31 root
52 # Baseline version 2.0.
62 CFLAGS = $ccflags $optimize
66 mallocsrc = $mallocsrc
67 mallocobj = $mallocobj
72 cat >>Makefile <<'!NO!SUBS!'
78 manpages = a2p.man s2p.man
82 sh = Makefile.SH makedepend.SH
84 h = EXTERN.h INTERN.h config.h handy.h hash.h a2p.h str.h util.h
86 c = hash.c $(mallocsrc) str.c util.c walk.c
88 obj = hash.o $(mallocobj) str.o util.o walk.o
92 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
98 $(CC) -c $(CFLAGS) $(LARGE) $*.c
100 all: $(public) $(private) $(util)
104 $(CC) $(LARGE) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
107 @ echo Expect 226 shift/reduce conflicts...
111 a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
112 $(CC) -c $(CFLAGS) $(LARGE) a2p.c
115 # won't work with csh
116 export PATH || exit 1
117 - mv $(bin)/a2p $(bin)/a2p.old 2>/dev/null
118 - mv $(bin)/s2p $(bin)/s2p.old 2>/dev/null
119 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
121 for pub in $(public); do \
122 chmod +x `basename $$pub`; \
125 # - ./makedir `filexp $(lib)`
127 #if test `pwd` != `filexp $(lib)`; then \
128 #cp $(private) `filexp $(lib)`; \
130 # cd `filexp $(lib)`; \
131 #for priv in $(private); do \
132 #chmod +x `basename $$priv`; \
134 - if test `pwd` != $(mansrc); then \
135 for page in $(manpages); do \
136 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
144 rm -f a2p *.orig */*.orig core $(addedbyconf) a2p.c s2p all
146 # The following lint has practically everything turned on. Unfortunately,
147 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
148 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
152 lint $(lintflags) $(defs) $(c) > a2p.fuzz
154 depend: ../makedepend
158 echo $(c) | tr ' ' '\012' >.clist
161 echo $(h) | tr ' ' '\012' >.hlist
164 echo $(sh) | tr ' ' '\012' >.shlist
166 config.sh: ../config.sh
170 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
172 @ echo "You haven't done a "'"make depend" yet!'; exit 1
173 makedepend: makedepend.SH
174 /bin/sh makedepend.SH
180 ln Makefile ../Makefile