bump product version to 5.0.4.1
[LibreOffice.git] / postprocess / CustomTarget_images.mk
blobde2c21d1f3ddea6997eb30a6329be761f5f1b718
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,postprocess/images))
13 packimages_DIR := $(call gb_CustomTarget_get_workdir,postprocess/images)
14 helpimages_DIR := $(call gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)
16 $(eval $(call gb_CustomTarget_register_targets,postprocess/images,\
17 $(foreach theme,$(WITH_THEMES),images_$(theme).zip) \
18 commandimagelist.ilst \
19 sorted.lst \
22 $(packimages_DIR)/images.zip : DEFAULT_THEME := $(true)
23 $(packimages_DIR)/images_%.zip : DEFAULT_THEME :=
24 $(packimages_DIR)/images_tango.zip : INDUSTRIAL_FALLBACK := -c $(SRCDIR)/icon-themes/industrial
25 $(packimages_DIR)/images%.zip : INDUSTRIAL_FALLBACK :=
27 $(packimages_DIR)/%.zip : \
28 $(packimages_DIR)/sorted.lst \
29 $(packimages_DIR)/commandimagelist.ilst \
30 $(call gb_Helper_optional,HELP,$(helpimages_DIR)/helpimg.ilst) \
31 $(call gb_Helper_optional,DBCONNECTIVITY,$(if $(ENABLE_JAVA),$(SRCDIR)/connectivity/source/drivers/hsqldb/hsqlui.ilst)) \
32 $(call gb_Postprocess_get_target,AllResources) \
33 $(call gb_Postprocess_get_target,AllUIConfigs)
34 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
35 $(call gb_Helper_abbreviate_dirs, \
36 $(PERL) $(SRCDIR)/solenv/bin/packimages.pl \
37 $(if $(DEFAULT_THEME),\
38 -g $(packimages_DIR) -m $(packimages_DIR) -c $(packimages_DIR),\
39 -g $(SRCDIR)/icon-themes/$(subst images_,,$*) -m $(SRCDIR)/icon-themes/$(subst images_,,$*) -c $(SRCDIR)/icon-themes/$(subst images_,,$*) \
40 ) \
41 $(INDUSTRIAL_FALLBACK) \
42 $(call gb_Helper_optional,HELP,-l $(helpimages_DIR) ) \
43 -l $(packimages_DIR) \
44 -l $(dir $(call gb_ResTarget_get_imagelist_target)) \
45 -l $(dir $(call gb_UIConfig_get_imagelist_target)) \
46 -l $(dir $(call gb_UIConfig_get_imagelist_target,modules/)) \
47 $(call gb_Helper_optional,DBCONNECTIVITY,$(if $(ENABLE_JAVA),-l $(SRCDIR)/connectivity/source/drivers/hsqldb)) \
48 $(call gb_Helper_optional,DBCONNECTIVITY,$(if $(ENABLE_FIREBIRD_SDBC),-l $(SRCDIR)/connectivity/source/drivers/firebird)) \
49 -s $< -o $@ \
50 $(if $(findstring s,$(MAKEFLAGS)),> /dev/null))
52 # commandimagelist.ilst and sorted.lst are phony to rebuild everything each time
53 .PHONY : $(packimages_DIR)/commandimagelist.ilst $(packimages_DIR)/sorted.lst
55 $(packimages_DIR)/commandimagelist.ilst :
56 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
57 $(call gb_Helper_abbreviate_dirs, \
58 find $(SRCDIR)/icon-themes -name "*.png" -o -name "*.svg" | \
59 grep -e '/cmd/' | sed 's#^.*/icon-themes/[^/]*##' | sort | uniq | \
60 sed "s#^#%MODULE%#" | \
61 LC_ALL=C sort > $@.tmp && \
62 $(PERL) $(SRCDIR)/solenv/bin/diffmv.pl $@.tmp $@ \
63 $(if $(findstring s,$(MAKEFLAGS)),2> /dev/null))
65 $(packimages_DIR)/sorted.lst : \
66 $(SRCDIR)/postprocess/packimages/image-sort.lst \
67 $(call gb_Postprocess_get_target,AllUIConfigs)
68 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
69 $(call gb_Helper_abbreviate_dirs, \
70 $(PERL) $(SRCDIR)/solenv/bin/image-sort.pl \
71 $< $(INSTROOT)/$(gb_UIConfig_INSTDIR) $@)
73 # vim: set noet sw=4 ts=4: