Mercurial > hg > octave-lojdl
changeset 16577:02a90cb9d79f
include config.h in MOC files
* libgui/Makefile.am (moc-command): New macro.
(moc-%.cc: %.h): Use it.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 28 Apr 2013 01:49:03 -0400 |
parents | 2754c5fd6ae0 |
children | 0eca6c5657c9 |
files | libgui/Makefile.am |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/Makefile.am +++ b/libgui/Makefile.am @@ -86,8 +86,16 @@ default-qt-settings: default-qt-settings.in $(do_subst_qt_settings) +define moc-command +( echo '#ifdef HAVE_CONFIG_H'; \ + echo '#include <config.h>'; \ + echo '#endif'; \ + $(MOC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(MOC_CPPFLAGS) $(liboctgui_la_CPPFLAGS) $< ) > $@-t +mv $@-t $@ +endef + moc-%.cc: %.h - $(MOC) -o$@ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(MOC_CPPFLAGS) $(liboctgui_la_CPPFLAGS) $< + $(moc-command) ui-%.h: %.ui $(UIC) -o $@ $<