Commit | Line | Data |
2304df62 |
1 | # $RCSfile: Makefile.SH,v 28453Revision: 4.1 28453Date: 92/08/07 18:29:07 $ |
79072805 |
2 | # |
3 | # $Log: Makefile.SH,v $ |
4 | # Revision 4.1 92/08/07 18:29:07 lwall |
5 | # |
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 |
10 | # |
11 | # Revision 4.0.1.2 91/11/05 19:19:04 lwall |
12 | # patch11: random cleanup |
13 | # |
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 |
16 | # |
17 | # Revision 4.0 91/03/20 01:57:03 lwall |
18 | # 4.0 baseline. |
19 | # |
20 | # |
21 | |
22 | CC = cc |
2304df62 |
23 | YACC = yacc |
79072805 |
24 | bin = /usr/local/bin |
2304df62 |
25 | lib = /usr/local/lib |
26 | mansrc = /usr/local/man/man1 |
27 | manext = 1 |
79072805 |
28 | LDFLAGS = |
29 | SMALL = |
30 | LARGE = |
31 | mallocsrc = malloc.c |
32 | mallocobj = malloc.o |
33 | shellflags = |
34 | |
2304df62 |
35 | libs = -ldl -lm -lposix |
79072805 |
36 | |
37 | CCCMD = `sh $(shellflags) cflags $@` |
38 | |
39 | public = a2p s2p find2perl |
40 | |
41 | private = |
42 | |
43 | manpages = a2p.man s2p.man |
44 | |
45 | util = |
46 | |
47 | sh = Makefile.SH makedepend.SH |
48 | |
49 | h = EXTERN.h INTERN.h ../config.h handy.h hash.h a2p.h str.h util.h |
50 | |
51 | c = hash.c $(mallocsrc) str.c util.c walk.c |
52 | |
53 | obj = hash.o $(mallocobj) str.o util.o walk.o |
54 | |
55 | lintflags = -phbvxac |
56 | |
57 | addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7 |
58 | |
59 | # grrr |
60 | SHELL = /bin/sh |
61 | |
62 | .c.o: |
63 | $(CCCMD) $*.c |
64 | |
65 | all: $(public) $(private) $(util) |
66 | touch all |
67 | |
68 | a2p: $(obj) a2p.o |
69 | $(CC) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p |
70 | |
71 | a2p.c: a2p.y |
72 | @ echo Expect 231 shift/reduce conflicts... |
73 | $(YACC) a2p.y |
74 | mv y.tab.c a2p.c |
75 | |
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 |
78 | |
79 | install: a2p s2p |
80 | # won't work with csh |
81 | export PATH || exit 1 |
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 |
85 | cd $(bin); \ |
86 | for pub in $(public); do \ |
87 | chmod +x `basename $$pub`; \ |
88 | done |
89 | - if test `pwd` != $(mansrc); then \ |
90 | for page in $(manpages); do \ |
91 | cp $$page $(mansrc)/`basename $$page .man`.$(manext); \ |
92 | done; \ |
93 | fi |
94 | |
95 | clean: |
96 | rm -f a2p *.o a2p.c |
97 | |
98 | realclean: clean |
99 | rm -f *.orig */*.orig core $(addedbyconf) a2p.c s2p find2perl all cflags |
100 | |
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 |
104 | # for that spot. |
105 | |
106 | lint: |
107 | lint $(lintflags) $(defs) $(c) > a2p.fuzz |
108 | |
109 | depend: $(mallocsrc) ../makedepend |
110 | ../makedepend |
111 | |
112 | clist: |
113 | echo $(c) | tr ' ' '\012' >.clist |
114 | |
115 | hlist: |
116 | echo $(h) | tr ' ' '\012' >.hlist |
117 | |
118 | shlist: |
119 | echo $(sh) | tr ' ' '\012' >.shlist |
120 | |
121 | config.sh: ../config.sh |
122 | rm -f config.sh |
123 | ln ../config.sh . |
124 | |
125 | malloc.c: ../malloc.c |
126 | sed <../malloc.c >malloc.c \ |
127 | -e 's/"perl.h"/"..\/perl.h"/' \ |
128 | -e 's/my_exit/exit/' |
129 | |
130 | # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE |
131 | $(obj): |
132 | @ echo "You haven't done a "'"make depend" yet!'; exit 1 |
133 | makedepend: makedepend.SH |
134 | /bin/sh $(shellflags) makedepend.SH |