xref: /aoo41x/main/odk/pack/copying/makefile.mk (revision ef1ef8e6)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ=../..
25PRJNAME=odk
26TARGET=copying
27
28#----------------------------------------------------------------
29.INCLUDE: settings.mk
30.INCLUDE: $(PRJ)/util/makefile.pmk
31#----------------------------------------------------------------
32
33IDLLIST:={$(subst,/,/ $(shell @$(FIND) $(IDLOUT)/com -type f))}
34DESTIDLLIST={$(subst,$(IDLOUT),$(DESTDIRIDL) $(IDLLIST))}
35
36DESTINCLUDELIST={$(subst,$(SOLARINCDIR),$(DESTDIRINC) $(INCLUDELIST))}
37DESTINCLUDELIST+=$(DESTDIRINC)/udkversion.mk
38
39DESTINCDIRLIST={$(subst,$(INCOUT),$(DESTDIRINC) $(INCLUDEDIRLIST))}
40
41IDL_DOCU_INDEX_FILE = $(DESTDIRGENIDLREF)/module-ix.html
42IDL_DOCU_CLEANUP_FLAG = $(MISC)/idl_docu_cleanup.flag
43
44IDL_CHAPTER_REFS=idl_chapter_refs.txt
45
46EXELIST = \
47	$(DESTDIRBIN)/cppumaker$(EXEPOSTFIX) 	\
48	$(DESTDIRBIN)/regcompare$(EXEPOSTFIX) 	\
49	$(DESTDIRBIN)/ucpp$(EXEPOSTFIX) 	\
50	$(DESTDIRBIN)/idlc$(EXEPOSTFIX) 	\
51	$(DESTDIRBIN)/javamaker$(EXEPOSTFIX) 	\
52	$(DESTDIRBIN)/autodoc$(EXEPOSTFIX) \
53	$(DESTDIRBIN)/unoapploader$(EXEPOSTFIX) \
54	$(DESTDIRBIN)/uno-skeletonmaker$(EXEPOSTFIX)
55
56.IF "$(GUI)"=="WNT"
57EXELIST += \
58	$(DESTDIRBIN)/climaker$(EXEPOSTFIX)
59.ENDIF
60
61.IF "$(GUI)"=="WNT"
62CLILIST = \
63	$(DESTDIRCLI)/cli_basetypes.dll 	\
64	$(DESTDIRCLI)/cli_uretypes.dll 	\
65	$(DESTDIRCLI)/cli_oootypes.dll 	\
66	$(DESTDIRCLI)/cli_ure.dll 	\
67	$(DESTDIRCLI)/cli_cppuhelper.dll
68.ENDIF
69
70
71.IF "$(GUI)"=="WNT"
72LIBLIST = \
73	$(DESTDIRLIB)/istore.lib 	\
74	$(DESTDIRLIB)/ireg.lib 	\
75	$(DESTDIRLIB)/isal.lib 	\
76	$(DESTDIRLIB)/isalhelper.lib 	\
77	$(DESTDIRLIB)/icppu.lib 	\
78	$(DESTDIRLIB)/icppuhelper.lib 	\
79	$(DESTDIRLIB)/irmcxt.lib \
80	$(DESTDIRLIB)/ipurpenvhelper3MSC.lib
81
82.IF "$(COMEX)"=="8"
83	LIBLIST += $(DESTDIRLIB)/stlport_vc7.lib
84.ELIF "$(COMEX)"=="10" || "$(COMEX)"=="11" || "$(COMEX)"=="12"
85	LIBLIST += $(DESTDIRLIB)/stlport_vc71.lib
86.ELSE
87	LIBLIST += $(DESTDIRLIB)/stlport_vc6.lib
88.ENDIF
89.ENDIF
90
91.IF "$(OS)"=="LINUX"
92	LIBLIST = $(DESTDIRLIB)/libsalcpprt.a
93.ENDIF
94
95# note, that inner class files are copied implicitly
96DESTCLASSESLIST= \
97	$(DESTDIRJAR)/com/sun/star/lib/loader/Loader.class \
98	$(DESTDIRJAR)/com/sun/star/lib/loader/InstallationFinder.class \
99	$(DESTDIRJAR)/com/sun/star/lib/loader/WinRegKey.class \
100	$(DESTDIRJAR)/com/sun/star/lib/loader/WinRegKeyException.class
101#	$(DESTDIRJAR)/com/sun/star/lib/loader/Loader$$CustomURLClassLoader.class \
102#	$(DESTDIRJAR)/com/sun/star/lib/loader/InstallationFinder$$StreamGobbler.class \
103
104SETTINGSLIST= \
105	$(DESTDIRSETTINGS)/settings.mk \
106	$(DESTDIRSETTINGS)/std.mk \
107	$(DESTDIRSETTINGS)/stdtarget.mk \
108	$(DESTDIRSETTINGS)/dk.mk
109
110
111.IF "$(GUI)"=="WNT"
112SETTINGSLIST+=$(DESTDIRSETTINGS)/component.uno.def
113.ENDIF
114
115.IF "$(GUI)"=="UNX"
116SETTINGSLIST+=$(DESTDIRSETTINGS)/component.uno.map
117.ENDIF
118
119
120DOCUHTMLFILES+= \
121	$(DESTDIR)/index.html \
122	$(DESTDIRDOCU)/tools.html \
123	$(DESTDIRDOCU)/notsupported.html \
124	$(DESTDIRDOCU)/install.html \
125	$(DESTDIREXAMPLES)/examples.html \
126	$(DESTDIREXAMPLES)/DevelopersGuide/examples.html
127
128DOCUFILES= \
129	$(DOCUHTMLFILES) \
130	$(DESTDIRDOCU)/sdk_styles.css \
131	$(DESTDIRGENIDLREF)/idl.css \
132	$(DESTDIRDOCUIMAGES)/nada.gif \
133	$(DESTDIRDOCUIMAGES)/arrow-2.gif \
134	$(DESTDIRDOCUIMAGES)/bluball.gif \
135	$(DESTDIRDOCUIMAGES)/ooo-main-app_32.png \
136	$(DESTDIRDOCUIMAGES)/odk-footer-logo.gif \
137	$(DESTDIRDOCUIMAGES)/arrow-1.gif \
138	$(DESTDIRDOCUIMAGES)/arrow-3.gif \
139	$(DESTDIRDOCUIMAGES)/bg_table.png \
140	$(DESTDIRDOCUIMAGES)/bg_table2.png \
141	$(DESTDIRDOCUIMAGES)/bg_table3.png \
142	$(DESTDIRDOCUIMAGES)/nav_down.png \
143	$(DESTDIRDOCUIMAGES)/nav_home.png \
144	$(DESTDIRDOCUIMAGES)/nav_left.png \
145	$(DESTDIRDOCUIMAGES)/nav_right.png \
146	$(DESTDIRDOCUIMAGES)/nav_up.png \
147	$(DESTDIRDOCUIMAGES)/sdk_head-1.png \
148	$(DESTDIRDOCUIMAGES)/sdk_head-2.png \
149	$(DESTDIRDOCUIMAGES)/sdk_line-1.gif \
150	$(DESTDIRDOCUIMAGES)/sdk_line-2.gif
151
152.IF "$(GUI)"=="UNX"
153INSTALLSCRIPT= \
154	$(DESTDIR)/config.guess \
155	$(DESTDIR)/config.sub \
156	$(DESTDIR)/configure.pl \
157	$(DESTDIR)/setsdkenv_unix \
158	$(DESTDIR)/setsdkenv_unix.sh.in \
159	$(DESTDIR)/setsdkenv_unix.csh.in
160.ELSE
161INSTALLSCRIPT= \
162	$(DESTDIR)/setsdkenv_windows.bat \
163	$(DESTDIR)/setsdkenv_windows.template \
164	$(DESTDIR)/setsdkname.bat \
165	$(DESTDIR)/cfgWin.js
166.ENDIF
167
168DIR_FILE_LIST=\
169	$(EXELIST) \
170	$(CLILIST) \
171	$(LIBLIST) \
172	$(SETTINGSLIST) \
173	$(DOCUFILES) \
174	$(INSTALLSCRIPT) \
175	$(DESTIDLLIST)  \
176	$(DESTINCLUDELIST) \
177	$(DESTCLASSESLIST) \
178    $(IDL_DOCU_INDEX_FILE) \
179    $(CONVERTTAGFLAG)
180
181.IF "$(OS)"=="MACOSX"
182DIR_FILE_LIST += $(DESTDIRBIN)/addsym-macosx.sh
183.ENDIF
184
185.IF "$(SOLAR_JAVA)" != ""
186DIR_FILE_LIST += $(DESTDIRJAR)/win/unowinreg.dll
187.ENDIF
188
189DIR_DIRECTORY_LIST:=$(uniq $(DIR_FILE_LIST:d))
190DIR_CREATE_FLAG:=$(MISC)/copying_dirs_created.txt
191DIR_FILE_FLAG:=$(MISC)/copying_files.txt
192
193.IF "$(SOLAR_JAVA)" != ""
194# Special work for simple uno bootstrap mechanism
195# zip uno loader class files and winreg helper library for later
196# use in the build process (e.g. helper tools)
197MYZIPTARGET=$(BIN)/uno_loader_classes.zip
198MYZIPFLAGS=-u -r
199MYZIPDIR=$(DESTDIRJAR)
200MYZIPLIST=com/* win/*
201
202.ENDIF
203
204#--------------------------------------------------
205# TARGETS
206#--------------------------------------------------
207
208.IF "$(L10N_framework)"==""
209
210all : CLEAN_DKVERSION_CHECK \
211	$(DIR_FILE_LIST) \
212	$(DIR_FILE_FLAG) \
213
214.ENDIF
215
216#--------------------------------------------------
217# use global rules
218#--------------------------------------------------
219.INCLUDE: $(PRJ)/util/odk_rules.pmk
220
221
222CLEANUP_DKVERSION_FILE=$(DESTDIRSETTINGS)/dk.mk
223
224
225CLEAN_DKVERSION_CHECK:
226	@@-rm -f $(CLEANUP_DKVERSION_FILE)
227
228$(DESTDIRBIN)/addsym-macosx.sh : addsym-macosx.sh
229	@@-rm -f $@
230	$(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
231	-chmod 755 $@
232
233$(DESTDIRSETTINGS)/dk.mk : dk.mk
234	@@-rm -f $@
235	-$(MKDIRHIER) $(@:d)
236	tr -d "\015" < dk.mk | sed -e 's/@@RELEASE@@/$(PRODUCT_RELEASE)/' -e 's/@@BUILDID@@/$(RSCREVISION)/'> $@
237
238$(CONVERTTAGFLAG) : $(DOCUHTMLFILES)
239#    $(PERL) $(CONVERTTAGSCRIPT) 1 "$(TITLE)" "$(OFFICEPRODUCTNAME)" $(DOCUHTMLFILES)
240    @echo "tags converted" > $@
241
242$(IDL_DOCU_CLEANUP_FLAG) : $(IDL_CHAPTER_REFS) $(PRJ)/docs/common/ref/idl.css $(DESTIDLLIST)
243	@@-$(MY_DELETE_RECURSIVE) $(DESTDIRGENIDLREF)
244	$(TOUCH) $@
245
246$(IDL_DOCU_INDEX_FILE) : $(IDL_DOCU_CLEANUP_FLAG)
247	-$(MKDIRHIER) $(@:d)
248	$(MY_AUTODOC) -html $(DESTDIRGENIDLREF) -dvgroot "http://wiki.services.openoffice.org/wiki" \
249		-name $(IDLDOCREFNAME) -lg idl -dvgfile $(IDL_CHAPTER_REFS) -t $(DESTDIRIDL)
250	-rm $(@:d)/idl.css
251	$(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(PRJ)/docs/common/ref/idl.css $(MY_TEXTCOPY_TARGETPRE) $(@:d:d)/idl.css
252
253
254.IF "$(SOLAR_JAVA)" != ""
255$(MYZIPTARGET) : $(BIN)/unowinreg.dll $(DESTCLASSESLIST)
256    cd $(MYZIPDIR) && zip $(MYZIPFLAGS) ../../../bin/$(MYZIPTARGET:b) $(MYZIPLIST)
257.ENDIF
258