xref: /aoo41x/main/odk/util/odk_rules.pmk (revision e6b7d829)
1*e6b7d829SAndrew Rist#**************************************************************
2*e6b7d829SAndrew Rist#
3*e6b7d829SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*e6b7d829SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*e6b7d829SAndrew Rist#  distributed with this work for additional information
6*e6b7d829SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*e6b7d829SAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*e6b7d829SAndrew Rist#  "License"); you may not use this file except in compliance
9*e6b7d829SAndrew Rist#  with the License.  You may obtain a copy of the License at
10*e6b7d829SAndrew Rist#
11*e6b7d829SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*e6b7d829SAndrew Rist#
13*e6b7d829SAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*e6b7d829SAndrew Rist#  software distributed under the License is distributed on an
15*e6b7d829SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*e6b7d829SAndrew Rist#  KIND, either express or implied.  See the License for the
17*e6b7d829SAndrew Rist#  specific language governing permissions and limitations
18*e6b7d829SAndrew Rist#  under the License.
19*e6b7d829SAndrew Rist#
20*e6b7d829SAndrew Rist#**************************************************************
21*e6b7d829SAndrew Rist
22*e6b7d829SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir
25cdf0e10cSrcweir$(DESTDIRDOCU)/%.html : $(PRJ)/docs/%.html
26cdf0e10cSrcweir	@@-rm -f $@
27cdf0e10cSrcweir	tr -d "\015" < $< |  sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@
28cdf0e10cSrcweir
29cdf0e10cSrcweir$(DESTDIREXAMPLES)/%.html : $(PRJ)/examples/%.html
30cdf0e10cSrcweir	@@-rm -f $@
31cdf0e10cSrcweir	tr -d "\015" < $< |  sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@
32cdf0e10cSrcweir
33cdf0e10cSrcweir$(DESTDIR)/index.html : $(PRJ)/index.html
34cdf0e10cSrcweir	@@-rm -f $@
35cdf0e10cSrcweir	tr -d "\015" < $< |  sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@
36cdf0e10cSrcweir
37cdf0e10cSrcweir$(DESTDIRDOCU)/%.css : $(PRJ)/docs/%.css
38cdf0e10cSrcweir	@@-rm -f $@
39cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
40cdf0e10cSrcweir
41cdf0e10cSrcweir$(DESTDIRDOCUIMAGES)/% : $(PRJ)/docs/images/%
42cdf0e10cSrcweir	@@-rm -f $@
43cdf0e10cSrcweir	$(MY_COPY) $< $@
44cdf0e10cSrcweir
45cdf0e10cSrcweir$(DESTDIR)/configure : $(PRJ)/configure
46cdf0e10cSrcweir	@@-rm -f $@
47cdf0e10cSrcweir	$(MY_TEXTCOPY) $(PRJ)/configure $@
48cdf0e10cSrcweir
49cdf0e10cSrcweir$(DESTDIR)/configure.pl : $(PRJ)/configure.pl
50cdf0e10cSrcweir	@@-rm -f $@
51cdf0e10cSrcweir	$(MY_TEXTCOPY) $(PRJ)/configure.pl $@
52cdf0e10cSrcweir
53cdf0e10cSrcweir$(DESTDIR)/config.guess : $(SRC_ROOT)/config.guess
54cdf0e10cSrcweir	@@-rm -f $@
55cdf0e10cSrcweir	$(MY_TEXTCOPY) $(SRC_ROOT)/config.guess $@
56cdf0e10cSrcweir
57cdf0e10cSrcweir$(DESTDIR)/config.sub : $(SRC_ROOT)/config.sub
58cdf0e10cSrcweir	@@-rm -f $@
59cdf0e10cSrcweir	$(MY_TEXTCOPY) $(SRC_ROOT)/config.sub $@
60cdf0e10cSrcweir
61cdf0e10cSrcweir$(DESTDIR)/setsdkenv_unix : $(PRJ)/setsdkenv_unix
62cdf0e10cSrcweir	@@-rm -f $@
63cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
64cdf0e10cSrcweir
65cdf0e10cSrcweir$(DESTDIR)/setsdkenv_unix.%.in : $(PRJ)/setsdkenv_unix.%.in
66cdf0e10cSrcweir	@@-rm -f $@
67cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
68cdf0e10cSrcweir
69cdf0e10cSrcweir$(DESTDIR)/setsdkenv_windows.bat : $(PRJ)/setsdkenv_windows.bat
70cdf0e10cSrcweir	@@-rm -f $@
71cdf0e10cSrcweir	$(TYPE) $< | $(SED) 's#__SDKNAME__#$(SDKDIRNAME)#' > $@
72cdf0e10cSrcweir
73cdf0e10cSrcweir$(DESTDIR)/%.bat : $(PRJ)/%.bat
74cdf0e10cSrcweir	@@-rm -f $@
75cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
76cdf0e10cSrcweir
77cdf0e10cSrcweir$(DESTDIR)/setsdkenv_windows.template : $(PRJ)/setsdkenv_windows.template
78cdf0e10cSrcweir	@@-rm -f $@
79cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
80cdf0e10cSrcweir
81cdf0e10cSrcweir$(DESTDIR)/cfgWin.js : $(PRJ)/cfgWin.js
82cdf0e10cSrcweir	@@-rm -f $@
83cdf0e10cSrcweir	$(MY_TEXTCOPY) $(PRJ)/cfgWin.js $@
84cdf0e10cSrcweir
85cdf0e10cSrcweir$(DESTDIRSETTINGS)/%.mk : $(PRJ)/settings/%.mk
86cdf0e10cSrcweir	@@-rm -f $@
87cdf0e10cSrcweir.IF "$(COMEX)"=="7"
88cdf0e10cSrcweir	$(MY_TEXTCOPY) $< | $(SED) -e 's/stlport_vc7/stlport_vc6/' $@
89cdf0e10cSrcweir.ELSE
90cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
91cdf0e10cSrcweir.ENDIF
92cdf0e10cSrcweir
93cdf0e10cSrcweir$(DESTDIRXML)/module-description.dtd : $(XMLOUT)/module-description.dtd
94cdf0e10cSrcweir	@@-rm -f $@
95cdf0e10cSrcweir	$(MY_TEXTCOPY) $(XMLOUT)/module-description.dtd $@
96cdf0e10cSrcweir$(DESTDIRXML)/%.xml : $(XMLOUT)/%.xml
97cdf0e10cSrcweir	@@-rm -f $@
98cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
99cdf0e10cSrcweir
100cdf0e10cSrcweir$(DESTDIRBIN)/%$(EXEPOSTFIX) : $(BINOUT)/%$(EXEPOSTFIX)
101cdf0e10cSrcweir	@@-rm -f $@
102cdf0e10cSrcweir	$(GNUCOPY) $(BINOUT)/$(@:f) $@
103cdf0e10cSrcweir
104cdf0e10cSrcweir$(DESTDIRBIN)/%.bin : $(BINOUT)/%.bin
105cdf0e10cSrcweir	@@-rm -f $@
106cdf0e10cSrcweir	$(GNUCOPY) $(BINOUT)/$(@:f) $@
107cdf0e10cSrcweir
108cdf0e10cSrcweir$(DESTDIRBIN)/regcomp : $(BINOUT)/regcomp
109cdf0e10cSrcweir	@@-rm -f $@
110cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
111cdf0e10cSrcweir
112cdf0e10cSrcweir$(DESTDIRBIN)/unoapploader$(EXEPOSTFIX) : $(BIN)/unoapploader$(EXEPOSTFIX)
113cdf0e10cSrcweir	@@-rm -f $@
114cdf0e10cSrcweir	$(GNUCOPY) $(BIN)/$(@:f) $@
115cdf0e10cSrcweir
116cdf0e10cSrcweir# special rule for special Java UNO native library
117cdf0e10cSrcweir# (used for all platforms but built only under windows;
118cdf0e10cSrcweir# otherwise provided in external)
119cdf0e10cSrcweir$(DESTDIRJAR)/win/unowinreg.dll : $(BIN)/unowinreg.dll
120cdf0e10cSrcweir	@@-rm -f $@
121cdf0e10cSrcweir	$(GNUCOPY) $< $@
122cdf0e10cSrcweir
123cdf0e10cSrcweir$(DESTDIRCLI)/%.dll : $(BINOUT)/%.dll
124cdf0e10cSrcweir	@@-rm -f $@
125cdf0e10cSrcweir	$(GNUCOPY) $< $@
126cdf0e10cSrcweir
127cdf0e10cSrcweir$(DESTDIRDLL)/%$(MY_DLLPOSTFIX) : $(DLLOUT)/%$(MY_DLLPOSTFIX)
128cdf0e10cSrcweir	@@-rm -f $@
129cdf0e10cSrcweir	$(GNUCOPY) $(DLLOUT)/$(@:f) $@
130cdf0e10cSrcweir
131cdf0e10cSrcweir$(DESTDIRJAR)/com/sun/star/lib/loader/%.class : $(CLASSDIR)/com/sun/star/lib/loader/%.class
132cdf0e10cSrcweir	@@-$(RM) $(@:db).class
133cdf0e10cSrcweir	$(COPY) $(<:db).class $(@:d)
134cdf0e10cSrcweir# deal with subclasses
135cdf0e10cSrcweir	@@-$(RM) $(@:db)$(EMQ)$$*.class
136cdf0e10cSrcweir	-$(COPY) $(<:db)$(EMQ)$$*.class $(@:d)
137cdf0e10cSrcweir
138cdf0e10cSrcweir$(DESTDIRIDL)/% : $(IDLOUT)/%
139cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
140cdf0e10cSrcweir#	@touch $(IDL_DOCU_CLEANUP_FLAG)
141cdf0e10cSrcweir
142cdf0e10cSrcweir$(DESTDIRINC)/udkversion.mk :
143cdf0e10cSrcweir	@@-rm -f $@
144cdf0e10cSrcweir	@echo #UDK version number > $@
145cdf0e10cSrcweir	@echo #major >> $@
146cdf0e10cSrcweir	@echo UDK_MAJOR=$(UDK_MAJOR) >> $@
147cdf0e10cSrcweir	@echo #minor >> $@
148cdf0e10cSrcweir	@echo UDK_MINOR=$(UDK_MINOR) >> $@
149cdf0e10cSrcweir	@echo #micro >> $@
150cdf0e10cSrcweir	@echo UDK_MICRO=$(UDK_MICRO) >> $@
151cdf0e10cSrcweir
152cdf0e10cSrcweir$(DESTDIRINC)/% : $(INCOUT)/%
153cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
154cdf0e10cSrcweir
155cdf0e10cSrcweir$(DESTDIRLIB)/%.lib : $(LIBOUT)/%.lib
156cdf0e10cSrcweir	@@-rm -f $@
157cdf0e10cSrcweir	$(GNUCOPY) $(LIBOUT)/$(@:f) $@
158cdf0e10cSrcweir
159cdf0e10cSrcweir$(DESTDIRLIB)/%.a : $(LIBOUT)/%.a
160cdf0e10cSrcweir	@@-rm -f $@
161cdf0e10cSrcweir	$(GNUCOPY) $(LIBOUT)/$(@:f) $@
162cdf0e10cSrcweir
163cdf0e10cSrcweir$(DIR_CREATE_FLAG) :
164cdf0e10cSrcweir    $(TYPE) $(mktmp $(DIR_DIRECTORY_LIST)) | xargs -n 20 $(MKDIRHIER) && echo "dirs created" > $@ && touch $@
165cdf0e10cSrcweir	$(DELAY) 2
166cdf0e10cSrcweir
167cdf0e10cSrcweir$(DESTDIRSETTINGS)/component.uno.def : $(PRJ)/settings/component.uno.def
168cdf0e10cSrcweir	@@-rm -f $@
169cdf0e10cSrcweir	$(MY_TEXTCOPY) $< $@
170cdf0e10cSrcweir
171cdf0e10cSrcweir$(DESTDIRSETTINGS)/component.uno.map : $(SOLARENV)/bin/addsym.awk $(SOLARENV)/src/component.map
172cdf0e10cSrcweir	@@-$(RM) -f $@
173cdf0e10cSrcweir.IF "$(COMID)"=="gcc3"
174cdf0e10cSrcweir	tr -d "\015" < $(SOLARENV)/src/component.map | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
175cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
176cdf0e10cSrcweir	tr -d "\015" < $(SOLARENV)/src/component.map | tail -n +3 | head -3 | sed -e 's/.*component/_component/g' -e 's/;[ ]*//' > $@
177cdf0e10cSrcweir.ENDIF
178cdf0e10cSrcweir.ELSE           # "$(COMID)"=="gcc3"
179cdf0e10cSrcweir	tr -d "\015" < $(SOLARENV)/src/component.map > $@
180cdf0e10cSrcweir.ENDIF          # "$(COMID)"=="gcc3"
181cdf0e10cSrcweir	@chmod 664 $@
182cdf0e10cSrcweir
183cdf0e10cSrcweir$(DIR_FILE_LIST) : $(DIR_CREATE_FLAG)
184cdf0e10cSrcweir
185cdf0e10cSrcweir$(DIR_FILE_FLAG) : $(DIR_FILE_LIST)
186cdf0e10cSrcweir    @echo "must be zipped" > $@
187cdf0e10cSrcweir
188cdf0e10cSrcweir
189cdf0e10cSrcweir
190