summaryrefslogtreecommitdiff
path: root/Makefile.am.inc
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2015-11-27 02:28:17 +0000
committerJoão Valverde <j@v6e.pt>2016-01-28 18:13:48 +0000
commit265a41e14da6b3ebf1e49e726eee62d1372110bf (patch)
treef1a524f8e66ebd43691de84649f231f32ee125f6 /Makefile.am.inc
parent97a1a50e200a6c50e0014dde7e8ec932c30190a1 (diff)
downloadwireshark-265a41e14da6b3ebf1e49e726eee62d1372110bf.tar.gz
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 'Makefile.am.inc')
-rw-r--r--Makefile.am.inc30
1 files changed, 29 insertions, 1 deletions
diff --git a/Makefile.am.inc b/Makefile.am.inc
index 9bf5cf87d2..e8c4437f9b 100644
--- a/Makefile.am.inc
+++ b/Makefile.am.inc
@@ -21,6 +21,34 @@
AUTOMAKE_OPTIONS = -Wno-portability
+lemon_srcdir = $(top_srcdir)/tools/lemon
+
+LEMON ?= $(top_builddir)/tools/lemon/lemon$(EXEEXT)
+
+RUNLEX ?= $(top_srcdir)/tools/runlex.sh
+
+AM_CPPFLAGS = $(WS_CPPFLAGS) -I$(top_srcdir) -DTOP_SRCDIR=\"$(abs_top_srcdir)\"
+
+AM_CFLAGS = $(WS_CFLAGS)
+
+if HAVE_WARNINGS_AS_ERRORS
+AM_CFLAGS += -Werror
+endif
+
+GENERATED_CFLAGS = $(WS_CFLAGS)
+
+AM_CXXFLAGS = $(WS_CXXFLAGS)
+
+if HAVE_WARNINGS_AS_ERRORS
+AM_CXXFLAGS += -Werror
+endif
+
+AM_LDFLAGS = $(WS_LDFLAGS)
+
+AM_V_PERL = $(am__v_PERL_@AM_V@)
+am__v_PERL_ = $(am__v_PERL_@AM_DEFAULT_V@)
+am__v_PERL_0 = @echo " PERL " $@;
+
AM_V_AWK = $(am__v_AWK_@AM_V@)
am__v_AWK_ = $(am__v_AWK_@AM_DEFAULT_V@)
am__v_AWK_0 = @echo " AWK " $@;
@@ -48,7 +76,7 @@ abi_incdirs = $(subst -I,NEWLINE,$(filter -I%,$(CFLAGS) -I$(abs_top_srcdir) -I$(
abi_sysdirs = $(subst -isystem,NEWLINE,$(filter -isystem%,$(CFLAGS)))
INCLUDE_DIRS = $(abi_incdirs) $(abi_sysdirs)
abi-descriptor.xml: ../abi-descriptor.template
- $(AM_V_SED)sed \
+ $(AM_V_SED)$(SED) \
-e 's|@INCLUDE_DIRS@|$(INCLUDE_DIRS)|g' \
-e 's/ *NEWLINE/\n /g' \
-e 's|@LIBRARY_OUTPUT_PATH@|{RELPATH}/.libs|' $< > $@