merged tag ooo/OOO330_m14
[LibreOffice.git] / reportbuilder / template / makefile.mk
blob4c9782add419b1c23a28913634766c8b0657c236
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
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.
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).
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.
26 #*************************************************************************
28 PRJ=..
29 PRJNAME=reportbuilder
30 TARGET=rpt_templates
32 # ???
33 no_common_build_zip=true
35 EXTENSION_VERSION_BASE=1.0.0
36 .IF "$(DBG_LEVEL)" == "0"
37 EXTENSION_VERSION=$(EXTENSION_VERSION_BASE)
38 .ELSE
39 EXTENSION_VERSION=$(EXTENSION_VERSION_BASE).$(BUILD)
40 .ENDIF
42 # --- Settings ----------------------------------
43 .INCLUDE : settings.mk
44 # ------------------------------------------------------------------
46 # create Extension -----------------------------
48 .IF "$(SOLAR_JAVA)"!=""
50 ZIP1TARGET=sun-report-builder-templates
51 ZIP1FLAGS=-r
52 ZIP1DIR=$(MISC)$/templates
53 ZIP1LIST=*
54 ZIP1EXT=.oxt
56 XMLFILES := $(ZIP1DIR)$/description.xml \
57 $(ZIP1DIR)$/META-INF$/manifest.xml
59 XCU_FILES := $(ZIP1DIR)$/registry$/data$/org$/openoffice$/Office$/Paths.xcu
61 ODR_FILES := \
62 $(ZIP1DIR)$/template$/wizard$/report$/finance.odr \
63 $(ZIP1DIR)$/template$/wizard$/report$/finance_2.odr \
64 $(ZIP1DIR)$/template$/wizard$/report$/yellow.odr
66 HTMLFILES := $(ZIP1DIR)$/THIRDPARTYREADMELICENSE.html \
67 $(ZIP1DIR)$/readme_en-US.html \
68 $(ZIP1DIR)$/readme_en-US.txt
70 .IF "$(GUI)"!="WNT"
71 TXTFILES:=$(foreach,i,$(alllangiso) $(ZIP1DIR)$/registration$/LICENSE_$i)
72 LICLINES:=$(foreach,i,$(TXTFILES) <license-text xlink:href="registration/$(i:f)" lang="$(subst,LICENSE_, $(i:f))" license-id="$(subst,LICENSE_, $(i:f))" />)
73 .ELSE # "$(GUI)"!="WNT"
74 TXTFILES:=$(foreach,i,$(alllangiso) $(ZIP1DIR)$/registration$/license_$i.txt)
75 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)))" />)
76 .ENDIF # "$(GUI)"!="WNT"
78 # --- Targets ----------------------------------
79 .INCLUDE : target.mk
81 .IF "$(ZIP1TARGETN)"!=""
82 $(ZIP1TARGETN) : $(TXTFILES) $(XMLFILES) $(HTMLFILES) $(ODR_FILES)
83 .ENDIF # "$(ZIP1TARGETN)"!="
85 $(MISC)$/template_update_report.flag : $(XCU_FILES)
86 $(TOUCH) $@
88 $(ZIP1DIR)$/description.xml : pre.xml post.xml
89 @@-$(MKDIRHIER) $(@:d)
90 @@-$(RM) $(ZIP1DIR)$/description.xml
91 $(TYPE) pre.xml > $@
92 $(TYPE) $(mktmp $(LICLINES)) >> $@
93 $(TYPE) post.xml | $(SED) s/#VERSION#/$(EXTENSION_VERSION)/ >> $@
95 $(ZIP1DIR)$/registration$/license_%.txt : $(SOLARBINDIR)$/osl$/license_%.txt
96 @@-$(MKDIRHIER) $(@:d)
97 $(COPY) $< $@
99 $(ZIP1DIR)$/registration$/LICENSE_% : $(SOLARBINDIR)$/osl$/LICENSE_%
100 @@-$(MKDIRHIER) $(@:d)
101 $(COPY) $< $@
103 $(ZIP1DIR)$/registry$/data$/org$/openoffice$/Office$/%.xcu : $(MISC)$/template$/registry$/data$/org$/openoffice$/Office$/%.xcu
104 @@-$(MKDIRHIER) $(@:d)
105 $(COPY) $< $@
107 $(ZIP1DIR)$/META-INF$/manifest.xml : manifest.xml $(MISC)$/template_update_report.flag
108 @@-$(MKDIRHIER) $(@:d)
109 $(PERL) $(SOLARENV)$/bin$/makemani.pl $(PRJ)$/template$/manifest.xml $(ZIP1DIR) registry $(@:d:d)
111 $(ZIP1DIR)$/readme_en-US.% : $(PRJ)$/license$/readme_en-US.%
112 @@-$(MKDIRHIER) $(@:d)
113 $(COPY) $< $@
115 $(ZIP1DIR)$/THIRDPARTYREADMELICENSE.html : $(PRJ)$/license$/THIRDPARTYREADMELICENSE.html
116 @@-$(MKDIRHIER) $(@:d)
117 $(COPY) $< $@
119 .ELSE # "$(SOLAR_JAVA)"!=""
120 .INCLUDE : target.mk
121 .ENDIF # "$(SOLAR_JAVA)"!=""