perl 5.0 alpha 6
[p5sagit/p5-mst-13.2.git] / x2p / Makefile
CommitLineData
79072805 1# : Makefile.SH,v 15738Revision: 4.1 15738Date: 92/08/07 18:29:07 $
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
22CC = cc
23YACC = /bin/yacc
24bin = /usr/local/bin
25lib =
26mansrc = /usr/man/manl
27manext = l
28LDFLAGS =
29SMALL =
30LARGE =
31mallocsrc = malloc.c
32mallocobj = malloc.o
33shellflags =
34
35libs = -ldbm -lm -lposix
36
37CCCMD = `sh $(shellflags) cflags $@`
38
39public = a2p s2p find2perl
40
41private =
42
43manpages = a2p.man s2p.man
44
45util =
46
47sh = Makefile.SH makedepend.SH
48
49h = EXTERN.h INTERN.h ../config.h handy.h hash.h a2p.h str.h util.h
50
51c = hash.c $(mallocsrc) str.c util.c walk.c
52
53obj = hash.o $(mallocobj) str.o util.o walk.o
54
55lintflags = -phbvxac
56
57addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
58
59# grrr
60SHELL = /bin/sh
61
62.c.o:
63 $(CCCMD) $*.c
64
65all: $(public) $(private) $(util)
66 touch all
67
68a2p: $(obj) a2p.o
69 $(CC) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
70
71a2p.c: a2p.y
72 @ echo Expect 231 shift/reduce conflicts...
73 $(YACC) a2p.y
74 mv y.tab.c a2p.c
75
76a2p.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
79install: 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); \
86for pub in $(public); do \
87chmod +x `basename $$pub`; \
88done
89 - if test `pwd` != $(mansrc); then \
90for page in $(manpages); do \
91cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
92done; \
93fi
94
95clean:
96 rm -f a2p *.o a2p.c
97
98realclean: 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
106lint:
107 lint $(lintflags) $(defs) $(c) > a2p.fuzz
108
109depend: $(mallocsrc) ../makedepend
110 ../makedepend
111
112clist:
113 echo $(c) | tr ' ' '\012' >.clist
114
115hlist:
116 echo $(h) | tr ' ' '\012' >.hlist
117
118shlist:
119 echo $(sh) | tr ' ' '\012' >.shlist
120
121config.sh: ../config.sh
122 rm -f config.sh
123 ln ../config.sh .
124
125malloc.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
133makedepend: makedepend.SH
134 /bin/sh $(shellflags) makedepend.SH