diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2015-11-27 02:28:17 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2016-01-28 18:13:48 +0000 |
commit | 265a41e14da6b3ebf1e49e726eee62d1372110bf (patch) | |
tree | f1a524f8e66ebd43691de84649f231f32ee125f6 /epan/dfilter | |
parent | 97a1a50e200a6c50e0014dde7e8ec932c30190a1 (diff) |
autotools: Don't use "user variables" to set build flags
GNU coding standards recommend against it and automake is designed
around it.
This allows overriding the global build flags using AM_CFLAGS, etc.,
or per object flags, something that is difficult or impossible currently
because of automake precedence rules.
Change-Id: I3f1ea12e560af5a46b2f04b342b1882bbf123f12
Reviewed-on: https://code.wireshark.org/review/13455
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/dfilter')
-rw-r--r-- | epan/dfilter/Makefile.am | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/epan/dfilter/Makefile.am b/epan/dfilter/Makefile.am index 7db0fa2b46..9d54e2f973 100644 --- a/epan/dfilter/Makefile.am +++ b/epan/dfilter/Makefile.am @@ -19,13 +19,10 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -include ../../Makefile.am.inc - -if HAVE_WARNINGS_AS_ERRORS -AM_NON_GENERATED_CFLAGS = -Werror -endif - include Makefile.common +include $(top_srcdir)/Makefile.am.inc + +AM_CPPFLAGS += -I$(top_srcdir)/epan -I$(lemon_srcdir) noinst_LTLIBRARIES = libdfilter_generated.la libdfilter.la @@ -45,18 +42,19 @@ MAINTAINERCLEANFILES = \ $(NODIST_GENERATED_FILES) \ Makefile.in -AM_CPPFLAGS = -I$(srcdir)/../.. -I$(srcdir)/.. -I$(srcdir)/$(LEMON) +BUILT_SOURCES = \ + grammar.h #Since code generated by lex may trigger gcc warnings, we are now generating two #libraries. A single library is generated with the lex code without the barrier #"stop on warning". An other library is generated from the remaining source #files with the "stop on warning" barrier. libdfilter_la_SOURCES = $(NONGENERATED_C_FILES) $(NONGENERATED_HEADER_FILES) -libdfilter_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS) libdfilter_generated_la_SOURCES = \ $(GENERATED_C_FILES) \ $(GENERATED_HEADER_FILES) +libdfilter_generated_la_CFLAGS = $(GENERATED_CFLAGS) nodist_libdfilter_generated_la_SOURCES = \ $(NODIST_GENERATED_C_FILES) \ @@ -70,16 +68,11 @@ EXTRA_DIST = \ Makefile.common \ Makefile.nmake -RUNLEX=$(top_srcdir)/tools/runlex.sh - scanner_lex.h : scanner.c -scanner.lo: grammar.h - -LEMON=../../tools/lemon grammar.h : grammar.c -grammar.c : $(LEMON)/lemon$(EXEEXT) $(srcdir)/$(LEMON)/lempar.c $(srcdir)/grammar.lemon - $(AM_V_LEMON)$(LEMON)/lemon$(EXEEXT) T=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/grammar.lemon || \ +grammar.c : $(LEMON) $(lemon_srcdir)/lempar.c $(srcdir)/grammar.lemon + $(AM_V_LEMON)$(LEMON) T=$(lemon_srcdir)/lempar.c $(srcdir)/grammar.lemon || \ (rm -f grammar.c grammar.h ; false) checkapi: |