comparison 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
comparison
equal deleted inserted replaced
16576:2754c5fd6ae0 16577:02a90cb9d79f
84 octlocale_DATA = $(LOCALES) 84 octlocale_DATA = $(LOCALES)
85 85
86 default-qt-settings: default-qt-settings.in 86 default-qt-settings: default-qt-settings.in
87 $(do_subst_qt_settings) 87 $(do_subst_qt_settings)
88 88
89 define moc-command
90 ( echo '#ifdef HAVE_CONFIG_H'; \
91 echo '#include <config.h>'; \
92 echo '#endif'; \
93 $(MOC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(MOC_CPPFLAGS) $(liboctgui_la_CPPFLAGS) $< ) > $@-t
94 mv $@-t $@
95 endef
96
89 moc-%.cc: %.h 97 moc-%.cc: %.h
90 $(MOC) -o$@ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(MOC_CPPFLAGS) $(liboctgui_la_CPPFLAGS) $< 98 $(moc-command)
91 99
92 ui-%.h: %.ui 100 ui-%.h: %.ui
93 $(UIC) -o $@ $< 101 $(UIC) -o $@ $<
94 102
95 qrc-%.cc: %.qrc 103 qrc-%.cc: %.qrc