1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
4 # This file is part of the LibreOffice project.
6 # This Source Code Form is subject to the terms of the Mozilla Public
7 # License, v. 2.0. If a copy of the MPL was not distributed with this
8 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 $(eval
$(call gb_CustomTarget_CustomTarget
,filter/source
/svg
))
13 filter_SVGSRC
:= $(SRCDIR
)/filter/source
/svg
14 filter_SVGWORK
:= $(call gb_CustomTarget_get_workdir
,filter/source
/svg
)
16 filter_SRC_svg_Tokens
:= $(filter_SVGSRC
)/tokens.txt
17 filter_SRC_svg_GenToken
:= $(filter_SVGSRC
)/gentoken.pl
18 filter_SRC_svg_PresentationEngine
:= $(filter_SVGSRC
)/presentation_engine.js
19 filter_SRC_svg_Js2Hxx
:= $(filter_SVGSRC
)/js2hxx.py
21 filter_GEN_svg_Tokens_gperf
:= $(filter_SVGWORK
)/tokens.gperf
22 filter_GEN_svg_Tokens_hxx
:= $(filter_SVGWORK
)/tokens.hxx
23 filter_GEN_svg_Tokens_cxx
:= $(filter_SVGWORK
)/tokens.
cxx
24 filter_GEN_svg_Script_hxx
:= $(filter_SVGWORK
)/svgscript.hxx
26 $(filter_GEN_svg_Tokens_gperf
) : \
27 $(filter_SRC_svg_GenToken
) $(filter_SRC_svg_Tokens
) \
28 |
$(filter_SVGWORK
)/.
dir
29 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,GPF
,3)
30 $(call gb_Helper_abbreviate_dirs
, \
31 $(PERL
) $(filter_SRC_svg_GenToken
) $(filter_SRC_svg_Tokens
) \
32 $(filter_GEN_svg_Tokens_hxx
) $(filter_GEN_svg_Tokens_gperf
))
34 # dummy rule: both files generated by recipe above
35 $(filter_GEN_svg_Tokens_hxx
) : $(filter_GEN_svg_Tokens_gperf
)
37 $(filter_GEN_svg_Tokens_cxx
) : $(filter_GEN_svg_Tokens_gperf
)
38 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,GPF
,1)
39 $(call gb_Helper_abbreviate_dirs
, \
40 $(GPERF
) --compare-strncmp
-C
-m
20 $(filter_GEN_svg_Tokens_gperf
) \
41 | sed
-e
"s/(char\*)0/(char\*)0$(COMMA) 0/g" \
42 > $(filter_GEN_svg_Tokens_cxx
))
44 $(filter_GEN_svg_Script_hxx
) : \
45 $(call gb_ExternalExecutable_get_dependencies
,python
) \
46 $(filter_SRC_svg_PresentationEngine
) $(filter_SRC_svg_Js2Hxx
) \
47 |
$(filter_SVGWORK
)/.
dir
48 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
49 $(call gb_Helper_abbreviate_dirs
, \
50 $(call gb_ExternalExecutable_get_command
,python
) $(filter_SRC_svg_Js2Hxx
) \
51 $(filter_SRC_svg_PresentationEngine
) \
52 $(filter_GEN_svg_Script_hxx
))
54 $(call gb_CustomTarget_get_target
,filter/source
/svg
) : \
55 $(filter_GEN_svg_Tokens_gperf
) \
56 $(filter_GEN_svg_Tokens_hxx
) \
57 $(filter_GEN_svg_Tokens_cxx
) \
58 $(filter_GEN_svg_Script_hxx
) \
60 # vim: set noet sw=4 ts=4: