Fix typo
[LibreOffice.git] / odk / CustomTarget_allheaders.mk
blob55961b64306b28bdcc69f987024673f6c4dce8be
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 := $(gb_CustomTarget_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 _WIN32
20 #include <windows.h>
21 #endif
23 endef
25 define odk_geninclude
26 $(if $(2),#ifdef _WIN32)
27 #include <$(subst $(INSTDIR)/$(SDKDIRNAME)/include/,,$(1))>
28 $(if $(2),#endif)
30 endef
32 $(odk_allheaders_DIR)/allheaders.hxx : \
33 $(call gb_Package_get_target,odk_headers) \
34 $(call gb_Package_get_target,odk_headers_generated) \
35 | $(odk_allheaders_DIR)/.dir
36 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
37 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH)
38 $(file >$@,\
39 $(call odk_genincludesheader) \
40 $(foreach file,$(shell cat $^),$(call odk_geninclude,$(file),$(findstring /win32/,$(file)))))
41 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH)
43 # vim: set noet sw=4 ts=4: