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: odk_rules.pmk,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 #*************************************************************************
33 $(DESTDIRDOCU)$/%.html : $(PRJ)$/docs$/%.html
35 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
37 $(DESTDIREXAMPLES)$/%.html : $(PRJ)$/examples$/%.html
39 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
41 $(DESTDIR)$/index.html : $(PRJ)$/index.html
43 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
45 $(DESTDIRDOCU)$/%.css : $(PRJ)$/docs$/%.css
47 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
49 $(DESTDIRDOCUIMAGES)$/% : $(PRJ)$/docs$/images$/%
53 $(DESTDIR)$/configure : $(PRJ)$/configure
55 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(PRJ)$/configure $(MY_TEXTCOPY_TARGETPRE) $@
56 .IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt"
60 $(DESTDIR)$/configure.pl : $(PRJ)$/configure.pl
62 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(PRJ)$/configure.pl $(MY_TEXTCOPY_TARGETPRE) $@
63 .IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt"
67 $(DESTDIR)$/config.guess : $(SRC_ROOT)$/config.guess
69 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(SRC_ROOT)$/config.guess $(MY_TEXTCOPY_TARGETPRE) $@
70 .IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt"
74 $(DESTDIR)$/config.sub : $(SRC_ROOT)$/config.sub
76 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(SRC_ROOT)$/config.sub $(MY_TEXTCOPY_TARGETPRE) $@
77 .IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt"
81 $(DESTDIR)$/setsdkenv_unix : $(PRJ)$/setsdkenv_unix
83 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
84 .IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt"
88 #.IF "$(USE_SHELL)"=="4nt"
89 # $(TYPE) $< | $(SED) "s/__SDKNAME__/$(SDKDIRNAME)/" > $@
91 # $(TYPE) $< | $(SED) 's#__SDKNAME__#$(SDKDIRNAME)#' > $@
94 $(DESTDIR)$/setsdkenv_unix.%.in : $(PRJ)$/setsdkenv_unix.%.in
96 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
97 .IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt"
101 $(DESTDIR)$/setsdkenv_windows.bat : $(PRJ)$/setsdkenv_windows.bat
103 .IF "$(USE_SHELL)"=="4nt"
104 $(TYPE) $< | $(SED) "s/__SDKNAME__/$(SDKDIRNAME)/" > $@
106 $(TYPE) $< | $(SED) 's#__SDKNAME__#$(SDKDIRNAME)#' > $@
109 $(DESTDIR)$/%.bat : $(PRJ)$/%.bat
111 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
113 $(DESTDIR)$/setsdkenv_windows.template : $(PRJ)$/setsdkenv_windows.template
115 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
117 $(DESTDIR)$/cfgWin.js : $(PRJ)$/cfgWin.js
119 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(PRJ)$/cfgWin.js $(MY_TEXTCOPY_TARGETPRE) $@
121 $(DESTDIRSETTINGS)$/%.mk : $(PRJ)$/settings$/%.mk
124 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< | $(SED) -e 's/stlport_vc7/stlport_vc6/' $(MY_TEXTCOPY_TARGETPRE) $@
126 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
129 $(DESTDIRXML)$/module-description.dtd : $(XMLOUT)$/module-description.dtd
131 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(XMLOUT)$/module-description.dtd $(MY_TEXTCOPY_TARGETPRE) $@
132 $(DESTDIRXML)$/%.xml : $(XMLOUT)$/%.xml
134 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
136 $(DESTDIRBIN)$/%$(EXEPOSTFIX) : $(BINOUT)$/%$(EXEPOSTFIX)
138 $(GNUCOPY) $(BINOUT)$/$(@:f) $@
140 $(DESTDIRBIN)$/%.bin : $(BINOUT)$/%.bin
142 $(GNUCOPY) $(BINOUT)$/$(@:f) $@
144 $(DESTDIRBIN)$/regcomp : $(BINOUT)$/regcomp
146 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
147 .IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt"
151 $(DESTDIRBIN)$/unoapploader$(EXEPOSTFIX) : $(BIN)$/unoapploader$(EXEPOSTFIX)
153 $(GNUCOPY) $(BIN)$/$(@:f) $@
155 # special rule for special Java UNO native library
156 # (used for all platforms but built only under windows;
157 # otherwise provided in external)
158 $(DESTDIRJAR)$/win$/unowinreg.dll : $(BIN)$/unowinreg.dll
162 $(DESTDIRCLI)$/%.dll : $(BINOUT)$/%.dll
166 $(DESTDIRDLL)$/%$(MY_DLLPOSTFIX) : $(DLLOUT)$/%$(MY_DLLPOSTFIX)
168 $(GNUCOPY) $(DLLOUT)$/$(@:f) $@
170 $(DESTDIRJAR)$/com$/sun$/star$/lib$/loader$/%.class : $(CLASSDIR)$/com$/sun$/star$/lib$/loader$/%.class
171 @@-$(RM) $(@:db).class
172 $(COPY) $(<:db).class $(@:d)
173 # deal with subclasses
174 @@-$(RM) $(@:db)$(EMQ)$$*.class
175 -$(COPY) $(<:db)$(EMQ)$$*.class $(@:d)
177 $(DESTDIRIDL)$/% : $(IDLOUT)$/%
178 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
179 @touch $(IDL_DOCU_CLEANUP_FLAG)
181 $(DESTDIRINC)$/udkversion.mk :
183 @echo #UDK version number > $@
185 @echo UDK_MAJOR=$(UDK_MAJOR) >> $@
187 @echo UDK_MINOR=$(UDK_MINOR) >> $@
189 @echo UDK_MICRO=$(UDK_MICRO) >> $@
191 $(DESTDIRINC)$/% : $(INCOUT)$/%
192 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
194 $(DESTDIRLIB)$/%.lib : $(LIBOUT)$/%.lib
196 $(GNUCOPY) $(LIBOUT)$/$(@:f) $@
198 $(DESTDIRLIB)$/%.a : $(LIBOUT)$/%.a
200 $(GNUCOPY) $(LIBOUT)$/$(@:f) $@
203 .IF "$(USE_SHELL)" != "4nt"
204 $(TYPE) $(mktmp $(DIR_DIRECTORY_LIST)) | xargs -n 20 $(MKDIRHIER) && echo "dirs created" > $@ && touch $@
206 $(TYPE) $(mktmp $(DIR_DIRECTORY_LIST:s#\#/#)) | $(XARGS) mkdir.exe -p && echo "dirs created" > $@ && touch $@
210 $(DESTDIRSETTINGS)$/component.uno.def : $(PRJ)$/settings$/component.uno.def
212 $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
214 $(DESTDIRSETTINGS)$/component.uno.map : $(SOLARENV)$/bin$/addsym.awk $(SOLARENV)$/src$/component.map
216 .IF "$(COMID)"=="gcc3"
217 tr -d "\015" < $(SOLARENV)$/src$/component.map | $(AWK) -f $(SOLARENV)$/bin$/addsym.awk > $@
218 .IF "$(OS)"=="MACOSX"
219 tr -d "\015" < $(SOLARENV)$/src$/component.map | tail -n +3 | head -3 | sed -e 's/.*component/_component/g' -e 's/;[ ]*$//' > $@
221 .ELSE # "$(COMID)"=="gcc3"
222 tr -d "\015" < $(SOLARENV)$/src$/component.map > $@
223 .ENDIF # "$(COMID)"=="gcc3"
226 $(DIR_FILE_LIST) : $(DIR_CREATE_FLAG)
228 $(DIR_FILE_FLAG) : $(DIR_FILE_LIST)
229 @echo "must be zipped" > $@