xref: /aoo41x/main/odk/util/odk_rules.pmk (revision cdf0e10c)
1*cdf0e10cSrcweir#*************************************************************************
2*cdf0e10cSrcweir#
3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir#
5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir#
7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir#
9*cdf0e10cSrcweir# This file is part of OpenOffice.org.
10*cdf0e10cSrcweir#
11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir#
15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir#
21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir#
26*cdf0e10cSrcweir#*************************************************************************
27*cdf0e10cSrcweir
28*cdf0e10cSrcweir
29*cdf0e10cSrcweir$(DESTDIRDOCU)/%.html : $(PRJ)/docs/%.html
30*cdf0e10cSrcweir	@@-rm -f $@
31*cdf0e10cSrcweir	tr -d "\015" < $< |  sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@
32*cdf0e10cSrcweir
33*cdf0e10cSrcweir$(DESTDIREXAMPLES)/%.html : $(PRJ)/examples/%.html
34*cdf0e10cSrcweir	@@-rm -f $@
35*cdf0e10cSrcweir	tr -d "\015" < $< |  sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@
36*cdf0e10cSrcweir
37*cdf0e10cSrcweir$(DESTDIR)/index.html : $(PRJ)/index.html
38*cdf0e10cSrcweir	@@-rm -f $@
39*cdf0e10cSrcweir	tr -d "\015" < $< |  sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@
40*cdf0e10cSrcweir
41*cdf0e10cSrcweir$(DESTDIRDOCU)/%.css : $(PRJ)/docs/%.css
42*cdf0e10cSrcweir	@@-rm -f $@
43*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
44*cdf0e10cSrcweir
45*cdf0e10cSrcweir$(DESTDIRDOCUIMAGES)/% : $(PRJ)/docs/images/%
46*cdf0e10cSrcweir	@@-rm -f $@
47*cdf0e10cSrcweir	$(MY_COPY) $< $@
48*cdf0e10cSrcweir
49*cdf0e10cSrcweir$(DESTDIR)/configure : $(PRJ)/configure
50*cdf0e10cSrcweir	@@-rm -f $@
51*cdf0e10cSrcweir	$(MY_TEXTCOPY) $(PRJ)/configure $@
52*cdf0e10cSrcweir
53*cdf0e10cSrcweir$(DESTDIR)/configure.pl : $(PRJ)/configure.pl
54*cdf0e10cSrcweir	@@-rm -f $@
55*cdf0e10cSrcweir	$(MY_TEXTCOPY) $(PRJ)/configure.pl $@
56*cdf0e10cSrcweir
57*cdf0e10cSrcweir$(DESTDIR)/config.guess : $(SRC_ROOT)/config.guess
58*cdf0e10cSrcweir	@@-rm -f $@
59*cdf0e10cSrcweir	$(MY_TEXTCOPY) $(SRC_ROOT)/config.guess $@
60*cdf0e10cSrcweir
61*cdf0e10cSrcweir$(DESTDIR)/config.sub : $(SRC_ROOT)/config.sub
62*cdf0e10cSrcweir	@@-rm -f $@
63*cdf0e10cSrcweir	$(MY_TEXTCOPY) $(SRC_ROOT)/config.sub $@
64*cdf0e10cSrcweir
65*cdf0e10cSrcweir$(DESTDIR)/setsdkenv_unix : $(PRJ)/setsdkenv_unix
66*cdf0e10cSrcweir	@@-rm -f $@
67*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
68*cdf0e10cSrcweir
69*cdf0e10cSrcweir$(DESTDIR)/setsdkenv_unix.%.in : $(PRJ)/setsdkenv_unix.%.in
70*cdf0e10cSrcweir	@@-rm -f $@
71*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
72*cdf0e10cSrcweir
73*cdf0e10cSrcweir$(DESTDIR)/setsdkenv_windows.bat : $(PRJ)/setsdkenv_windows.bat
74*cdf0e10cSrcweir	@@-rm -f $@
75*cdf0e10cSrcweir	$(TYPE) $< | $(SED) 's#__SDKNAME__#$(SDKDIRNAME)#' > $@
76*cdf0e10cSrcweir
77*cdf0e10cSrcweir$(DESTDIR)/%.bat : $(PRJ)/%.bat
78*cdf0e10cSrcweir	@@-rm -f $@
79*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
80*cdf0e10cSrcweir
81*cdf0e10cSrcweir$(DESTDIR)/setsdkenv_windows.template : $(PRJ)/setsdkenv_windows.template
82*cdf0e10cSrcweir	@@-rm -f $@
83*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
84*cdf0e10cSrcweir
85*cdf0e10cSrcweir$(DESTDIR)/cfgWin.js : $(PRJ)/cfgWin.js
86*cdf0e10cSrcweir	@@-rm -f $@
87*cdf0e10cSrcweir	$(MY_TEXTCOPY) $(PRJ)/cfgWin.js $@
88*cdf0e10cSrcweir
89*cdf0e10cSrcweir$(DESTDIRSETTINGS)/%.mk : $(PRJ)/settings/%.mk
90*cdf0e10cSrcweir	@@-rm -f $@
91*cdf0e10cSrcweir.IF "$(COMEX)"=="7"
92*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< | $(SED) -e 's/stlport_vc7/stlport_vc6/' $@
93*cdf0e10cSrcweir.ELSE
94*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
95*cdf0e10cSrcweir.ENDIF
96*cdf0e10cSrcweir
97*cdf0e10cSrcweir$(DESTDIRXML)/module-description.dtd : $(XMLOUT)/module-description.dtd
98*cdf0e10cSrcweir	@@-rm -f $@
99*cdf0e10cSrcweir	$(MY_TEXTCOPY) $(XMLOUT)/module-description.dtd $@
100*cdf0e10cSrcweir$(DESTDIRXML)/%.xml : $(XMLOUT)/%.xml
101*cdf0e10cSrcweir	@@-rm -f $@
102*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
103*cdf0e10cSrcweir
104*cdf0e10cSrcweir$(DESTDIRBIN)/%$(EXEPOSTFIX) : $(BINOUT)/%$(EXEPOSTFIX)
105*cdf0e10cSrcweir	@@-rm -f $@
106*cdf0e10cSrcweir	$(GNUCOPY) $(BINOUT)/$(@:f) $@
107*cdf0e10cSrcweir
108*cdf0e10cSrcweir$(DESTDIRBIN)/%.bin : $(BINOUT)/%.bin
109*cdf0e10cSrcweir	@@-rm -f $@
110*cdf0e10cSrcweir	$(GNUCOPY) $(BINOUT)/$(@:f) $@
111*cdf0e10cSrcweir
112*cdf0e10cSrcweir$(DESTDIRBIN)/regcomp : $(BINOUT)/regcomp
113*cdf0e10cSrcweir	@@-rm -f $@
114*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
115*cdf0e10cSrcweir
116*cdf0e10cSrcweir$(DESTDIRBIN)/unoapploader$(EXEPOSTFIX) : $(BIN)/unoapploader$(EXEPOSTFIX)
117*cdf0e10cSrcweir	@@-rm -f $@
118*cdf0e10cSrcweir	$(GNUCOPY) $(BIN)/$(@:f) $@
119*cdf0e10cSrcweir
120*cdf0e10cSrcweir# special rule for special Java UNO native library
121*cdf0e10cSrcweir# (used for all platforms but built only under windows;
122*cdf0e10cSrcweir# otherwise provided in external)
123*cdf0e10cSrcweir$(DESTDIRJAR)/win/unowinreg.dll : $(BIN)/unowinreg.dll
124*cdf0e10cSrcweir	@@-rm -f $@
125*cdf0e10cSrcweir	$(GNUCOPY) $< $@
126*cdf0e10cSrcweir
127*cdf0e10cSrcweir$(DESTDIRCLI)/%.dll : $(BINOUT)/%.dll
128*cdf0e10cSrcweir	@@-rm -f $@
129*cdf0e10cSrcweir	$(GNUCOPY) $< $@
130*cdf0e10cSrcweir
131*cdf0e10cSrcweir$(DESTDIRDLL)/%$(MY_DLLPOSTFIX) : $(DLLOUT)/%$(MY_DLLPOSTFIX)
132*cdf0e10cSrcweir	@@-rm -f $@
133*cdf0e10cSrcweir	$(GNUCOPY) $(DLLOUT)/$(@:f) $@
134*cdf0e10cSrcweir
135*cdf0e10cSrcweir$(DESTDIRJAR)/com/sun/star/lib/loader/%.class : $(CLASSDIR)/com/sun/star/lib/loader/%.class
136*cdf0e10cSrcweir	@@-$(RM) $(@:db).class
137*cdf0e10cSrcweir	$(COPY) $(<:db).class $(@:d)
138*cdf0e10cSrcweir# deal with subclasses
139*cdf0e10cSrcweir	@@-$(RM) $(@:db)$(EMQ)$$*.class
140*cdf0e10cSrcweir	-$(COPY) $(<:db)$(EMQ)$$*.class $(@:d)
141*cdf0e10cSrcweir
142*cdf0e10cSrcweir$(DESTDIRIDL)/% : $(IDLOUT)/%
143*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
144*cdf0e10cSrcweir#	@touch $(IDL_DOCU_CLEANUP_FLAG)
145*cdf0e10cSrcweir
146*cdf0e10cSrcweir$(DESTDIRINC)/udkversion.mk :
147*cdf0e10cSrcweir	@@-rm -f $@
148*cdf0e10cSrcweir	@echo #UDK version number > $@
149*cdf0e10cSrcweir	@echo #major >> $@
150*cdf0e10cSrcweir	@echo UDK_MAJOR=$(UDK_MAJOR) >> $@
151*cdf0e10cSrcweir	@echo #minor >> $@
152*cdf0e10cSrcweir	@echo UDK_MINOR=$(UDK_MINOR) >> $@
153*cdf0e10cSrcweir	@echo #micro >> $@
154*cdf0e10cSrcweir	@echo UDK_MICRO=$(UDK_MICRO) >> $@
155*cdf0e10cSrcweir
156*cdf0e10cSrcweir$(DESTDIRINC)/% : $(INCOUT)/%
157*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
158*cdf0e10cSrcweir
159*cdf0e10cSrcweir$(DESTDIRLIB)/%.lib : $(LIBOUT)/%.lib
160*cdf0e10cSrcweir	@@-rm -f $@
161*cdf0e10cSrcweir	$(GNUCOPY) $(LIBOUT)/$(@:f) $@
162*cdf0e10cSrcweir
163*cdf0e10cSrcweir$(DESTDIRLIB)/%.a : $(LIBOUT)/%.a
164*cdf0e10cSrcweir	@@-rm -f $@
165*cdf0e10cSrcweir	$(GNUCOPY) $(LIBOUT)/$(@:f) $@
166*cdf0e10cSrcweir
167*cdf0e10cSrcweir$(DIR_CREATE_FLAG) :
168*cdf0e10cSrcweir    $(TYPE) $(mktmp $(DIR_DIRECTORY_LIST)) | xargs -n 20 $(MKDIRHIER) && echo "dirs created" > $@ && touch $@
169*cdf0e10cSrcweir	$(DELAY) 2
170*cdf0e10cSrcweir
171*cdf0e10cSrcweir$(DESTDIRSETTINGS)/component.uno.def : $(PRJ)/settings/component.uno.def
172*cdf0e10cSrcweir	@@-rm -f $@
173*cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
174*cdf0e10cSrcweir
175*cdf0e10cSrcweir$(DESTDIRSETTINGS)/component.uno.map : $(SOLARENV)/bin/addsym.awk $(SOLARENV)/src/component.map
176*cdf0e10cSrcweir	@@-$(RM) -f $@
177*cdf0e10cSrcweir.IF "$(COMID)"=="gcc3"
178*cdf0e10cSrcweir	tr -d "\015" < $(SOLARENV)/src/component.map | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
179*cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
180*cdf0e10cSrcweir	tr -d "\015" < $(SOLARENV)/src/component.map | tail -n +3 | head -3 | sed -e 's/.*component/_component/g' -e 's/;[ ]*//' > $@
181*cdf0e10cSrcweir.ENDIF
182*cdf0e10cSrcweir.ELSE           # "$(COMID)"=="gcc3"
183*cdf0e10cSrcweir	tr -d "\015" < $(SOLARENV)/src/component.map > $@
184*cdf0e10cSrcweir.ENDIF          # "$(COMID)"=="gcc3"
185*cdf0e10cSrcweir	@chmod 664 $@
186*cdf0e10cSrcweir
187*cdf0e10cSrcweir$(DIR_FILE_LIST) : $(DIR_CREATE_FLAG)
188*cdf0e10cSrcweir
189*cdf0e10cSrcweir$(DIR_FILE_FLAG) : $(DIR_FILE_LIST)
190*cdf0e10cSrcweir    @echo "must be zipped" > $@
191*cdf0e10cSrcweir
192*cdf0e10cSrcweir
193*cdf0e10cSrcweir
194