[Libreoffice-commits] core.git: officecfg/CustomTarget_registry.mk

Michael Stahl mstahl at redhat.com
Thu Jun 12 07:56:33 PDT 2014


 officecfg/CustomTarget_registry.mk |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 9850c7258b2cb62b204895a72c4b01269ebb5110
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jun 12 16:46:22 2014 +0200

    officecfg: fix build of officecfg_qa_allheaders.hxx with Win32 make
    
    The "#" character and line-breaks make it difficult to use the
    non-$(file) var2file here so add a hacky conditional.
    
    Change-Id: I1618a96b54209588cfe24190bfcbcda5b83f980f

diff --git a/officecfg/CustomTarget_registry.mk b/officecfg/CustomTarget_registry.mk
index 2bda037..9aa1717 100644
--- a/officecfg/CustomTarget_registry.mk
+++ b/officecfg/CustomTarget_registry.mk
@@ -13,14 +13,24 @@ $(call gb_CustomTarget_get_target,officecfg/registry) : \
 	$(foreach i,officecfg_qa_allheaders $(officecfg_XCSFILES),\
 		$(call gb_CustomTarget_get_workdir,officecfg/registry)/officecfg/$(i).hxx)
 
+# via define so it can end with a newline
+define officecfg_geninclude
+#include <officecfg/$(1).hxx>
+
+endef
+
 # auto generated header file for unit test qa/cppheader.cxx
 $(call gb_CustomTarget_get_workdir,officecfg/registry)/officecfg/officecfg_qa_allheaders.hxx: \
 		$(SRCDIR)/officecfg/files.mk
 	$(call gb_Output_announce,officecfg_qa_allheaders.hxx,$(true),CAT,1)
+ifeq ($(HAVE_GNUMAKE_FILE_FUNC),)
 	mkdir -p $(dir $@) && \
 	rm -f $@ \
 	$(foreach file,$(officecfg_XCSFILES),\
 		&& echo "#include <officecfg/$(file).hxx>" >> $@)
+else
+	mv $(call var2file,$(shell mkdir -p $(dir $@) && truncate -s 0 $@.tmp && echo $@.tmp),100,$(foreach file,$(officecfg_XCSFILES),$(call officecfg_geninclude,$(file)))) $@
+endif
 
 # pass the stem as space separated path elements and get a set of --stringparam ns<level> <element> in return
 officecfg_xsltparams=$(if $(filter-out $(lastword $1),$1),$(call officecfg_xsltparams,$(filter-out $(lastword $1),$1))) --stringparam ns$(words $1) $(lastword $1)


More information about the Libreoffice-commits mailing list