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_Helper_abbreviate_dirs
, \
30 $(call gb_ExternalExecutable_get_command
,xsltproc
) --nonet
--novalid
-o
$@ \
31 --stringparam build_type
"$(BUILD_TYPE)" \
32 --stringparam os
"$(OS)" \
33 --stringparam themes
"$(WITH_THEMES)" \
34 $(if
$(MPL_SUBSET
),,--stringparam no_mpl_subset no_mpl_subset
) \
36 $(readlicense_oo_LICENSE_xml
) \
37 $(if
$(filter WNT
,$(OS
)), \
38 && $(gb_AWK
) 'sub("$$","\r")' $@
> $@.tmp \
43 $(readlicense_oo_DIR
)/LICENSE
: \
44 $(SRCDIR
)/readlicense_oo
/license
/license_plain_text.xsl \
45 $(readlicense_oo_LICENSE_xml
) \
46 |
$(readlicense_oo_DIR
)/.
dir \
47 $(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
48 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),XSL
,1)
49 $(call gb_Helper_abbreviate_dirs
, \
50 $(call gb_ExternalExecutable_get_command
,xsltproc
) --nonet
--novalid
-o
$@ \
51 --stringparam build_type
"$(BUILD_TYPE)" \
52 --stringparam os
"$(OS)" \
53 --stringparam themes
"$(WITH_THEMES)" \
54 $(if
$(MPL_SUBSET
),,--stringparam no_mpl_subset no_mpl_subset
) \
56 $(readlicense_oo_LICENSE_xml
) \
60 $(readlicense_oo_DIR
)/license.txt
: \
61 $(readlicense_oo_DIR
)/LICENSE \
62 |
$(readlicense_oo_DIR
)/.
dir
63 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),AWK
,1)
64 $(call gb_Helper_abbreviate_dirs
, \
65 $(gb_AWK
) 'sub("$$","\r")' $< > $@.tmp
&& mv
$@.tmp
$@ \
69 # vim:set shiftwidth=4 tabstop=4 noexpandtab: