1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # Version: MPL 1.1 / GPLv3+ / LGPLv3+
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License or as specified alternatively below. You may obtain a copy of
8 # the License at http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
15 # Major Contributor(s):
16 # Copyright (C) 2012 Matúš Kukan <matus.kukan@gmail.com> (initial developer)
18 # All Rights Reserved.
20 # For minor contributions see the git repository.
22 # Alternatively, the contents of this file may be used under the terms of
23 # either the GNU General Public License Version 3 or later (the "GPLv3+"), or
24 # the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
25 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
26 # instead of those above.
28 $(eval
$(call gb_CustomTarget_CustomTarget
,packimages
/images
))
30 packimages_DIR
:= $(call gb_CustomTarget_get_workdir
,packimages
/images
)
32 # Custom sets, at 24x24 & 16x16 fall-back to Tango preferentially
33 # (Tango fallbacks to Industrial for the missing icons)
34 packimages_CUSTOM_FALLBACK_1
:= -c
$(SRCDIR
)/icon-themes
/tango
35 packimages_CUSTOM_FALLBACK_2
:= -c
$(SRCDIR
)/icon-themes
/industrial
37 $(call gb_CustomTarget_get_target
,packimages
/images
) : \
38 $(packimages_DIR
)/images_brand.zip \
39 $(if
$(filter default
,$(WITH_THEMES
)),$(packimages_DIR
)/images.zip
) \
40 $(foreach theme
,$(filter-out default
,$(WITH_THEMES
)),$(packimages_DIR
)/images_
$(theme
).zip
)
42 $(packimages_DIR
)/images.zip
: \
43 $(packimages_DIR
)/sorted.lst
$(packimages_DIR
)/commandimagelist.ilst
44 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,2)
45 $(call gb_Helper_abbreviate_dirs
, \
46 $(PERL
) $(SOLARENV
)/bin
/packimages.pl
-g
$(SRCDIR
)/icon-themes
/galaxy \
47 -m
$(SRCDIR
)/icon-themes
/galaxy
-c
$(packimages_DIR
) \
48 -l
$(packimages_DIR
) -l
$(dir $(call gb_ResTarget_get_imagelist_target
)) -l
$(OUTDIR
)/res
/img
-s
$< -o
$@ \
49 $(if
$(findstring s
,$(MAKEFLAGS
)),> /dev
/null
))
51 $(packimages_DIR
)/images_
%.zip
: \
52 $(packimages_DIR
)/sorted.lst
$(packimages_DIR
)/commandimagelist.ilst
53 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,2)
54 $(call gb_Helper_abbreviate_dirs
, \
55 $(PERL
) $(SOLARENV
)/bin
/packimages.pl
-g
$(SRCDIR
)/icon-themes
/galaxy \
56 -m
$(SRCDIR
)/icon-themes
/galaxy
-c
$(SRCDIR
)/icon-themes
/$* \
57 $(packimages_CUSTOM_FALLBACK_1
) $(packimages_CUSTOM_FALLBACK_2
) \
58 -l
$(packimages_DIR
) -l
$(dir $(call gb_ResTarget_get_imagelist_target
)) -l
$(OUTDIR
)/res
/img
-s
$< -o
$@ \
59 $(if
$(findstring s
,$(MAKEFLAGS
)),> /dev
/null
))
61 # make sure to have one to keep packing happy
62 $(packimages_DIR
)/images_brand.zip
:|
$(packimages_DIR
)/.
dir
63 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),TCH
,2)
66 # commandimagelist.ilst and sorted.lst are phony to rebuild everything each time
67 .PHONY
: $(packimages_DIR
)/commandimagelist.ilst
$(packimages_DIR
)/sorted.lst
69 $(packimages_DIR
)/commandimagelist.ilst
:|
$(packimages_DIR
)/.
dir
70 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
71 $(call gb_Helper_abbreviate_dirs
, \
72 find
$(SRCDIR
)/icon-themes
/galaxy
/cmd
-name
"*.png" -o
-name
"*.svg" | \
73 sed
"s#$(SRCDIR)/icon-themes/galaxy#%MODULE%#" | \
74 $(PERL
) $(SOLARENV
)/bin
/sort.pl
> $@.
$(INPATH
) && \
75 $(PERL
) $(SOLARENV
)/bin
/diffmv.pl
$@.
$(INPATH
) $@ \
76 $(if
$(findstring s
,$(MAKEFLAGS
)),2> /dev
/null
))
78 $(packimages_DIR
)/sorted.lst
: \
79 $(SRCDIR
)/packimages
/pack
/image-sort.lst |
$(packimages_DIR
)/.
dir
80 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
81 $(call gb_Helper_abbreviate_dirs
, \
82 $(PERL
) $(SOLARENV
)/bin
/image-sort.pl
$< $(OUTDIR
)/xml
$@
)
84 # vim: set noet sw=4 ts=4: