bump product version to 4.1.6.2
[LibreOffice.git] / postprocess / CustomTarget_images.mk
blob8dcc6891dee70254d65b87419e8d6b1e87f2e07c
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 # Custom sets, at 24x24 & 16x16 fall-back to Tango preferentially
17 # (Tango fallbacks to Industrial for the missing icons)
18 packimages_CUSTOM_FALLBACKS := -c $(SRCDIR)/icon-themes/tango -c $(SRCDIR)/icon-themes/industrial
20 $(eval $(call gb_CustomTarget_register_targets,postprocess/images,\
21 $(if $(filter default,$(WITH_THEMES)),images.zip) \
22 $(foreach theme,$(filter-out default,$(WITH_THEMES)),images_$(theme).zip) \
23 commandimagelist.ilst \
24 sorted.lst \
27 $(packimages_DIR)/images.zip : DEFAULT_THEME := $(true)
28 $(packimages_DIR)/images_%.zip : DEFAULT_THEME :=
30 $(packimages_DIR)/%.zip : \
31 $(packimages_DIR)/sorted.lst \
32 $(packimages_DIR)/commandimagelist.ilst \
33 $(call gb_Helper_optional,HELP,$(helpimages_DIR)/helpimg.ilst) \
34 $(call gb_Helper_optional,DBCONNECTIVITY,$(if $(SOLAR_JAVA),$(SRCDIR)/connectivity/source/drivers/hsqldb/hsqlui.ilst)) \
35 $(call gb_Postprocess_get_target,AllResources) \
36 $(call gb_Postprocess_get_target,AllUIConfigs)
37 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
38 $(call gb_Helper_abbreviate_dirs, \
39 $(PERL) $(SOLARENV)/bin/packimages.pl \
40 -g $(SRCDIR)/icon-themes/galaxy \
41 -m $(SRCDIR)/icon-themes/galaxy \
42 $(if $(DEFAULT_THEME),\
43 -c $(packimages_DIR),\
44 -c $(SRCDIR)/icon-themes/$(subst images_,,$*) $(packimages_CUSTOM_FALLBACKS) \
45 ) \
46 $(call gb_Helper_optional,HELP,-l $(helpimages_DIR) ) \
47 -l $(packimages_DIR) \
48 -l $(dir $(call gb_ResTarget_get_imagelist_target)) \
49 -l $(dir $(call gb_UIConfig_get_imagelist_target)) \
50 -l $(dir $(call gb_UIConfig_get_imagelist_target,modules/)) \
51 $(call gb_Helper_optional,DBCONNECTIVITY,$(if $(SOLAR_JAVA),-l $(SRCDIR)/connectivity/source/drivers/hsqldb)) \
52 -s $< -o $@ \
53 $(if $(findstring s,$(MAKEFLAGS)),> /dev/null))
55 # commandimagelist.ilst and sorted.lst are phony to rebuild everything each time
56 .PHONY : $(packimages_DIR)/commandimagelist.ilst $(packimages_DIR)/sorted.lst
58 $(packimages_DIR)/commandimagelist.ilst :
59 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
60 $(call gb_Helper_abbreviate_dirs, \
61 find $(SRCDIR)/icon-themes/galaxy/cmd -name "*.png" -o -name "*.svg" | \
62 sed "s#$(SRCDIR)/icon-themes/galaxy#%MODULE%#" | \
63 $(PERL) $(SOLARENV)/bin/sort.pl > $@.$(INPATH) && \
64 $(PERL) $(SOLARENV)/bin/diffmv.pl $@.$(INPATH) $@ \
65 $(if $(findstring s,$(MAKEFLAGS)),2> /dev/null))
67 $(packimages_DIR)/sorted.lst : \
68 $(SRCDIR)/postprocess/packimages/image-sort.lst \
69 $(call gb_Postprocess_get_target,AllUIConfigs)
70 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
71 $(call gb_Helper_abbreviate_dirs, \
72 $(PERL) $(SOLARENV)/bin/image-sort.pl $< $(INSTDIR)/$(gb_UIConfig_INSTDIR) $@)
74 # vim: set noet sw=4 ts=4: