fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / odk / CustomTarget_allheaders.mk
blob5f22d8544e30b17dc3481ecfe9f53313a1208a94
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_CustomTarget_CustomTarget,odk/allheaders))
12 odk_allheaders_DIR := $(call gb_CustomTarget_get_workdir,odk/allheaders)
14 $(call gb_CustomTarget_get_target,odk/allheaders) : \
15 $(odk_allheaders_DIR)/allheaders.hxx
17 define odk_genincludesheader
18 // Generated list of sal includes
19 #ifdef WNT
20 #include <windows.h>
21 #endif
23 endef
25 define odk_geninclude
26 $(if $(2),#ifdef WNT)
27 #include <$(subst $(INSTDIR)/$(SDKDIRNAME)/include/,,$(1))>
28 $(if $(2),#endif)
30 endef
32 $(odk_allheaders_DIR)/allheaders.hxx : \
33 $(call gb_PackageSet_get_target,odk_headers) \
34 | $(odk_allheaders_DIR)/.dir
35 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
36 ifeq ($(HAVE_GNUMAKE_FILE_FUNC),)
37 printf '// Generated list of sal includes\n' > $@ && \
38 printf '#ifdef WNT\n' >> $@ && \
39 printf '#include <windows.h>\n' >> $@ && \
40 printf '#endif\n' >> $@ \
41 $(foreach file,$(shell cat $^),\
42 $(if $(findstring /win32/,$(file)),&& printf '#ifdef WNT\n' >> $@) \
43 && printf '#include <%s>\n' $(subst $(INSTDIR)/$(SDKDIRNAME)/include/,,$(file)) >> $@ \
44 $(if $(findstring /win32/,$(file)),&& printf '#endif // WNT\n' >> $@) \
46 else
47 $(file >$@,\
48 $(call odk_genincludesheader) \
49 $(foreach file,$(shell cat $^),$(call odk_geninclude,$(file),$(findstring /win32/,$(file)))))
50 endif
52 # vim: set noet sw=4 ts=4: