xref: /aoo42x/main/sysui/desktop/macosx/makefile.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org.  If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28PRJ=..$/..
29TARGET=desktopmacosx
30
31# --- Settings -------------------------------------------------
32
33.INCLUDE :	settings.mk
34
35# --- Files ----------------------------------------------------
36
37.IF "$(OS)"!="MACOSX"
38
39dummy:
40        @echo "Nothing to build for OS $(OS)"
41
42.ELSE           # "$(OS)"!="MACOSX"
43
44ZIPFLAGS = -r
45ZIP1TARGET = osxicons
46ZIP1DIR = ../icons
47ZIP1LIST := $(shell $(PERL) -w list_icons.pl < Info.plist)
48
49.IF "$(GUIBASE)"!="aqua"
50CREATOR_TYPE=OOo2
51EXECUTABLE=droplet
52.ELSE
53CREATOR_TYPE=OOO2
54EXECUTABLE=soffice
55.ENDIF
56
57.IF "$(WITH_LANG)"!=""
58ULFDIR:=$(COMMONMISC)$/desktopshare
59.ELSE # "$(WITH_LANG)"!=""
60ULFDIR:=..$/share
61.ENDIF # "$(WITH_LANG)"!=""
62
63# --- Targets --------------------------------------------------
64
65.INCLUDE : target.mk
66
67.IF "$(ZIP1TARGETN)"!=""
68ZIP1TARGETN : Info.plist extract_icons_names.pl
69
70.ENDIF          # "$(ZIP1TARGETN)"!=""
71
72ALLTAR : $(COMMONMISC)$/{PkgInfo Info.plist} $(COMMONBIN)$/InfoPlist_{$(alllangiso)}.zip
73
74$(COMMONMISC)$/PkgInfo :
75	echo "APPL$(CREATOR_TYPE)" > $@
76
77
78$(COMMONMISC)$/Info.plist : $$(@:f)
79	sed -e "s|\%EXECUTABLE|${EXECUTABLE}|g" $< > $@
80
81$(COMMONBIN)$/InfoPlist_{$(alllangiso)}.zip : $(COMMONMISC)$/$$(@:b)/InfoPlist.strings
82	cd $(<:d) && zip ../$(@:f).$(INPATH) $(<:f)
83	$(MV) -f $(COMMONMISC)$/$(@:f).$(INPATH) $@
84
85$(COMMONMISC)$/InfoPlist_{$(alllangiso)}$/InfoPlist.strings : Info.plist $(ULFDIR)$/documents.ulf
86	$(MKDIRHIER) $(@:d)
87	$(PERL) -w gen_strings.pl -l $(@:d:d:b:s/InfoPlist_//) -p $< | iconv -f UTF-8 -t UTF-16 > $@.$(INPATH)
88	$(MV) -f $@.$(INPATH) $@
89
90.ENDIF		# "$(OS)"!="MACOSX"
91
92