Mercurial > octave-dspies
diff libgui/Makefile.am @ 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 | bfff338c56d1 |
children | 8c2a9ca624a7 |
line wrap: on
line diff
--- a/libgui/Makefile.am Sun Apr 28 01:21:16 2013 -0400 +++ b/libgui/Makefile.am Sun Apr 28 01:49:03 2013 -0400 @@ -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 $@ $<