3 if test ! -f config.sh; then
5 ln ../../config.sh . || \
6 ln ../../../config.sh . || \
7 (echo "Can't find config.sh."; exit 1)
13 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
15 echo "Extracting x2p/Makefile (with variable substitutions)"
16 cat >Makefile <<!GROK!THIS!
17 # $Header: Makefile.SH,v 1.0 87/12/18 17:50:17 root Exp $
19 # $Log: Makefile.SH,v $
20 # Revision 1.0 87/12/18 17:50:17 root
38 cat >>Makefile <<'!NO!SUBS!'
44 manpages = a2p.man s2p.man
48 sh = Makefile.SH makedepend.SH
50 h = EXTERN.h INTERN.h config.h handy.h hash.h a2p.h str.h util.h
52 c = hash.c ../malloc.c str.c util.c walk.c
54 obj = hash.o malloc.o str.o util.o walk.o
58 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
64 $(CC) -c $(CFLAGS) $(LARGE) $*.c
66 all: $(public) $(private) $(util)
70 $(CC) $(LDFLAGS) $(LARGE) $(obj) a2p.o $(libs) -o a2p
73 @ echo Expect 107 shift/reduce errors...
77 a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h
78 $(CC) -c $(CFLAGS) $(LARGE) a2p.c
80 # if a .h file depends on another .h file...
86 - mv $(bin)/a2p $(bin)/a2p.old
87 - mv $(bin)/s2p $(bin)/s2p.old
88 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
90 for pub in $(public); do \
91 chmod 755 `basename $$pub`; \
93 - test $(bin) = /bin || rm -f /bin/a2p
95 # - makedir `filexp $(lib)`
97 #if test `pwd` != `filexp $(lib)`; then \
98 #cp $(private) `filexp $(lib)`; \
100 # cd `filexp $(lib)`; \
101 #for priv in $(private); do \
102 #chmod 755 `basename $$priv`; \
104 - if test `pwd` != $(mansrc); then \
105 for page in $(manpages); do \
106 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
114 rm -f a2p *.orig */*.orig *.o core $(addedbyconf)
116 # The following lint has practically everything turned on. Unfortunately,
117 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
118 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
122 lint $(lintflags) $(defs) $(c) > a2p.fuzz
124 depend: ../makedepend
128 echo $(c) | tr ' ' '\012' >.clist
131 echo $(h) | tr ' ' '\012' >.hlist
134 echo $(sh) | tr ' ' '\012' >.shlist
136 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
138 @ echo "You haven't done a "'"make depend" yet!'; exit 1
139 makedepend: makedepend.SH
140 /bin/sh makedepend.SH
146 ln Makefile ../Makefile