Mercurial > octave-nkf
diff libgui/Makefile.am @ 17952:96c76878c7c6
Include <config.h> in C++ files generated from resources.
* libgui/Makefile.am (rcc-command): New variable.
(qr-%.cc): Use it to translate resources to C++.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Mon, 18 Nov 2013 19:11:29 -0500 |
parents | efbed19b8e04 |
children | 2e7cad6f180c ef7bb00d8167 |
line wrap: on
line diff
--- a/libgui/Makefile.am Mon Nov 18 15:07:01 2013 -0800 +++ b/libgui/Makefile.am Mon Nov 18 19:11:29 2013 -0500 @@ -94,6 +94,14 @@ mv $@-t $@ endef +define rcc-command +( echo '#ifdef HAVE_CONFIG_H'; \ + echo '#include <config.h>'; \ + echo '#endif'; \ + $(RCC) $< ) > $@-t +mv $@-t $@ +endef + moc-%.cc: %.h $(moc-command) @@ -101,7 +109,7 @@ $(UIC) -o $@ $< qrc-%.cc: %.qrc - $(RCC) -o $@ $< + $(rcc-command) %.qm: %.ts $(MKDIR_P) languages