]> git.sur5r.net Git - kconfig-frontends/blob - libs/parser/Makefile.am
afad350a13c72ca4dcc56315ac703d040c0c6321
[kconfig-frontends] / libs / parser / Makefile.am
1 SUFFIXES = .gperf
2
3 lib_LTLIBRARIES = libkconfigparser.la
4 libkconfigparser_la_SOURCES = yconf.y
5 dist_EXTRA_libkconfigparser_la_SOURCES =  \
6     hconf.gperf lconf.l                   \
7     confdata.c menu.c symbol.c util.c     \
8     expr.c expr.h lkc.h lkc_proto.h
9 libkconfigparser_la_CPPFLAGS = -DROOTMENU="\"$(root_menu)\""    \
10                                -DCONFIG_=\"$(config_prefix)\"
11 libkconfigparser_la_LDFLAGS = -release $(KCONFIGPARSER_LIB_VERSION)
12
13 include_HEADERS = expr.h lkc.h lkc_proto.h
14
15 BUILT_SOURCES = hconf.c lconf.c
16
17 # Can't use libkconfigparser_a_CPPFLAGS, as it breaks dependencies
18 yconf.o: CPPFLAGS+=$(GETTEXT)
19
20 .gperf.c:
21         $(GPERF) -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $<
22
23 # The following rule produces a warning:
24 #   parser/Makefile.am:31: user target `.l.c' defined here...
25 #       /usr/share/automake-1.11/am/lex.am: ... overrides Automake target
26 #       `.l.c' defined here
27 #
28 # This is expected, and can't be avoided (for now).
29 # That's because, when working with lex+yacc sources, the default is to
30 # build each files searately, and then link them together into the final
31 # output. But the Linux kernel's parser simply #include-s the lexer,
32 # so we can't put lconf.l into the _SOURCES (it's in EXTRA_SOURCES),
33 # and thus automake does not catch the need to call lex.
34 # Secondly, when flex is told to change the symbols' prefix (kconfig
35 # uses zconf in lieue of the original yy), then the output file is
36 # also renamed, but automake does not now that, and make would fail
37 # because it would think no file was generated.
38 .l.c:
39         $(LEXCOMPILE) -o$@ $<