X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Ffilter%2FMakefile.am;h=e338eee6e40d9cf4f79ba06f3c7dfa7454cd0604;hp=85a427447c39d88061257745011bb2c9bcf5ac42;hb=343af227102f6b274bfd7f6c7220eb3b776ba5e3;hpb=74130cb7d45f2c698c1a9f224bf8e7a2f2368f18 diff --git a/src/lib/lttng-ctl/filter/Makefile.am b/src/lib/lttng-ctl/filter/Makefile.am index 85a427447..e338eee6e 100644 --- a/src/lib/lttng-ctl/filter/Makefile.am +++ b/src/lib/lttng-ctl/filter/Makefile.am @@ -1,27 +1,65 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \ - -I$(srcdir) -I$(builddir) +AM_CPPFLAGS += -I$(srcdir) -I$(builddir) noinst_PROGRAMS = filter-grammar-test noinst_LTLIBRARIES = libfilter.la -noinst_HEADERS = filter-ast.h +noinst_HEADERS = filter-ast.h \ + filter-symbols.h BUILT_SOURCES = filter-parser.h -AM_YFLAGS = -t -d -v -libfilter_la_SOURCES = filter-lexer.l filter-parser.y \ +libfilter_la_SOURCES = \ + filter-parser.y filter-lexer.l \ filter-visitor-set-parent.c \ filter-visitor-xml.c \ filter-visitor-generate-ir.c \ filter-visitor-ir-check-binary-op-nesting.c \ + filter-visitor-ir-validate-string.c \ + filter-visitor-ir-validate-globbing.c \ + filter-visitor-ir-normalize-glob-patterns.c \ filter-visitor-generate-bytecode.c \ - align.h \ - bug.h \ filter-ast.h \ filter-bytecode.h \ filter-ir.h \ memstream.h +libfilter_la_CFLAGS = -include filter-symbols.h $(AM_CFLAGS) +libfilter_la_LIBADD = $(top_builddir)/src/common/string-utils/libstring-utils.la + +AM_YFLAGS = -t -d -v + +# start with empty files to clean +CLEANFILES = + +if HAVE_BISON +# we have bison: we can clean the generated parser files +CLEANFILES += filter-parser.c filter-parser.h filter-parser.output +else # HAVE_BISON +# create target used to stop the build if we want to build the parser, +# but we don't have the necessary tool to do so +ERR_MSG = "Error: Cannot build target because bison is missing." +ERR_MSG += "Make sure bison is installed and run the configure script again." + +filter-parser.c filter-parser.h: filter-parser.y + @echo $(ERR_MSG) + @false + +all-local: filter-parser.c filter-parser.h +endif # HAVE_BISON + +if HAVE_FLEX +# we have flex: we can clean the generated lexer files +CLEANFILES += filter-lexer.c +else # HAVE_FLEX +# create target used to stop the build if we want to build the lexer, +# but we don't have the necessary tool to do so +ERR_MSG = "Error: Cannot build target because flex is missing." +ERR_MSG += "Make sure flex is installed and run the configure script again." + +filter-lexer.c: filter-lexer.l + @echo $(ERR_MSG) + @false + +all-local: filter-lexer.c +endif # HAVE_FLEX filter_grammar_test_SOURCES = filter-grammar-test.c filter_grammar_test_LDADD = libfilter.la - -CLEANFILES = filter-lexer.c filter-parser.c filter-parser.h filter-parser.output