]> git.sur5r.net Git - kconfig-frontends/blob - libs/parser/Makefile.am
buildsystem: don't use recursive make for frontends
[kconfig-frontends] / libs / parser / Makefile.am
1 SUFFIXES = .gperf
2
3 lib_LTLIBRARIES = libkconfig-parser.la
4 libkconfig_parser_la_SOURCES = yconf.y
5 dist_EXTRA_libkconfig_parser_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 libkconfig_parser_la_CPPFLAGS = -DROOTMENU="\"$(root_menu)\""   \
10                                 -DCONFIG_=\"$(config_prefix)\"  \
11                                 $(intl_CPPFLAGS)
12 libkconfig_parser_la_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS)
13 libkconfig_parser_la_LDFLAGS = -release $(KCONFIGPARSER_LIB_VERSION) -no-undefined
14 libkconfig_parser_la_LIBADD = $(intl_LIBS)
15
16 kconfig_includedir = $(includedir)/kconfig
17 kconfig_include_HEADERS = list.h lkc.h expr.h lkc_proto.h
18
19 BUILT_SOURCES = hconf.c lconf.c
20 CLEANFILES = hconf.c lconf.c yconf.c
21 EXTRA_DIST = yconf.y.patch
22
23 AM_V_GPERF = $(AM_V_GPERF_$(V))
24 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
25 AM_V_GPERF_0 = @echo "  GPERF   " $@;
26
27 .gperf.c:
28         $(AM_V_GPERF)$(GPERF) -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $<
29
30 # The following rule produces a warning:
31 #   libs/parser/Makefile.am:41: user target `.l.c' defined here...
32 #       /usr/share/automake-1.11/am/lex.am: ... overrides Automake target
33 #       `.l.c' defined here
34 #
35 # This is expected, and can't be avoided (for now).
36 # That's because, when working with lex+yacc sources, the default is to
37 # build each files searately, and then link them together into the final
38 # output. But the Linux kernel's parser simply #include-s the lexer,
39 # so we can't put lconf.l into the _SOURCES (it's in EXTRA_SOURCES),
40 # and thus automake does not catch the need to call lex.
41 # Secondly, when flex is told to change the symbols' prefix (kconfig
42 # uses zconf in lieue of the original yy), then the output file is
43 # also renamed, but automake does not now that, and make would fail
44 # because it would think no file was generated.
45 .l.c:
46         $(AM_V_LEX)$(LEXCOMPILE) -o$@ $<