workaround clang-14 bug
[LibreOffice.git] / readlicense_oo / CustomTarget_license.mk
blobdedb2ccb3f37e807f03b2eecc3c63e5b622400c2
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 := $(gb_CustomTarget_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
17 ifeq ($(OS),WNT)
18 $(call gb_CustomTarget_get_target,readlicense_oo/license) : $(readlicense_oo_DIR)/license.txt
19 else
20 $(call gb_CustomTarget_get_target,readlicense_oo/license) : $(readlicense_oo_DIR)/LICENSE
21 endif
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) \
36 $< \
37 $(readlicense_oo_LICENSE_xml) \
38 $(if $(filter WNT,$(OS)), \
39 && $(gb_AWK) 'sub("$$","\r")' $@ > $@.tmp \
40 && mv $@.tmp $@ \
41 ) \
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) \
58 $< \
59 $(readlicense_oo_LICENSE_xml) \
61 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),XSL)
63 ifeq ($(OS),WNT)
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)
73 endif
75 # vim:set shiftwidth=4 tabstop=4 noexpandtab: