update dev300-m58
[ooovba.git] / reportbuilder / template / makefile.mk
bloba9ee2cf544d9f4ff8595dec197c22290e2dcd7bc
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.2 $
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 #*************************************************************************
32 PRJ=..
33 PRJNAME=reportbuilder
34 TARGET=rpt_templates
36 # ???
37 no_common_build_zip=true
39 EXTENSION_VERSION_BASE=1.0.0
40 .IF "$(PRODUCT)" != ""
41 EXTENSION_VERSION=$(EXTENSION_VERSION_BASE)
42 .ELSE
43 EXTENSION_VERSION=$(EXTENSION_VERSION_BASE).$(BUILD)
44 .ENDIF
46 # --- Settings ----------------------------------
47 .INCLUDE : settings.mk
48 # ------------------------------------------------------------------
50 # create Extension -----------------------------
52 .IF "$(SOLAR_JAVA)"!=""
54 ZIP1TARGET=sun-report-builder-templates
55 ZIP1FLAGS=-r
56 ZIP1DIR=$(MISC)$/templates
57 ZIP1LIST=*
58 ZIP1EXT=.oxt
60 XMLFILES := $(ZIP1DIR)$/description.xml \
61 $(ZIP1DIR)$/META-INF$/manifest.xml
63 XCU_FILES := $(ZIP1DIR)$/registry$/data$/org$/openoffice$/Office$/Paths.xcu
65 ODR_FILES := \
66 $(ZIP1DIR)$/template$/wizard$/report$/finance.odr \
67 $(ZIP1DIR)$/template$/wizard$/report$/finance_2.odr \
68 $(ZIP1DIR)$/template$/wizard$/report$/yellow.odr
70 HTMLFILES := $(ZIP1DIR)$/THIRDPARTYREADMELICENSE.html \
71 $(ZIP1DIR)$/readme_en-US.html \
72 $(ZIP1DIR)$/readme_en-US.txt
74 .IF "$(GUI)"!="WNT"
75 TXTFILES:=$(foreach,i,$(alllangiso) $(ZIP1DIR)$/registration$/LICENSE_$i)
76 LICLINES:=$(foreach,i,$(TXTFILES) <license-text xlink:href="registration/$(i:f)" lang="$(subst,LICENSE_, $(i:f))" license-id="$(subst,LICENSE_, $(i:f))" />)
77 .ELSE # "$(GUI)"!="WNT"
78 TXTFILES:=$(foreach,i,$(alllangiso) $(ZIP1DIR)$/registration$/license_$i.txt)
79 LICLINES:=$(foreach,i,$(TXTFILES) <license-text xlink:href="registration/$(i:f)" lang="$(subst,.txt, $(subst,license_, $(i:f)))" license-id="$(subst,.txt, $(subst,license_, $(i:f)))" />)
80 .ENDIF # "$(GUI)"!="WNT"
82 # --- Targets ----------------------------------
83 .INCLUDE : target.mk
85 .IF "$(ZIP1TARGETN)"!=""
86 $(ZIP1TARGETN) : $(TXTFILES) $(XMLFILES) $(HTMLFILES) $(ODR_FILES)
87 .ENDIF # "$(ZIP1TARGETN)"!="
89 $(MISC)$/template_update_report.flag : $(XCU_FILES)
90 $(TOUCH) $@
92 $(ZIP1DIR)$/description.xml : pre.xml post.xml
93 @@-$(MKDIRHIER) $(@:d)
94 @@-$(RM) $(ZIP1DIR)$/description.xml
95 $(TYPE) pre.xml > $@
96 $(TYPE) $(mktmp $(LICLINES)) >> $@
97 $(TYPE) post.xml | $(SED) s/#VERSION#/$(EXTENSION_VERSION)/ >> $@
99 $(ZIP1DIR)$/registration$/license_%.txt : $(SOLARBINDIR)$/osl$/license_%.txt
100 @@-$(MKDIRHIER) $(@:d)
101 $(COPY) $< $@
103 $(ZIP1DIR)$/registration$/LICENSE_% : $(SOLARBINDIR)$/osl$/LICENSE_%
104 @@-$(MKDIRHIER) $(@:d)
105 $(COPY) $< $@
107 $(ZIP1DIR)$/registry$/data$/org$/openoffice$/Office$/%.xcu : $(MISC)$/template$/registry$/data$/org$/openoffice$/Office$/%.xcu
108 @@-$(MKDIRHIER) $(@:d)
109 $(COPY) $< $@
111 $(ZIP1DIR)$/META-INF$/manifest.xml : manifest.xml $(MISC)$/template_update_report.flag
112 @@-$(MKDIRHIER) $(@:d)
113 $(PERL) $(SOLARENV)$/bin$/makemani.pl $(PRJ)$/template$/manifest.xml $(ZIP1DIR) registry $(@:d:d)
115 $(ZIP1DIR)$/readme_en-US.% : $(PRJ)$/license$/readme_en-US.%
116 @@-$(MKDIRHIER) $(@:d)
117 $(COPY) $< $@
119 $(ZIP1DIR)$/THIRDPARTYREADMELICENSE.html : $(PRJ)$/license$/THIRDPARTYREADMELICENSE.html
120 @@-$(MKDIRHIER) $(@:d)
121 $(COPY) $< $@
123 .ELSE # "$(SOLAR_JAVA)"!=""
124 .INCLUDE : target.mk
125 .ENDIF # "$(SOLAR_JAVA)"!=""