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.3 89/12/21 20:29:00 lwall Locked $
23 # $Log: Makefile.SH,v $
24 # Revision 3.0.1.3 89/12/21 20:29:00 lwall
25 # patch7: Configure now lets you pick between yacc or bison
27 # Revision 3.0.1.2 89/11/17 15:49:55 lwall
28 # patch: in x2p/Makefile.SH, removed reference to nm library
30 # Revision 3.0.1.1 89/10/26 23:29:11 lwall
31 # patch1: in x2p/Makefile.SH, added dependency on ../config.sh
33 # Revision 3.0 89/10/18 15:33:52 lwall
36 # Revision 2.0.1.2 88/09/07 17:13:30 lwall
37 # patch14: added redirection of stderr to /dev/null
39 # Revision 2.0.1.1 88/07/11 23:13:39 root
40 # patch2: now expects more shift/reduce errors
42 # Revision 2.0 88/06/05 00:15:31 root
43 # Baseline version 2.0.
53 CFLAGS = $ccflags $optimize
57 mallocsrc = $mallocsrc
58 mallocobj = $mallocobj
63 cat >>Makefile <<'!NO!SUBS!'
69 manpages = a2p.man s2p.man
73 sh = Makefile.SH makedepend.SH
75 h = EXTERN.h INTERN.h config.h handy.h hash.h a2p.h str.h util.h
77 c = hash.c $(mallocsrc) str.c util.c walk.c
79 obj = hash.o $(mallocobj) str.o util.o walk.o
83 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
89 $(CC) -c $(CFLAGS) $(LARGE) $*.c
91 all: $(public) $(private) $(util)
95 $(CC) $(LARGE) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
98 @ echo Expect 208 shift/reduce conflicts...
102 a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h
103 $(CC) -c $(CFLAGS) $(LARGE) a2p.c
106 # won't work with csh
107 export PATH || exit 1
108 - mv $(bin)/a2p $(bin)/a2p.old 2>/dev/null
109 - mv $(bin)/s2p $(bin)/s2p.old 2>/dev/null
110 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
112 for pub in $(public); do \
113 chmod +x `basename $$pub`; \
116 # - ./makedir `filexp $(lib)`
118 #if test `pwd` != `filexp $(lib)`; then \
119 #cp $(private) `filexp $(lib)`; \
121 # cd `filexp $(lib)`; \
122 #for priv in $(private); do \
123 #chmod +x `basename $$priv`; \
125 - if test `pwd` != $(mansrc); then \
126 for page in $(manpages); do \
127 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
135 rm -f a2p *.orig */*.orig *.o core $(addedbyconf)
137 # The following lint has practically everything turned on. Unfortunately,
138 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
139 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
143 lint $(lintflags) $(defs) $(c) > a2p.fuzz
145 depend: ../makedepend
149 echo $(c) | tr ' ' '\012' >.clist
152 echo $(h) | tr ' ' '\012' >.hlist
155 echo $(sh) | tr ' ' '\012' >.shlist
157 config.sh: ../config.sh
161 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
163 @ echo "You haven't done a "'"make depend" yet!'; exit 1
164 makedepend: makedepend.SH
165 /bin/sh makedepend.SH
171 ln Makefile ../Makefile