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
,readlicense_oo
/license
))
12 readlicense_oo_DIR
:= $(call gb_CustomTarget_get_workdir
,readlicense_oo
/license
)
13 readlicense_oo_LICENSE_xml
:= $(SRCDIR
)/readlicense_oo
/license
/license.xml
15 $(call gb_CustomTarget_get_target
,readlicense_oo
/license
) : $(readlicense_oo_DIR
)/LICENSE.html
18 $(call gb_CustomTarget_get_target
,readlicense_oo
/license
) : $(readlicense_oo_DIR
)/license.txt
20 $(call gb_CustomTarget_get_target
,readlicense_oo
/license
) : $(readlicense_oo_DIR
)/LICENSE
23 $(readlicense_oo_DIR
)/LICENSE.html
: \
24 $(SRCDIR
)/readlicense_oo
/license
/license_html.xsl \
25 $(readlicense_oo_LICENSE_xml
) \
26 |
$(readlicense_oo_DIR
)/.
dir \
27 $(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
28 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),XSL
,1)
29 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),XSL
)
30 $(call gb_Helper_abbreviate_dirs
, \
31 $(call gb_ExternalExecutable_get_command
,xsltproc
) --nonet
--novalid
-o
$@ \
32 --stringparam build_type
"$(BUILD_TYPE)" \
33 --stringparam os
"$(OS)" \
34 --stringparam themes
"$(WITH_THEMES)" \
35 $(if
$(MPL_SUBSET
),,--stringparam no_mpl_subset no_mpl_subset
) \
37 $(readlicense_oo_LICENSE_xml
) \
38 $(if
$(filter WNT
,$(OS
)), \
39 && $(gb_AWK
) 'sub("$$","\r")' $@
> $@.tmp \
43 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),XSL
)
45 $(readlicense_oo_DIR
)/LICENSE
: \
46 $(SRCDIR
)/readlicense_oo
/license
/license_plain_text.xsl \
47 $(readlicense_oo_LICENSE_xml
) \
48 |
$(readlicense_oo_DIR
)/.
dir \
49 $(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
50 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),XSL
,1)
51 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),XSL
)
52 $(call gb_Helper_abbreviate_dirs
, \
53 $(call gb_ExternalExecutable_get_command
,xsltproc
) --nonet
--novalid
-o
$@ \
54 --stringparam build_type
"$(BUILD_TYPE)" \
55 --stringparam os
"$(OS)" \
56 --stringparam themes
"$(WITH_THEMES)" \
57 $(if
$(MPL_SUBSET
),,--stringparam no_mpl_subset no_mpl_subset
) \
59 $(readlicense_oo_LICENSE_xml
) \
61 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),XSL
)
64 $(readlicense_oo_DIR
)/license.txt
: \
65 $(readlicense_oo_DIR
)/LICENSE \
66 |
$(readlicense_oo_DIR
)/.
dir
67 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),AWK
,1)
68 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),AWK
)
69 $(call gb_Helper_abbreviate_dirs
, \
70 $(gb_AWK
) 'sub("$$","\r")' $< > $@.tmp
&& mv
$@.tmp
$@ \
72 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),AWK
)
75 # vim:set shiftwidth=4 tabstop=4 noexpandtab: