summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/CustomTarget_generated.mk59
-rw-r--r--oox/Library_oox.mk44
-rw-r--r--oox/Module_oox.mk1
-rw-r--r--oox/Package_generated.mk2
4 files changed, 64 insertions, 42 deletions
diff --git a/oox/CustomTarget_generated.mk b/oox/CustomTarget_generated.mk
new file mode 100644
index 000000000000..55d4ca1474a6
--- /dev/null
+++ b/oox/CustomTarget_generated.mk
@@ -0,0 +1,59 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# Copyright 2012 LibreOffice contributors.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,oox/generated))
+
+$(call gb_GenCxxObject_get_source,oox/source/export/vmlexport-shape-types) : \
+ $(SRCDIR)/oox/source/export/preset-definitions-to-shape-types.pl \
+ $(SRCDIR)/oox/source/export/presetShapeDefinitions.xml \
+ $(SRCDIR)/oox/source/export/presetTextWarpDefinitions.xml
+ mkdir -p $(dir $@)
+ perl $^ > $@.in_progress 2> $@.log && mv $@.in_progress $@
+
+oox_SRC := $(SRCDIR)/oox/source/token
+oox_MISC := $(call gb_CustomTarget_get_workdir,oox/generated)/misc
+oox_INC := $(call gb_CustomTarget_get_workdir,oox/generated)/inc
+oox_GENHEADERPATH := $(oox_INC)/oox/token
+
+$(oox_INC)/tokenhash.inc : $(oox_MISC)/tokenhash.gperf
+ $(GPERF) --compare-strncmp $< | sed -e 's/(char\*)0/(char\*)0, 0/g' | grep -v '^#line' > $@
+
+oox_GenTarget_get_target = $(oox_MISC)/$(1)
+
+define oox_GenTarget
+$(oox_GENHEADERPATH)/$(1).hxx $(oox_MISC)/$(2)ids.inc $(oox_INC)/$(2)names.inc \
+ $(if $(3),$(oox_MISC)/$(3)) : $(call oox_GenTarget_get_target,$(1))
+ @touch $$@
+
+$(call oox_GenTarget_get_target,$(1)) : $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt \
+ $(oox_SRC)/$(1).hxx.head $(oox_SRC)/$(1).hxx.tail
+ mkdir -p $(oox_MISC) $(oox_INC) $(oox_GENHEADERPATH)
+ perl $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt $(oox_MISC)/$(2)ids.inc \
+ $(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) \
+ && cat $(oox_SRC)/$(1).hxx.head $(oox_MISC)/$(2)ids.inc \
+ $(oox_SRC)/$(1).hxx.tail > $(oox_GENHEADERPATH)/$(1).hxx \
+ && touch $$@
+endef
+
+$(eval $(call oox_GenTarget,namespaces,namespace,namespaces.txt))
+$(eval $(call oox_GenTarget,properties,property,))
+$(eval $(call oox_GenTarget,tokens,token,tokenhash.gperf))
+
+$(call gb_CustomTarget_get_target,oox/generated) : \
+ $(call gb_GenCxxObject_get_source,oox/source/export/vmlexport-shape-types) \
+ $(oox_INC)/tokenhash.inc \
+ $(oox_INC)/tokennames.inc \
+ $(oox_INC)/namespacenames.inc \
+ $(oox_INC)/propertynames.inc \
+ $(oox_GENHEADERPATH)/tokens.hxx \
+ $(oox_GENHEADERPATH)/namespaces.hxx \
+ $(oox_GENHEADERPATH)/properties.hxx \
+ $(oox_MISC)/namespaces.txt \
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 778a56ec6bc6..8f25d9f5b3af 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -33,9 +33,12 @@ $(eval $(call gb_Library_use_packages,oox,\
oox_tokens \
))
+$(eval $(call gb_Library_use_custom_headers,oox,oox/generated))
+
$(eval $(call gb_Library_set_include,oox,\
$$(INCLUDE) \
-I$(SRCDIR)/oox/inc \
+ -I$(call gb_CustomTarget_get_workdir,oox/generated)/inc \
))
ifeq ($(COM)-$(OS)-$(CPUNAME),GCC-LINUX-IA64)
@@ -291,45 +294,4 @@ $(eval $(call gb_Library_add_generated_exception_objects,oox,\
oox/source/export/vmlexport-shape-types \
))
-$(call gb_GenCxxObject_get_source,oox/source/export/vmlexport-shape-types) : $(SRCDIR)/oox/source/export/preset-definitions-to-shape-types.pl $(SRCDIR)/oox/source/export/presetShapeDefinitions.xml $(SRCDIR)/oox/source/export/presetTextWarpDefinitions.xml
- mkdir -p $(dir $@)
- perl $^ > $@.in_progress 2> $@.log && mv $@.in_progress $@
-
-oox_SRC := $(SRCDIR)/oox/source/token
-oox_MISC := $(WORKDIR)/oox/misc
-oox_INC := $(WORKDIR)/oox/inc
-oox_GENHEADERPATH := $(oox_INC)/oox/token
-
-$(call gb_CxxObject_get_target,oox/source/token/tokenmap) : $(oox_INC)/tokenhash.inc
-
-$(eval $(call gb_Library_set_include,oox,\
- $$(INCLUDE) \
- -I$(oox_INC) \
-))
-
-$(oox_INC)/tokenhash.inc : $(oox_MISC)/tokenhash.gperf
- $(GPERF) --compare-strncmp $< | sed -e 's/(char\*)0/(char\*)0, 0/g' | grep -v '^#line' > $@
-
-oox_GenTarget_get_target = $(oox_MISC)/$(1)
-
-define oox_GenTarget_GenTarget
-$(oox_GENHEADERPATH)/$(1).hxx $(oox_MISC)/$(2)ids.inc $(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) : $(call oox_GenTarget_get_target,$(1))
- @touch $$@
-$(call oox_GenTarget_get_target,$(1)) : $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt $(oox_SRC)/$(1).hxx.head $(oox_SRC)/$(1).hxx.tail
- mkdir -p $(oox_MISC) $(oox_INC) $(oox_GENHEADERPATH)
- perl $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt $(oox_MISC)/$(2)ids.inc $(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) \
- && cat $(oox_SRC)/$(1).hxx.head $(oox_MISC)/$(2)ids.inc $(oox_SRC)/$(1).hxx.tail > $(oox_GENHEADERPATH)/$(1).hxx \
- && touch $$@
-endef
-
-$(eval $(call oox_GenTarget_GenTarget,namespaces,namespace,namespaces.txt))
-$(eval $(call oox_GenTarget_GenTarget,properties,property,))
-$(eval $(call oox_GenTarget_GenTarget,tokens,token,tokenhash.gperf))
-
-$(call gb_Library_get_clean_target,oox) : oox_clean
-
-oox_clean :
- rm -rf $(WORKDIR)/oox
-.PHONY: oox_clean
-
# vim: set noet sw=4 ts=4:
diff --git a/oox/Module_oox.mk b/oox/Module_oox.mk
index 538b36a77869..13da5fd1ad03 100644
--- a/oox/Module_oox.mk
+++ b/oox/Module_oox.mk
@@ -28,6 +28,7 @@
$(eval $(call gb_Module_Module,oox))
$(eval $(call gb_Module_add_targets,oox,\
+ CustomTarget_generated \
Library_oox \
Package_inc \
Package_generated \
diff --git a/oox/Package_generated.mk b/oox/Package_generated.mk
index 75138ea0bfc6..25152d22f64e 100644
--- a/oox/Package_generated.mk
+++ b/oox/Package_generated.mk
@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
-$(eval $(call gb_Package_Package,oox_generated,$(WORKDIR)/oox))
+$(eval $(call gb_Package_Package,oox_generated,$(call gb_CustomTarget_get_workdir,oox/generated)))
$(eval $(call gb_Package_add_file,oox_generated,inc/oox/token/tokens.hxx,inc/oox/token/tokens.hxx))
$(eval $(call gb_Package_add_file,oox_generated,inc/oox/token/namespaces.hxx,inc/oox/token/namespaces.hxx))