# HG changeset patch # User Mike Miller # Date 1428375968 14400 # Node ID 0e712de0af4d5761b46a99c5ab3bb3b5e7349473 # Parent f68c3a62e42c8681687b986def23b0a993a7764f build: Fix build error with user-supplied CPPFLAGS (bug #44754) * libgui/Makefile.am: Use GNU Makefile filter command to include only CPPFLAGS options that are expected to be recognized by the MOC command. diff -r f68c3a62e42c -r 0e712de0af4d libgui/Makefile.am --- a/libgui/Makefile.am Mon Apr 06 23:05:41 2015 +0200 +++ b/libgui/Makefile.am Mon Apr 06 23:06:08 2015 -0400 @@ -23,8 +23,9 @@ MOC_CPPFLAGS = ## Fix for bug #42839 where -mieee CFLAG option is added to CPPFLAGS by gnulib. -## Eventually gnulib will be appropriately fixed and this hack removed. -MOC_OCTAVE_CPPFLAGS = $(filter-out -mieee, $(AM_CPPFLAGS) $(CPPFLAGS)) +## Users may also pass other options in CPPFLAGS that moc does not understand. +## Only keep moc-compatible options -Idir, -Dmacro, and -Umacro. +MOC_OCTAVE_CPPFLAGS = $(filter -I% -D% -U%, $(AM_CPPFLAGS) $(CPPFLAGS)) octlib_LTLIBRARIES = liboctgui.la