Fix: Don't override user variables within the build system
[lttng-tools.git] / src / lib / lttng-ctl / filter / Makefile.am
1 AM_CPPFLAGS += -I$(srcdir) -I$(builddir)
2
3 noinst_PROGRAMS = filter-grammar-test
4 noinst_LTLIBRARIES = libfilter.la
5 noinst_HEADERS = filter-ast.h \
6 filter-symbols.h
7
8 BUILT_SOURCES = filter-parser.h
9
10 libfilter_la_SOURCES = \
11 filter-parser.y filter-lexer.l \
12 filter-visitor-set-parent.c \
13 filter-visitor-xml.c \
14 filter-visitor-generate-ir.c \
15 filter-visitor-ir-check-binary-op-nesting.c \
16 filter-visitor-ir-validate-string.c \
17 filter-visitor-ir-validate-globbing.c \
18 filter-visitor-ir-normalize-glob-patterns.c \
19 filter-visitor-generate-bytecode.c \
20 filter-ast.h \
21 filter-bytecode.h \
22 filter-ir.h \
23 memstream.h
24 libfilter_la_CFLAGS = -include filter-symbols.h $(AM_CFLAGS)
25 libfilter_la_LIBADD = $(top_builddir)/src/common/string-utils/libstring-utils.la
26
27 AM_YFLAGS = -t -d -v
28
29 # start with empty files to clean
30 CLEANFILES =
31
32 if HAVE_BISON
33 # we have bison: we can clean the generated parser files
34 CLEANFILES += filter-parser.c filter-parser.h filter-parser.output
35 else # HAVE_BISON
36 # create target used to stop the build if we want to build the parser,
37 # but we don't have the necessary tool to do so
38 ERR_MSG = "Error: Cannot build target because bison is missing."
39 ERR_MSG += "Make sure bison is installed and run the configure script again."
40
41 filter-parser.c filter-parser.h: filter-parser.y
42 @echo $(ERR_MSG)
43 @false
44
45 all-local: filter-parser.c filter-parser.h
46 endif # HAVE_BISON
47
48 if HAVE_FLEX
49 # we have flex: we can clean the generated lexer files
50 CLEANFILES += filter-lexer.c
51 else # HAVE_FLEX
52 # create target used to stop the build if we want to build the lexer,
53 # but we don't have the necessary tool to do so
54 ERR_MSG = "Error: Cannot build target because flex is missing."
55 ERR_MSG += "Make sure flex is installed and run the configure script again."
56
57 filter-lexer.c: filter-lexer.l
58 @echo $(ERR_MSG)
59 @false
60
61 all-local: filter-lexer.c
62 endif # HAVE_FLEX
63
64 filter_grammar_test_SOURCES = filter-grammar-test.c
65 filter_grammar_test_LDADD = libfilter.la
This page took 0.030059 seconds and 4 git commands to generate.