From: marco Date: Wed, 20 Sep 2006 14:28:08 +0000 (+0000) Subject: Workaround about moc generation. X-Git-Tag: 1.0.0~530 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d02661d0d240f611d33b93f7d60b038d7153410b;p=bertos.git Workaround about moc generation. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@711 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/rules.mk b/rules.mk index 8095a1bc..b8fed454 100755 --- a/rules.mk +++ b/rules.mk @@ -10,6 +10,9 @@ # Author: Bernardo Innocenti # # $Log$ +# Revision 1.7 2006/09/20 14:28:08 marco +# Workaround about moc generation. +# # Revision 1.6 2006/09/13 18:38:59 bernie # Sort CPP options to let apps override include paths. # @@ -232,6 +235,15 @@ endef # Generate build rules for all targets $(foreach t,$(TRG),$(eval $(call build_target,$(t)))) +# Generate Qt's moc files from headers +# NOTE: moc totally sucks and can generate empty files for some error conditions, +# leading to puzzling linker errors. Kill 'em and abort build. +%_moc.cpp: %.h + $(MOC) -o $@ $< + if [ -s $< ]; then \ + rm $@; \ + exit 1; \ + fi %.hex: %.elf $(OBJCOPY) -O ihex $< $@