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