tdf#149626 use recursive_mutex to fix hang in macro callback during dnd
[LibreOffice.git] / extras / CustomTarget_tplpersonal.mk
blob3b39354da57abdb8058b8aeba0793d8ab6e6b2cd
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,extras/source/templates/personal))
12 extras_TEMPLATES_PERSONAL := \
13 CV \
14 Resume1page \
17 extras_PERSONAL_XMLFILES := \
18 CV/content.xml \
19 CV/manifest.rdf \
20 CV/META-INF/manifest.xml \
21 CV/meta.xml \
22 CV/styles.xml \
23 CV/Thumbnails/thumbnail.png \
24 Resume1page/content.xml \
25 Resume1page/manifest.rdf \
26 Resume1page/META-INF/manifest.xml \
27 Resume1page/meta.xml \
28 Resume1page/styles.xml \
29 Resume1page/Thumbnails/thumbnail.png \
32 extras_PERSONAL_MIMETYPEFILES := $(foreach atexts,$(extras_TEMPLATES_PERSONAL),$(atexts)/mimetype)
35 $(call gb_CustomTarget_get_target,extras/source/templates/personal) : \
36 $(foreach atexts,$(extras_TEMPLATES_PERSONAL),$(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/$(atexts).ott)
38 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/%/mimetype : $(SRCDIR)/extras/source/templates/personal/%/mimetype
39 $(call gb_Output_announce,templates/personal/$*/mimetype,$(true),CPY,1)
40 $(call gb_Trace_StartRange,templates/personal/$*/mimetype,CPY)
41 cp $< $@
42 $(call gb_Trace_EndRange,templates/personal/$*/mimetype,CPY)
44 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/%.jpg : $(SRCDIR)/extras/source/templates/personal/%.jpg
45 $(call gb_Output_announce,templates/personal/$*.jpg,$(true),CPY,1)
46 $(call gb_Trace_StartRange,templates/personal/$*.jpg,CPY)
47 cp $< $@
48 $(call gb_Trace_EndRange,templates/personal/$*.jpg,CPY)
50 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/%.png : $(SRCDIR)/extras/source/templates/personal/%.png
51 $(call gb_Output_announce,templates/personal/$*.png,$(true),CPY,1)
52 $(call gb_Trace_StartRange,templates/personal/$*.png,CPY)
53 cp $< $@
54 $(call gb_Trace_EndRange,templates/personal/$*.png,CPY)
56 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/%.rdf : $(SRCDIR)/extras/source/templates/personal/%.rdf
57 $(call gb_Output_announce,templates/personal/$*.rdf,$(true),CPY,1)
58 $(call gb_Trace_StartRange,templates/personal/$*.rdf,CPY)
59 cp $< $@
60 $(call gb_Trace_EndRange,templates/personal/$*.rdf,CPY)
62 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/%.svg : $(SRCDIR)/extras/source/templates/personal/%.svg
63 $(call gb_Output_announce,templates/personal/$*.svg,$(true),CPY,1)
64 $(call gb_Trace_StartRange,templates/personal/$*.svg,CPY)
65 cp $< $@
66 $(call gb_Trace_EndRange,templates/personal/$*.svg,CPY)
68 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/%.svm : $(SRCDIR)/extras/source/templates/personal/%.svm
69 $(call gb_Output_announce,templates/personal/$*.svm,$(true),CPY,1)
70 $(call gb_Trace_StartRange,templates/personal/$*.svm,CPY)
71 cp $< $@
72 $(call gb_Trace_EndRange,templates/personal/$*.svm,CPY)
74 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/%.xml : $(SRCDIR)/extras/source/templates/personal/%.xml \
75 | $(call gb_ExternalExecutable_get_dependencies,xsltproc)
76 $(call gb_Output_announce,templates/personal/$*.xml,$(true),XSL,1)
77 $(call gb_Trace_StartRange,templates/personal/$*.xml,XSL)
78 $(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ $(SRCDIR)/extras/util/compact.xsl $<
79 $(call gb_Trace_EndRange,templates/personal/$*.xml,XSL)
81 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/%.ott :
82 $(call gb_Output_announce,templates/personal/$*.ott,$(true),ZIP,2)
83 $(call gb_Trace_StartRange,templates/personal/$*.ott,ZIP)
84 $(call gb_Helper_abbreviate_dirs,\
85 cd $(EXTRAS_PERSONAL_DIR) && \
86 zip -q0X --filesync --must-match $@ $(EXTRAS_PERSONAL_MIMEFILES_FILTER) && \
87 zip -qrX --must-match $@ $(EXTRAS_PERSONAL_XMLFILES_FILTER) \
89 $(call gb_Trace_EndRange,templates/personal/$*.ott,ZIP)
91 define extras_Tplpersonal_make_file_deps
92 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : $(SRCDIR)/$(1)/$(2) \
93 | $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
95 endef
97 define extras_Tplpersonal_make_zip_deps
98 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
99 $(addprefix $(call gb_CustomTarget_get_workdir,$(1))/,$(filter $(3)/%,$(extras_PERSONAL_MIMETYPEFILES) $(extras_PERSONAL_XMLFILES))) \
100 | $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
102 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
103 EXTRAS_PERSONAL_MIMEFILES_FILTER := $(foreach file,$(filter $(3)/%,$(extras_PERSONAL_MIMETYPEFILES)),$(subst $(3)/,,$(file)))
104 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
105 EXTRAS_PERSONAL_XMLFILES_FILTER := $(foreach file,$(filter $(3)/%,$(extras_PERSONAL_XMLFILES)),$(subst $(3)/,,$(file)))
106 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
107 EXTRAS_PERSONAL_DIR := $(call gb_CustomTarget_get_workdir,$(1))/$(3)
109 endef
111 $(eval $(foreach file,$(extras_PERSONAL_MIMETYPEFILES) $(extras_PERSONAL_XMLFILES),\
112 $(call extras_Tplpersonal_make_file_deps,extras/source/templates/personal,$(file)) \
115 $(eval $(foreach atexts,$(extras_TEMPLATES_PERSONAL),\
116 $(call extras_Tplpersonal_make_zip_deps,extras/source/templates/personal,$(atexts).ott,$(atexts)) \
119 # vim: set noet sw=4 ts=4: