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