1 # $RCSfile: Makefile.SH,v 28453Revision: 4.1 28453Date: 92/08/07 18:29:07 $
3 # $Log: Makefile.SH,v $
4 # Revision 4.1 92/08/07 18:29:07 lwall
6 # Revision 4.0.1.3 92/06/08 16:11:32 lwall
7 # patch20: SH files didn't work well with symbolic links
8 # patch20: cray didn't give enough memory to /bin/sh
9 # patch20: makefiles now display new shift/reduce expectations
11 # Revision 4.0.1.2 91/11/05 19:19:04 lwall
12 # patch11: random cleanup
14 # Revision 4.0.1.1 91/06/07 12:12:14 lwall
15 # patch4: cflags now emits entire cc command except for the filename
17 # Revision 4.0 91/03/20 01:57:03 lwall
26 mansrc = /usr/local/man/man1
35 libs = -ldl -lm -lposix
37 CCCMD = `sh $(shellflags) cflags $@`
39 public = a2p s2p find2perl
43 manpages = a2p.man s2p.man
47 sh = Makefile.SH makedepend.SH
49 h = EXTERN.h INTERN.h ../config.h handy.h hash.h a2p.h str.h util.h
51 c = hash.c $(mallocsrc) str.c util.c walk.c
53 obj = hash.o $(mallocobj) str.o util.o walk.o
57 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
65 all: $(public) $(private) $(util)
69 $(CC) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
72 @ echo Expect 231 shift/reduce conflicts...
76 a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
77 $(CCCMD) $(LARGE) a2p.c
82 - mv $(bin)/a2p $(bin)/a2p.old 2>/dev/null
83 - mv $(bin)/s2p $(bin)/s2p.old 2>/dev/null
84 - if test `pwd` != $(bin); then cp $(public) $(bin); fi
86 for pub in $(public); do \
87 chmod +x `basename $$pub`; \
89 - if test `pwd` != $(mansrc); then \
90 for page in $(manpages); do \
91 cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
99 rm -f *.orig */*.orig core $(addedbyconf) a2p.c s2p find2perl all cflags
101 # The following lint has practically everything turned on. Unfortunately,
102 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
103 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
107 lint $(lintflags) $(defs) $(c) > a2p.fuzz
109 depend: $(mallocsrc) ../makedepend
113 echo $(c) | tr ' ' '\012' >.clist
116 echo $(h) | tr ' ' '\012' >.hlist
119 echo $(sh) | tr ' ' '\012' >.shlist
121 config.sh: ../config.sh
125 malloc.c: ../malloc.c
126 sed <../malloc.c >malloc.c \
127 -e 's/"perl.h"/"..\/perl.h"/' \
130 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
132 @ echo "You haven't done a "'"make depend" yet!'; exit 1
133 makedepend: makedepend.SH
134 /bin/sh $(shellflags) makedepend.SH