1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
36 # point to an existing directory as default that poses no threat
37 # to a "find" that looks for "*.png"
41 IMAGES
:= $(COMMONBIN
)$/images.zip
42 SORTED_LIST
=$(RES
)$/img
$/sorted.lst
43 # Custom sets, at 24x24 & 16x16 fall-back to industrial preferentially
44 CUSTOM_IMAGE_SETS
=hicontrast industrial crystal tango classic oxygen
45 CUSTOM_IMAGES
+=$(foreach,i
,$(CUSTOM_IMAGE_SETS
) images_
$i)
46 CUSTOM_PREFERRED_FALLBACK_1
*=-c
$(SOLARSRC
)$/ooo_custom_images
$/tango
47 CUSTOM_PREFERRED_FALLBACK_2
*=-c
$(SOLARSRC
)$/ooo_custom_images
$/industrial
49 CRYSTAL_TARBALL
=$(SOLARSRC
)$/external_images
$/ooo_crystal_images-1.
tar.gz
50 CLASSIC_TARBALL
=$(SOLARSRC
)$/ooo_custom_images
$/classic
/classic_images.
tar.gz
51 OXYGEN_TARBALL
=$(SOLARSRC
)$/external_images
$/ooo_oxygen_images.
tar.gz
53 ALLTAR
: $(IMAGES
) $(CUSTOM_IMAGES
) $(COMMONBIN
)$/images_brand.zip
55 $(IMAGES
) $(CUSTOM_IMAGES
) : $(SORTED_LIST
)
57 $(SORTED_LIST
) : image-sort.lst
58 +-$(MKDIR
) $(RES
)$/img
59 +$(PERL
) $(SOLARENV
)$/bin
$/image-sort.pl image-sort.lst
$(SOLARXMLDIR
) $@
61 $(RES
)$/img
$/commandimagelist.ilst .PHONY
: $(SORTED_LIST
)
62 @@
-$(MKDIR
) $(RES
)$/img
63 #+-$(RM) $@ $@.$(INPATH)
64 .IF
"$(use_shell)"!="4nt"
65 $(FIND
) $(SOLARSRC
)$/$(RSCDEFIMG
)/res
/commandimagelist
-name
"*.png" | sed
"s#$(SOLARSRC)$/$(RSCDEFIMG)/res#%GLOBALRES%#" |
$(PERL
) $(SOLARENV
)$/bin
$/sort.pl
> $@.
$(INPATH
)
66 .ELSE
# "$(use_shell)"!="4nt"
67 $(FIND
) $(SOLARSRC
)$/$(RSCDEFIMG
)/res
/commandimagelist
-name
"*.png" | sed
"s/$(SOLARSRC:s/\/./).$(RSCDEFIMG)\/res/%%GLOBALRES%%/" |
$(PERL
) $(SOLARENV
)$/bin
$/sort.pl
> $@.
$(INPATH
)
68 .ENDIF
# "$(use_shell)"!="4nt"
69 $(PERL
) $(SOLARENV
)$/bin
$/diffmv.pl
$@.
$(INPATH
) $@
71 $(COMMONBIN
)$/images.zip .PHONY
: $(RES
)$/img
$/commandimagelist.ilst
72 $(PERL
) $(SOLARENV
)$/bin
$/packimages.pl
-g
$(SOLARSRC
)$/$(RSCDEFIMG
) -m
$(SOLARSRC
)$/$(RSCDEFIMG
) -c
$(RSCCUSTOMIMG
) -l
$(SOLARCOMMONRESDIR
)$/img
-s
$(SORTED_LIST
) -l
$(RES
)$/img
-o
$@
74 images_
% : $(RES
)$/img
$/commandimagelist.ilst
75 $(PERL
) $(SOLARENV
)$/bin
$/packimages.pl
-g
$(SOLARSRC
)$/$(RSCDEFIMG
) -m
$(SOLARSRC
)$/$(RSCDEFIMG
) -c
$(RSCCUSTOMIMG
) -c
$(SOLARSRC
)$/ooo_custom_images
$/$(@
:s
/images_
//) -c
$(MISC
)$/$(@
:s
/images_
//) $(CUSTOM_PREFERRED_FALLBACK_1
) $(CUSTOM_PREFERRED_FALLBACK_2
) -l
$(SOLARCOMMONRESDIR
)$/img
-l
$(RES
)$/img
-s
$(SORTED_LIST
) -o
$(COMMONBIN
)$/$@.zip
77 # make sure to have one to keep packing happy
78 $(COMMONBIN
)$/images_brand.zip
:
81 # generate the HiContrast icon set
82 $(MISC
)$/hicontrast.flag .PHONY
:
83 $(PERL
) $(SOLARENV
)$/bin
$/hicontrast-to-theme.pl
$(SOLARSRC
)$/default_images
$(MISC
)$/hicontrast
&& $(TOUCH
) $@
85 # unpack the Crystal icon set
86 $(MISC
)$/crystal.flag
: $(CRYSTAL_TARBALL
)
87 cd
$(MISC
) && gzip
-d
-c
$(CRYSTAL_TARBALL
) |
( tar -xf
- ) && $(TOUCH
) $(@
:f
)
89 chmod
-R g
+w
$(MISC
)$/crystal
91 @
$(TYPE
) $@ || echo
"ERROR: unpacking $(CRYSTAL_TARBALL) failed"
93 # unpack the Oxygen icon set
94 $(MISC
)$/oxygen.flag
: $(OXYGEN_TARBALL
)
95 cd
$(MISC
) && gzip
-d
-c
$(OXYGEN_TARBALL
) |
( tar -xf
- ) && $(TOUCH
) $(@
:f
)
97 chmod
-R g
+w
$(MISC
)$/oxygen
99 @
$(TYPE
) $@ || echo
"ERROR: unpacking $(OXYGEN_TARBALL) failed"
101 # unpack the classic icon set
102 $(MISC
)$/classic.flag
: $(CLASSIC_TARBALL
)
103 cd
$(MISC
) && gunzip
-d
-c
$(CLASSIC_TARBALL
) |
( tar -xf
- ) && $(TOUCH
) $(@
:f
)
105 chmod
-R g
+w
$(MISC
)$/classic
107 @
$(TYPE
) $@ || echo
"ERROR: unpacking $(CLASSIC_TARBALL) failed"
110 images_hicontrast
: $(MISC
)$/hicontrast.flag
$(RES
)$/img
$/commandimagelist.ilst
112 images_crystal
: $(MISC
)$/crystal.flag
$(RES
)$/img
$/commandimagelist.ilst
114 images_classic
: $(MISC
)$/classic.flag
$(RES
)$/img
$/commandimagelist.ilst
116 images_oxygen
: $(MISC
)$/oxygen.flag
$(RES
)$/img
$/commandimagelist.ilst