diff options
-rw-r--r-- | filter/Library_svgfilter.mk | 25 | ||||
-rw-r--r-- | filter/Module_filter.mk | 1 | ||||
-rw-r--r-- | filter/Package_filter_generated.mk | 39 | ||||
-rw-r--r-- | filter/source/svg/Makefile | 76 | ||||
-rw-r--r-- | solenv/gbuild/gbuild_simple.mk | 2 |
5 files changed, 132 insertions, 11 deletions
diff --git a/filter/Library_svgfilter.mk b/filter/Library_svgfilter.mk index 31087a1232ab..23119d4ad705 100644 --- a/filter/Library_svgfilter.mk +++ b/filter/Library_svgfilter.mk @@ -19,8 +19,14 @@ $(eval $(call gb_Library_Library,svgfilter)) +$(eval $(call gb_Library_add_package_headers,svgfilter,filter_generated)) + $(eval $(call gb_Library_set_componentfile,svgfilter,filter/source/svg/svgfilter)) +$(eval $(call gb_Library_add_defs,svgfilter,\ + -DUSE_MODERN_SPIRIT \ +)) + $(eval $(call gb_Library_add_api,svgfilter,\ udkapi \ offapi \ @@ -29,6 +35,7 @@ $(eval $(call gb_Library_add_api,svgfilter,\ $(eval $(call gb_Library_set_include,svgfilter,\ -I$(SRCDIR)/filter/inc/pch \ $$(INCLUDE) \ + -I$(WORKDIR)/CustomTarget/filter/source/svg \ )) $(eval $(call gb_Library_add_linked_libs,svgfilter,\ @@ -48,25 +55,21 @@ $(eval $(call gb_Library_add_linked_libs,svgfilter,\ $(gb_STDLIBS) \ )) -ifneq ($(SOLAR_JAVA),) -$(eval $(call gb_Library_add_linked_libs,svgfilter,\ - jvmaccess \ -)) -endif +$(call gb_Library_use_externals,svgfilter,libxml2) $(eval $(call gb_Library_add_exception_objects,svgfilter,\ + filter/source/svg/b2dellipse \ filter/source/svg/impsvgdialog \ + filter/source/svg/parserfragments \ filter/source/svg/svgdialog \ filter/source/svg/svgexport \ filter/source/svg/svgfilter \ filter/source/svg/svgfontexport \ - filter/source/svg/svgwriter \ -)) - -ifneq ($(SOLAR_JAVA),) -$(eval $(call gb_Library_add_exception_objects,svgfilter,\ filter/source/svg/svgimport \ + filter/source/svg/svgreader \ + filter/source/svg/svgwriter \ + filter/source/svg/tokenmap \ + filter/source/svg/units \ )) -endif # vim: set noet sw=4 ts=4: diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk index 0567f86099ac..c1ba5959a0eb 100644 --- a/filter/Module_filter.mk +++ b/filter/Module_filter.mk @@ -60,6 +60,7 @@ $(eval $(call gb_Module_add_targets,filter,\ Library_xsltfilter \ Package_inc \ Package_docbook \ + Package_filter_generated \ Package_xslt \ )) diff --git a/filter/Package_filter_generated.mk b/filter/Package_filter_generated.mk new file mode 100644 index 000000000000..bdcd213b15a8 --- /dev/null +++ b/filter/Package_filter_generated.mk @@ -0,0 +1,39 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2011 Michael Stahl <mst@openoffice.org> (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Package_Package,filter_generated,$(WORKDIR)/CustomTarget/filter/source/svg)) + +$(eval $(call gb_Package_add_customtarget,filter_generated,filter/source/svg,SRCDIR)) + +$(eval $(call gb_CustomTarget_add_dependencies,filter/source/svg,\ + filter/source/svg/gentoken.pl \ + filter/source/svg/tokens.txt \ + filter/source/svg/presentation_engine.js \ + filter/source/svg/js2hxx.py \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/filter/source/svg/Makefile b/filter/source/svg/Makefile new file mode 100644 index 000000000000..5ccd63268759 --- /dev/null +++ b/filter/source/svg/Makefile @@ -0,0 +1,76 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2011 Michael Stahl <mst@openoffice.org> (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +SRCDIR_FILTER := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) +WORKDIR_FILTER := . + +include $(GBUILDDIR)/gbuild_simple.mk + +filter_SRC_svg_Tokens := $(SRCDIR_FILTER)/tokens.txt +filter_SRC_svg_GenToken := $(SRCDIR_FILTER)/gentoken.pl +filter_SRC_svg_PresentationEngine := $(SRCDIR_FILTER)/presentation_engine.js +filter_SRC_svg_Js2Hxx := $(SRCDIR_FILTER)/js2hxx.py + +filter_GEN_svg_Tokens_gperf := $(WORKDIR_FILTER)/tokens.gperf +filter_GEN_svg_Tokens_hxx := $(WORKDIR_FILTER)/tokens.hxx +filter_GEN_svg_Tokens_cxx := $(WORKDIR_FILTER)/tokens.cxx +filter_GEN_svg_Script_hxx := $(WORKDIR_FILTER)/svgscript.hxx + +$(filter_GEN_svg_Tokens_gperf) : \ + $(filter_SRC_svg_GenToken) $(filter_SRC_svg_Tokens) + $(call gb_Output_announce,$@,build,GPF,3) + $(call gb_Helper_abbreviate_dirs, \ + $(PERL) $(filter_SRC_svg_GenToken) $(filter_SRC_svg_Tokens) \ + $(filter_GEN_svg_Tokens_hxx) $(filter_GEN_svg_Tokens_gperf)) + +# dummy rule: both files generated by recipe above +$(filter_GEN_svg_Tokens_hxx) : $(filter_GEN_svg_Tokens_gperf) + +$(filter_GEN_svg_Tokens_cxx) : $(filter_GEN_svg_Tokens_gperf) + $(call gb_Output_announce,$@,build,GPF,1) + $(call gb_Helper_abbreviate_dirs, \ + gperf --compare-strncmp -C -m 20 $(filter_GEN_svg_Tokens_gperf) \ + | sed -e "s/(char\*)0/(char\*)0$(COMMA) 0/g" \ + > $(filter_GEN_svg_Tokens_cxx)) + +$(filter_GEN_svg_Script_hxx) : \ + $(filter_SRC_svg_PresentationEngine) $(filter_SRC_svg_Js2Hxx) + $(call gb_Output_announce,$@,build,PY ,1) + $(call gb_Helper_abbreviate_dirs, \ + $(gb_PYTHON) $(filter_SRC_svg_Js2Hxx) \ + $(filter_SRC_svg_PresentationEngine) \ + $(filter_GEN_svg_Script_hxx)) + +.DEFAULT_GOAL:=all +.PHONY: all +all : \ + $(filter_GEN_svg_Tokens_gperf) \ + $(filter_GEN_svg_Tokens_hxx) \ + $(filter_GEN_svg_Tokens_cxx) \ + $(filter_GEN_svg_Script_hxx) \ + +# vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/gbuild_simple.mk b/solenv/gbuild/gbuild_simple.mk index 18d1e07beb3a..002dd27adbeb 100644 --- a/solenv/gbuild/gbuild_simple.mk +++ b/solenv/gbuild/gbuild_simple.mk @@ -28,6 +28,8 @@ # this is a subset of gbuild functionality, for use in custom makefiles +COMMA :=, + include $(GBUILDDIR)/Output.mk # BuildDirs uses the Output functions already |