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