Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / oox / CustomTarget_generated.mk
blob92c8bf8196d84b93743e03efd506de0e179213e3
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,oox/generated))
12 oox_SRC := $(SRCDIR)/oox/source/token
13 oox_MISC := $(call gb_CustomTarget_get_workdir,oox/generated)/misc
14 oox_INC := $(call gb_CustomTarget_get_workdir,oox/generated)
15 oox_GENHEADERPATH := $(oox_INC)/oox/token
17 $(oox_MISC)/vmlexport-shape-types.cxx : \
18 $(SRCDIR)/oox/source/export/preset-definitions-to-shape-types.pl \
19 $(SRCDIR)/oox/source/export/presetShapeDefinitions.xml \
20 $(SRCDIR)/oox/source/export/presetTextWarpDefinitions.xml
21 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PRL,1)
22 mkdir -p $(dir $@)
23 perl $^ > $@.in_progress 2> $@.log && mv $@.in_progress $@
25 $(oox_INC)/tokenhash.inc : $(oox_MISC)/tokenhash.gperf
26 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,GPF,1)
27 $(GPERF) --compare-strncmp $< | sed -e 's/(char\*)0/(char\*)0, 0/g' | grep -v '^#line' > $@
29 define oox_GenTarget
30 $(oox_MISC)/$(2)ids.inc $(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) : \
31 $(oox_GENHEADERPATH)/$(1).hxx
32 @touch $$@
34 $(oox_GENHEADERPATH)/$(1).hxx : $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt \
35 $(oox_SRC)/$(1).hxx.head $(oox_SRC)/$(1).hxx.tail
36 $$(call gb_Output_announce,$$(subst $(WORKDIR)/,,$$@),build,PRL,1)
37 mkdir -p $(oox_MISC) $(oox_INC) $(oox_GENHEADERPATH)
38 perl $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt $(oox_MISC)/$(2)ids.inc \
39 $(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) \
40 && cat $(oox_SRC)/$(1).hxx.head $(oox_MISC)/$(2)ids.inc \
41 $(oox_SRC)/$(1).hxx.tail > $(oox_GENHEADERPATH)/$(1).hxx \
42 && touch $$@
43 endef
45 $(eval $(call oox_GenTarget,namespaces,namespace,namespaces.txt))
46 $(eval $(call oox_GenTarget,properties,property,))
47 $(eval $(call oox_GenTarget,tokens,token,tokenhash.gperf))
49 $(call gb_CustomTarget_get_target,oox/generated) : \
50 $(oox_MISC)/vmlexport-shape-types.cxx \
51 $(oox_INC)/tokenhash.inc \
52 $(oox_INC)/tokennames.inc \
53 $(oox_INC)/namespacenames.inc \
54 $(oox_INC)/propertynames.inc \
55 $(oox_GENHEADERPATH)/tokens.hxx \
56 $(oox_GENHEADERPATH)/namespaces.hxx \
57 $(oox_GENHEADERPATH)/properties.hxx \
58 $(oox_MISC)/namespaces.txt \
60 # vim: set noet sw=4 ts=4: