[Libreoffice-commits] core.git: odk/CustomTarget_allheaders.mk

Michael Stahl mstahl at redhat.com
Tue Aug 5 05:57:42 PDT 2014


 odk/CustomTarget_allheaders.mk |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

New commits:
commit e16cc171f161178e7cad55565bdbb6eab238176b
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Aug 5 14:51:36 2014 +0200

    odk: fix CustomTarget_allheaders for Win32 make
    
    This one also has an overly long command line that is cut off.
    
    Change-Id: I2d49e39b5dca6e1d84fffcb3212042b6d82c13f3

diff --git a/odk/CustomTarget_allheaders.mk b/odk/CustomTarget_allheaders.mk
index 050648c..5f22d85 100644
--- a/odk/CustomTarget_allheaders.mk
+++ b/odk/CustomTarget_allheaders.mk
@@ -14,10 +14,26 @@ odk_allheaders_DIR := $(call gb_CustomTarget_get_workdir,odk/allheaders)
 $(call gb_CustomTarget_get_target,odk/allheaders) : \
 	$(odk_allheaders_DIR)/allheaders.hxx
 
+define odk_genincludesheader
+// Generated list of sal includes
+#ifdef WNT
+#include <windows.h>
+#endif
+
+endef
+
+define odk_geninclude
+$(if $(2),#ifdef WNT)
+#include <$(subst $(INSTDIR)/$(SDKDIRNAME)/include/,,$(1))>
+$(if $(2),#endif)
+
+endef
+
 $(odk_allheaders_DIR)/allheaders.hxx : \
 			  $(call gb_PackageSet_get_target,odk_headers) \
             | $(odk_allheaders_DIR)/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
+ifeq ($(HAVE_GNUMAKE_FILE_FUNC),)
 	printf '// Generated list of sal includes\n' > $@ && \
 	printf '#ifdef WNT\n' >> $@ && \
 	printf '#include <windows.h>\n' >> $@ && \
@@ -27,5 +43,10 @@ $(odk_allheaders_DIR)/allheaders.hxx : \
 	    && printf '#include <%s>\n' $(subst $(INSTDIR)/$(SDKDIRNAME)/include/,,$(file)) >> $@ \
 		$(if $(findstring /win32/,$(file)),&& printf '#endif // WNT\n' >> $@) \
 	)
+else
+	$(file >$@,\
+		$(call odk_genincludesheader) \
+		$(foreach file,$(shell cat $^),$(call odk_geninclude,$(file),$(findstring /win32/,$(file)))))
+endif
 
 # vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list