Kaydet (Commit) e16cc171 authored tarafından Michael Stahl's avatar Michael Stahl

odk: fix CustomTarget_allheaders for Win32 make

This one also has an overly long command line that is cut off.

Change-Id: I2d49e39b5dca6e1d84fffcb3212042b6d82c13f3
üst 7627008b
...@@ -14,10 +14,26 @@ odk_allheaders_DIR := $(call gb_CustomTarget_get_workdir,odk/allheaders) ...@@ -14,10 +14,26 @@ odk_allheaders_DIR := $(call gb_CustomTarget_get_workdir,odk/allheaders)
$(call gb_CustomTarget_get_target,odk/allheaders) : \ $(call gb_CustomTarget_get_target,odk/allheaders) : \
$(odk_allheaders_DIR)/allheaders.hxx $(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 : \ $(odk_allheaders_DIR)/allheaders.hxx : \
$(call gb_PackageSet_get_target,odk_headers) \ $(call gb_PackageSet_get_target,odk_headers) \
| $(odk_allheaders_DIR)/.dir | $(odk_allheaders_DIR)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
ifeq ($(HAVE_GNUMAKE_FILE_FUNC),)
printf '// Generated list of sal includes\n' > $@ && \ printf '// Generated list of sal includes\n' > $@ && \
printf '#ifdef WNT\n' >> $@ && \ printf '#ifdef WNT\n' >> $@ && \
printf '#include <windows.h>\n' >> $@ && \ printf '#include <windows.h>\n' >> $@ && \
...@@ -27,5 +43,10 @@ $(odk_allheaders_DIR)/allheaders.hxx : \ ...@@ -27,5 +43,10 @@ $(odk_allheaders_DIR)/allheaders.hxx : \
&& printf '#include <%s>\n' $(subst $(INSTDIR)/$(SDKDIRNAME)/include/,,$(file)) >> $@ \ && printf '#include <%s>\n' $(subst $(INSTDIR)/$(SDKDIRNAME)/include/,,$(file)) >> $@ \
$(if $(findstring /win32/,$(file)),&& printf '#endif // WNT\n' >> $@) \ $(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: # vim: set noet sw=4 ts=4:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment