Commit | Line | Data |
---|---|---|
ed554bc5 C |
1 | # Generated automatically from Makefile.in by configure. |
2 | # @(#) $Header: /usr/src/contrib/flex-2.4.6/RCS/Makefile.in,v 1.3 1994/01/05 00:30:25 vern Exp $ (LBL) | |
3 | ||
4 | # If your version of "make" does not define $(MAKE), comment in the | |
5 | # definition of "MAKE" below. (You only need to do this if you intend | |
6 | # to do "make bigcheck" or "make dist".) | |
7 | # MAKE = make | |
8 | ||
9 | # Possible values for DEFS: | |
10 | # | |
11 | # For flex to always generate 8-bit scanners, add "-DDEFAULT_CSIZE=256" | |
12 | # to DEFS. | |
13 | # | |
14 | # For Vax/VMS, add "-DVMS" to DEFS. | |
15 | # | |
16 | # For MS-DOS, add "-DMS_DOS" to DEFS. See the directory MISC/MSDOS for | |
17 | # additional info. | |
18 | ||
19 | CFLAGS = -O | |
20 | DEFS = -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 | |
21 | LDFLAGS = | |
22 | LIBS = | |
23 | ||
24 | # Installation targeting. Files will be installed under the tree | |
25 | # rooted at prefix. flex will be installed in bindir, libfl.a in | |
26 | # libdir, FlexLexer.h will be installed in includedir, and the manual | |
27 | # pages will be installed in mandir with extension manext. | |
28 | # | |
29 | # Raw, unformatted troff source will be installed if INSTALLMAN=man, | |
30 | # nroff preformatted versions will be installed if INSTALLMAN=cat. | |
31 | ||
32 | prefix = /usr | |
33 | exec_prefix = $(prefix) | |
34 | bindir = $(exec_prefix)/bin | |
35 | libdir = $(exec_prefix)/lib | |
36 | includedir = $(prefix)/include | |
37 | manext = 1 | |
38 | mandir = $(prefix)/share/man/cat$(manext) | |
39 | ||
40 | INSTALLMAN = cat | |
41 | ||
42 | SHELL = /bin/sh | |
43 | srcdir = . | |
44 | VPATH = . | |
45 | ||
46 | LN_S = ln -s | |
47 | YACC = yacc | |
48 | CC = gcc | |
49 | AR = ar | |
50 | RANLIB = ranlib | |
51 | INSTALL = /usr/bin/install -c | |
52 | INSTALL_DATA = $(INSTALL) -m 644 | |
53 | INSTALL_PROGRAM = $(INSTALL) | |
54 | ||
55 | # You normally do not need to modify anything below this point. | |
56 | # ------------------------------------------------------------ | |
57 | ||
58 | CPPFLAGS = -I. -I$(srcdir) $(DEFS) | |
59 | ||
60 | .c.o: | |
61 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $< | |
62 | ||
63 | HEADERS = flexdef.h version.h | |
64 | ||
65 | SOURCES = ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \ | |
66 | scan.l skel.c sym.c tblcmp.c yylex.c | |
67 | OBJECTS = ccl.o dfa.o ecs.o gen.o main.o misc.o nfa.o parse.o \ | |
68 | scan.o skel.o sym.o tblcmp.o yylex.o | |
69 | ||
70 | LIBSRCS = libmain.c libyywrap.c | |
71 | LIBOBJS = libmain.o libyywrap.o | |
72 | ||
73 | LINTSRCS = ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.c \ | |
74 | scan.c skel.c sym.c tblcmp.c yylex.c | |
75 | ||
76 | DISTFILES = README NEWS COPYING INSTALL FlexLexer.h \ | |
77 | configure.in Makefile.in mkskel.sh flex.skl \ | |
78 | $(HEADERS) $(SOURCES) $(LIBSRCS) MISC \ | |
79 | flex.1 flexdoc.1 \ | |
80 | scan.c install.sh mkinstalldirs configure | |
81 | ||
82 | DIST_NAME = lex | |
83 | ||
84 | # which "flex" to use to generate scan.c from scan.l | |
85 | FLEX = ./lex | |
86 | FLEX_FLAGS = -ist $(PERF_REPORT) | |
87 | COMPRESSION = | |
88 | PERF_REPORT = -p | |
89 | ||
90 | FLEXLIB = libl.a | |
91 | ||
92 | ||
93 | all: flex | |
94 | ||
95 | flex: lex | |
96 | lex: .bootstrap $(OBJECTS) $(FLEXLIB) | |
97 | $(CC) $(CFLAGS) -o lex $(LDFLAGS) $(OBJECTS) $(FLEXLIB) $(LIBS) | |
98 | ||
99 | .bootstrap: initscan.c | |
100 | @rm -f scan.c | |
101 | cp $(srcdir)/initscan.c scan.c | |
102 | touch .bootstrap | |
103 | ||
104 | parse.c: parse.y | |
105 | $(YACC) -d $(srcdir)/parse.y | |
106 | @sed '/extern char.*malloc/d' <y.tab.c >parse.c | |
107 | @rm -f y.tab.c | |
108 | @mv y.tab.h parse.h | |
109 | ||
110 | parse.h: parse.c | |
111 | ||
112 | scan.c: scan.l | |
113 | $(FLEX) $(FLEX_FLAGS) $(COMPRESSION) $(srcdir)/scan.l >scan.tmp | |
114 | sed s,\"$(srcdir)/scan.l\",\"scan.l\", <scan.tmp >scan.c | |
115 | @rm scan.tmp | |
116 | ||
117 | scan.o: scan.c parse.h flexdef.h | |
118 | yylex.o: yylex.c parse.h flexdef.h | |
119 | ||
120 | skel.c: flex.skl mkskel.sh | |
121 | $(SHELL) $(srcdir)/mkskel.sh $(srcdir)/flex.skl >skel.c | |
122 | ||
123 | main.o: main.c flexdef.h version.h | |
124 | ccl.o: ccl.c flexdef.h | |
125 | dfa.o: dfa.c flexdef.h | |
126 | ecs.o: ecs.c flexdef.h | |
127 | gen.o: gen.c flexdef.h | |
128 | misc.o: misc.c flexdef.h | |
129 | nfa.o: nfa.c flexdef.h | |
130 | parse.o: parse.c flexdef.h | |
131 | skel.o: skel.c flexdef.h | |
132 | sym.o: sym.c flexdef.h | |
133 | tblcmp.o: tblcmp.c flexdef.h | |
134 | ||
135 | alloca.o: alloca.c | |
136 | $(CC) $(CPPFLAGS) $(CFLAGS) -c -Dxmalloc=yy_flex_xmalloc alloca.c | |
137 | ||
138 | alloca.c: $(srcdir)/MISC/alloca.c | |
139 | @rm -f alloca.c | |
140 | cp $(srcdir)/MISC/alloca.c . | |
141 | ||
142 | test: check | |
143 | check: flex | |
144 | $(FLEX) $(FLEX_FLAGS) $(COMPRESSION) $(srcdir)/scan.l \ | |
145 | | sed s,\"$(srcdir)/scan.l\",\"scan.l\", \ | |
146 | | diff scan.c - | |
147 | @echo "Check successful, using COMPRESSION=\"$(COMPRESSION)\"" | |
148 | ||
149 | bigcheck: | |
150 | rm -f scan.c ; $(MAKE) COMPRESSION="-C" check | |
151 | rm -f scan.c ; $(MAKE) COMPRESSION="-Ce" check | |
152 | rm -f scan.c ; $(MAKE) COMPRESSION="-Cm" check | |
153 | rm -f scan.c ; $(MAKE) COMPRESSION="-Cfea" check | |
154 | rm -f scan.c ; $(MAKE) COMPRESSION="-CFer" check | |
155 | rm -f scan.c ; $(MAKE) COMPRESSION="-l" PERF_REPORT="" check | |
156 | rm -f scan.c ; $(MAKE) | |
157 | @echo "All checks successful" | |
158 | ||
159 | $(FLEXLIB): $(LIBOBJS) | |
160 | $(AR) cru $(FLEXLIB) $(LIBOBJS) | |
161 | -$(RANLIB) $(FLEXLIB) | |
162 | ||
163 | flex.man: flex.1 | |
164 | cd $(srcdir); nroff -man flex.1 >flex.man | |
165 | ||
166 | flexdoc.man: flexdoc.1 | |
167 | cd $(srcdir); nroff -man flexdoc.1 >flexdoc.man | |
168 | ||
169 | install: lex $(FLEXLIB) install.$(INSTALLMAN) | |
170 | install -s -o bin -g bin -m 555 lex $(bindir) | |
171 | install -o bin -g bin -m 444 $(FLEXLIB) $(libdir) | |
172 | ranlib -t /usr/lib/$(FLEXLIB) | |
173 | ||
174 | install.man: flex.1 flexdoc.1 | |
175 | install $(srcdir)/flex.1 $(mandir)/flex.$(manext) | |
176 | install $(srcdir)/flexdoc.1 $(mandir)/flexdoc.$(manext) | |
177 | ||
178 | install.cat: flex.man flexdoc.man | |
179 | install $(srcdir)/flex.man $(mandir)/lex.0 | |
180 | install $(srcdir)/flexdoc.man $(mandir)/lexdoc.0 | |
181 | ||
182 | installdirs: | |
183 | $(SHELL) $(srcdir)/mkinstalldirs \ | |
184 | $(bindir) $(libdir) $(includedir) $(mandir) | |
185 | ||
186 | uninstall: | |
187 | rm -f $(bindir)/lex $(bindir)/flex++ | |
188 | rm -f $(libdir)/libl.a | |
189 | rm -f $(includedir)/FlexLexer.h | |
190 | rm -f $(mandir)/flex.$(manext) $(mandir)/flexdoc.$(manext) | |
191 | ||
192 | tags: $(SOURCES) | |
193 | ctags $(SOURCES) | |
194 | ||
195 | TAGS: $(SOURCES) | |
196 | etags $(SOURCES) | |
197 | ||
198 | lint: $(LINTSRCS) | |
199 | lint -Dconst= $(LINTSRCS) > flex.lint | |
200 | ||
201 | gcc-lint: $(LINTSRCS) | |
202 | gcc -Dlint -Wall $(LINTSRCS) >flex.gcc-lint 2>&1 | |
203 | ||
204 | mostlyclean: | |
205 | rm -f *~ a.out *.bak core errs scan.tmp | |
206 | ||
207 | clean: mostlyclean | |
208 | rm -f parse.c parse.h *.o alloca.c *.lint lex.yy.c lex.yy.cc $(FLEXLIB) | |
209 | ||
210 | distclean: clean | |
211 | rm -f .bootstrap lex scan.c tags TAGS Makefile config.status | |
212 | ||
213 | realclean: distclean | |
214 | rm -f flex.man flexdoc.man flex*.tar.gz flex*.tar.Z | |
215 | ||
216 | dist: flex $(DISTFILES) | |
217 | $(MAKE) DIST_NAME=flex-`sed <version.h 's/[^"]*"//' | sed 's/"//'` dist2 | |
218 | ||
219 | dist2: | |
220 | @rm -rf $(DIST_NAME) | |
221 | @rm -f $(DIST_NAME).tar $(DIST_NAME).tar.Z $(DIST_NAME).tar.gz | |
222 | @mkdir $(DIST_NAME) | |
223 | tar cf - $(DISTFILES) | (cd $(DIST_NAME); tar xfB -) | |
224 | @mv $(DIST_NAME)/scan.c $(DIST_NAME)/initscan.c | |
225 | @chmod 444 $(DIST_NAME)/initscan.c | |
226 | @chmod +w $(DIST_NAME)/Makefile.in | |
227 | tar chf $(DIST_NAME).tar $(DIST_NAME) | |
228 | compress <$(DIST_NAME).tar >$(DIST_NAME).tar.Z | |
229 | gzip <$(DIST_NAME).tar >$(DIST_NAME).tar.gz | |
230 | @rm $(DIST_NAME).tar | |
231 | ||
232 | Makefile: Makefile.in config.status | |
233 | $(SHELL) config.status | |
234 | config.status: configure | |
235 | $(SHELL) config.status --recheck | |
236 | configure: configure.in | |
237 | cd $(srcdir); autoconf | |
238 | ||
239 | # Prevent GNU make v3 from overflowing arg limit on SysV. | |
240 | .NOEXPORT: |