source: trunk/essentials/sys-devel/flex/Makefile.am@ 3232

Last change on this file since 3232 was 3043, checked in by bird, 18 years ago

-> essentials

File size: 5.2 KB
Line 
1# This file is part of flex.
2
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions
5# are met:
6
7# 1. Redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer.
9# 2. Redistributions in binary form must reproduce the above copyright
10# notice, this list of conditions and the following disclaimer in the
11# documentation and/or other materials provided with the distribution.
12
13# Neither the name of the University nor the names of its contributors
14# may be used to endorse or promote products derived from this software
15# without specific prior written permission.
16
17# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
19# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20# PURPOSE.
21
22# Notes on building:
23
24# Possible values for DEFS:
25#
26# By default, flex generates 8-bit scanners when using table compression,
27# and 7-bit scanners when using uncompressed tables (-f or -F options).
28# For flex to always generate 8-bit scanners, add "-DDEFAULT_CSIZE=256"
29# to DEFS.
30#
31# For Vax/VMS, add "-DVMS" to DEFS.
32#
33# For MS-DOS, add "-DMS_DOS" to DEFS. See the directory MISC/MSDOS for
34# additional info.
35
36AM_YFLAGS = -d
37ACLOCAL_AMFLAGS = -I m4
38m4 = @M4@
39indent = @INDENT@
40
41AUTOMAKE_OPTIONS = \
42 gnits \
43 check-news \
44 dist-bzip2 \
45 1.7
46
47bin_PROGRAMS = flex
48lib_LIBRARIES = libfl.a
49
50flex_SOURCES = \
51 ccl.c \
52 dfa.c \
53 ecs.c \
54 gen.c \
55 main.c \
56 misc.c \
57 nfa.c \
58 parse.y \
59 scan.l \
60 skel.c \
61 sym.c \
62 tblcmp.c \
63 yylex.c \
64 options.c \
65 scanopt.c \
66 buf.c \
67 tables.c \
68 tables_shared.c \
69 filter.c \
70 regex.c
71
72libfl_a_SOURCES = \
73 libmain.c \
74 libyywrap.c
75
76noinst_HEADERS = \
77 flexdef.h \
78 flexint.h \
79 version.h \
80 options.h \
81 scanopt.h \
82 tables.h \
83 tables_shared.h
84
85include_HEADERS = \
86 FlexLexer.h
87
88MAINTAINERCLEANFILES = \
89 ABOUT-NLS \
90 config.rpath \
91 config.sub \
92 config.guess \
93 configure \
94 config.sub \
95 config.guess \
96 depcomp \
97 mkinstalldirs \
98 install-sh \
99 ABOUT-NLS \
100 ChangeLog \
101 INSTALL \
102 conf.in \
103 aclocal.m4 \
104 Makefile.in \
105 mdate-sh \
106 missing
107
108
109
110EXTRA_DIST = \
111 flex.spec.in \
112 flex.spec \
113 .indent.pro \
114 AUTHORS \
115 COPYING \
116 INSTALL \
117 NEWS \
118 ONEWS \
119 README \
120 README.cvs-snapshot \
121 THANKS \
122 TODO \
123 autogen.sh \
124 flex.skl \
125 mkskel.sh \
126 ABOUT-NLS \
127 config.rpath \
128 gettext.h
129
130BUILT_SOURCES = \
131 skel.c
132
133SUBDIRS = \
134 . \
135 doc \
136 m4 \
137 examples \
138 po \
139 tools \
140 tests
141
142localedir = $(datadir)/locale
143AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I@includedir@ -I$(top_srcdir)/intl
144LIBS = @LIBINTL@ @LIBS@
145
146skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
147 sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | $(m4) -P -DFLEX_MAJOR_VERSION=`echo $(VERSION)|cut -f 1 -d .` -DFLEX_MINOR_VERSION=`echo $(VERSION)|cut -f 2 -d .` -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | sed 's/m4postproc_/m4_/g' | $(SHELL) $(srcdir)/mkskel.sh >skel.c
148
149# Explicitly describe dependencies.
150# You can recreate this with `gcc -I. -MM *.c'
151buf.o: buf.c flexdef.h flexint.h
152ccl.o: ccl.c flexdef.h flexint.h
153dfa.o: dfa.c flexdef.h flexint.h tables.h tables_shared.h
154ecs.o: ecs.c flexdef.h flexint.h
155gen.o: gen.c flexdef.h flexint.h tables.h tables_shared.h
156libmain.o: libmain.c
157libyywrap.o: libyywrap.c
158main.o: main.c flexdef.h flexint.h version.h options.h scanopt.h \
159 tables.h tables_shared.h
160misc.o: misc.c flexdef.h flexint.h tables.h tables_shared.h
161nfa.o: nfa.c flexdef.h flexint.h
162options.o: options.c options.h scanopt.h flexdef.h flexint.h
163parse.o: parse.c flexdef.h flexint.h tables.h tables_shared.h
164scan.o: scan.c flexdef.h flexint.h parse.h
165scanopt.o: scanopt.c flexdef.h flexint.h scanopt.h
166skel.o: skel.c flexdef.h flexint.h
167sym.o: sym.c flexdef.h flexint.h
168tables.o: tables.c flexdef.h flexint.h tables.h tables_shared.h
169tables_shared.o: tables_shared.c flexdef.h flexint.h tables.h \
170 tables_shared.h
171tblcmp.o: tblcmp.c flexdef.h flexint.h
172yylex.o: yylex.c flexdef.h flexint.h parse.h
173filter.o: filter.c flexdef.h flexint.h
174
175# Create a tags file.
176tags:
177 ctags --c-types='defgmstuv' $(srcdir)/*.[ch]
178
179# Create the ChangeLog, but only if we're inside a cvs working directory
180
181ChangeLog:
182 if [ -d CVS ] ; then \
183 sh $(srcdir)/tools/cvs2cl.pl -F trunk -U $(srcdir)/tools/cvsauthors \
184 ; fi
185
186# Run GNU indent on sources. Don't run this unless all the sources compile cleanly.
187#
188# Whole idea:
189# 1. Check for .indent.pro, otherwise indent will use unknown
190# settings, or worse, the GNU defaults.)
191# 2. Check that this is GNU indent.
192# 3. Make sure to process only the NON-generated .c and .h files.
193# 4. Run indent twice per file. The first time is a test.
194# Otherwise, indent overwrites your file even if it fails!
195indentfiles = \
196 buf.c \
197 ccl.c \
198 dfa.c \
199 ecs.c \
200 filter.c \
201 flexdef.h \
202 gen.c \
203 libmain.c \
204 libyywrap.c \
205 main.c \
206 misc.c \
207 nfa.c \
208 options.c \
209 options.h \
210 regex.c \
211 scanopt.c \
212 scanopt.h \
213 sym.c \
214 tables.c \
215 tables.h \
216 tables_shared.c \
217 tables_shared.h \
218 tblcmp.c
219
220indent:
221 if [ -f .indent.pro ] ; then \
222 for f in $(indentfiles);\
223 do\
224 echo indenting $$f ;\
225 $(indent) < $$f >/dev/null && indent $$f || echo $$f FAILED to indent ;\
226 done \
227 fi
228
229.PHONY: ChangeLog tags indent
Note: See TracBrowser for help on using the repository browser.