Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / filter / CustomTarget_svg.mk
blob67be7c02a17379b4a93a03ada5c7da6aa5ceddb9
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # Version: MPL 1.1 / GPLv3+ / LGPLv3+
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License or as specified alternatively below. You may obtain a copy of
8 # the License at http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
13 # License.
15 # Major Contributor(s):
16 # Copyright (C) 2011 Michael Stahl <mst@openoffice.org> (initial developer)
18 # All Rights Reserved.
20 # For minor contributions see the git repository.
22 # Alternatively, the contents of this file may be used under the terms of
23 # either the GNU General Public License Version 3 or later (the "GPLv3+"), or
24 # the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
25 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
26 # instead of those above.
28 $(eval $(call gb_CustomTarget_CustomTarget,filter/source/svg))
30 filter_SVGSRC := $(SRCDIR)/filter/source/svg
31 filter_SVGWORK := $(call gb_CustomTarget_get_workdir,filter/source/svg)
33 filter_SRC_svg_Tokens := $(filter_SVGSRC)/tokens.txt
34 filter_SRC_svg_GenToken := $(filter_SVGSRC)/gentoken.pl
35 filter_SRC_svg_PresentationEngine := $(filter_SVGSRC)/presentation_engine.js
36 filter_SRC_svg_Js2Hxx := $(filter_SVGSRC)/js2hxx.py
38 filter_GEN_svg_Tokens_gperf := $(filter_SVGWORK)/tokens.gperf
39 filter_GEN_svg_Tokens_hxx := $(filter_SVGWORK)/tokens.hxx
40 filter_GEN_svg_Tokens_cxx := $(filter_SVGWORK)/tokens.cxx
41 filter_GEN_svg_Script_hxx := $(filter_SVGWORK)/svgscript.hxx
43 $(filter_GEN_svg_Tokens_gperf) : \
44 $(filter_SRC_svg_GenToken) $(filter_SRC_svg_Tokens) \
45 | $(filter_SVGWORK)/.dir
46 $(call gb_Output_announce,$@,build,GPF,3)
47 $(call gb_Helper_abbreviate_dirs, \
48 $(PERL) $(filter_SRC_svg_GenToken) $(filter_SRC_svg_Tokens) \
49 $(filter_GEN_svg_Tokens_hxx) $(filter_GEN_svg_Tokens_gperf))
51 # dummy rule: both files generated by recipe above
52 $(filter_GEN_svg_Tokens_hxx) : $(filter_GEN_svg_Tokens_gperf)
54 $(filter_GEN_svg_Tokens_cxx) : $(filter_GEN_svg_Tokens_gperf)
55 $(call gb_Output_announce,$@,build,GPF,1)
56 $(call gb_Helper_abbreviate_dirs, \
57 $(GPERF) --compare-strncmp -C -m 20 $(filter_GEN_svg_Tokens_gperf) \
58 | sed -e "s/(char\*)0/(char\*)0$(COMMA) 0/g" \
59 > $(filter_GEN_svg_Tokens_cxx))
61 $(filter_GEN_svg_Script_hxx) : \
62 $(call gb_ExternalExecutable_get_dependencies,python) \
63 $(filter_SRC_svg_PresentationEngine) $(filter_SRC_svg_Js2Hxx) \
64 | $(filter_SVGWORK)/.dir
65 $(call gb_Output_announce,$@,build,PY ,1)
66 $(call gb_Helper_abbreviate_dirs, \
67 $(call gb_ExternalExecutable_get_command,python) $(filter_SRC_svg_Js2Hxx) \
68 $(filter_SRC_svg_PresentationEngine) \
69 $(filter_GEN_svg_Script_hxx))
71 $(call gb_CustomTarget_get_target,filter/source/svg) : \
72 $(filter_GEN_svg_Tokens_gperf) \
73 $(filter_GEN_svg_Tokens_hxx) \
74 $(filter_GEN_svg_Tokens_cxx) \
75 $(filter_GEN_svg_Script_hxx) \
77 # vim: set noet sw=4 ts=4: