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 \
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 $(SRCDIR
)/sfx2
/source
/sidebar
/sidebar.ilst \
31 $(SRCDIR
)/vcl
/source
/control
/throbber.ilst \
32 $(call gb_Helper_optional
,HELP
,$(helpimages_DIR
)/helpimg.ilst
) \
33 $(call gb_Helper_optional
,HELP
,$(helpimages_DIR
)/screenshotimg.ilst
) \
34 $(call gb_Helper_optional
,DBCONNECTIVITY
,$(if
$(ENABLE_JAVA
),$(SRCDIR
)/connectivity
/source
/drivers
/hsqldb
/hsqlui.ilst
)) \
35 $(call gb_Helper_get_imagelists
)
36 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,2)
37 $(call gb_Helper_abbreviate_dirs
, \
38 ILSTFILE
=$(call var2file
,$(shell $(gb_MKTEMP
)),100,$(filter %.ilst
,$^
)) && \
39 $(PERL
) $(SRCDIR
)/solenv
/bin
/packimages.pl \
40 $(if
$(DEFAULT_THEME
),\
41 -g
$(packimages_DIR
) -m
$(packimages_DIR
) -c
$(packimages_DIR
),\
42 -g
$(SRCDIR
)/icon-themes
/$(subst images_
,,$*) -m
$(SRCDIR
)/icon-themes
/$(subst images_
,,$*) -c
$(SRCDIR
)/icon-themes
/$(subst images_
,,$*) \
44 $(INDUSTRIAL_FALLBACK
) \
45 $(call gb_Helper_optional
,HELP
,-e
$(SRCDIR
)/helpcontent2
/source
) \
48 $(if
$(findstring s
,$(MAKEFLAGS
)),> /dev
/null
) && \
51 # commandimagelist.ilst and sorted.lst are phony to rebuild everything each time
52 .PHONY
: $(packimages_DIR
)/commandimagelist.ilst
$(packimages_DIR
)/sorted.lst
54 $(packimages_DIR
)/commandimagelist.ilst
:
55 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
56 $(call gb_Helper_abbreviate_dirs
, \
57 $(FIND
) $(SRCDIR
)/icon-themes
-name
"*.png" -o
-name
"*.svg" | \
58 grep
-e
'/cmd/' | sed
's#^.*/icon-themes/[^/]*##' |
$(SORT
) | uniq | \
59 sed
"s#^#%MODULE%#" | \
60 LC_ALL
=C
$(SORT
) > $@.tmp
&& \
61 $(call gb_Helper_replace_if_different_and_touch
,$@.tmp
,$@
))
63 $(packimages_DIR
)/sorted.lst
: \
64 $(SRCDIR
)/postprocess
/packimages
/image-sort.lst \
65 $(call gb_Postprocess_get_target
,AllUIConfigs
)
66 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
67 $(call gb_Helper_abbreviate_dirs
, \
68 $(PERL
) $(SRCDIR
)/solenv
/bin
/image-sort.pl \
69 $< $(INSTROOT
)/$(gb_UIConfig_INSTDIR
) $@
)
71 # vim: set noet sw=4 ts=4: