diff options
-rw-r--r-- | Makefile.am.inc | 6 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | tools/lemon/Makefile.am | 6 |
3 files changed, 6 insertions, 14 deletions
diff --git a/Makefile.am.inc b/Makefile.am.inc index 45b8533c36..0f39785c9a 100644 --- a/Makefile.am.inc +++ b/Makefile.am.inc @@ -27,12 +27,6 @@ LEMON = $(top_builddir)/tools/lemon/lemon$(EXEEXT) RUNLEX = $(top_srcdir)/tools/runlex.sh -if HAVE_WARNINGS_AS_ERRORS -WERROR = -Werror -else -WERROR = -endif - INCLUDEDIRS = -I$(top_srcdir) #AM_CPPFLAGS = $(INCLUDEDIRS) $(WS_CPPFLAGS) diff --git a/configure.ac b/configure.ac index b966b2f8d2..1dbe9fd6b9 100644 --- a/configure.ac +++ b/configure.ac @@ -1279,9 +1279,11 @@ AC_ARG_ENABLE(warnings-as-errors, with_warnings_as_errors="no" AC_MSG_RESULT(no) fi -] -) -AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$with_warnings_as_errors" = "xyes") +]) + +AS_IF([test "x$with_warnings_as_errors" = "xyes"], [WERROR="-Werror"], [WERROR=""]) +AC_SUBST(WERROR) +AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, [test "x$with_warnings_as_errors" = "xyes"]) # # Add any platform-specific compiler flags needed. diff --git a/tools/lemon/Makefile.am b/tools/lemon/Makefile.am index f2a86dc84a..209d1f6d7a 100644 --- a/tools/lemon/Makefile.am +++ b/tools/lemon/Makefile.am @@ -31,14 +31,10 @@ CFLAGS = $(CFLAGS_FOR_BUILD) LDFLAGS = $(LDFLAGS_FOR_BUILD) LIBS = -if HAVE_WARNINGS_AS_ERRORS -WERROR = -Werror -endif +AM_CFLAGS = $(WERROR) $(WS_CFLAGS_FOR_BUILD) noinst_PROGRAMS = lemon -lemon_CFLAGS = $(WERROR) $(WS_CFLAGS_FOR_BUILD) - CLEANFILES = \ *~ |