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