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: unitools.mk,v $
11 # $Revision: 1.53.30.4 $
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 #*************************************************************************
32 # Common tools - move this to the end / consolidate
33 TRANSEX
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/transex3
34 ULFEX
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/ulfex
35 XMLEX
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/xmlex
36 XRMEX
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/xrmex
37 CFGEX
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/cfgex
38 AUTODOC
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/autodoc
39 LOCALIZE_SL
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/localize_sl
40 GSICHECK
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/gsicheck
42 .IF
"$(SYSTEM_LIBXSLT)"!="YES"
43 XSLTPROC
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/xsltproc
44 .ELSE
# "$(SYSTEM_LIBXSLT)"!="YES"
45 XSLTPROC
*=$(AUGMENT_LIBRARY_PATH
) xsltproc
46 .ENDIF
# "$(SYSTEM_LIBXSLT)"!="YES"
48 ULFCONV
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/ulfconv
50 MAKEDEPEND
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/makedepend
52 SCP_CHECK_TOOL
:=checkscp
$E
54 # iz32110: Calling a cygwin application from a non-cygwin shell requires
55 # backslashes to be escaped by another backslash: EES .. extra escape slash
58 # iz29675: 4nt must not quote special characters, but tcsh has to.
59 # *NIX shells needs to use " quotes, but 4nt must not.
60 # EMQ .. extra meta quote (\\ at line end is \)
61 # USQ .. unix shell quote
68 # iz29609 helpmacro to check if file exists
69 .IF "$(USE_SHELL
)"=="bash
"
71 IFNOTEXIST:= if ! test -f
84 .IF "$(USE_SHELL
)"=="bash
"
85 CHECKZIPRESULT:=|| ret=$$?; if [[ "$$ret" != "12" && "$$ret" != "1" ]] ; then exit $$ret ; fi && echo "Nothing to update for zip
"
87 CHECKZIPRESULT:=|| if ("$$status" != "12" && "$$status" != "1") exit $$status && echo "Nothing to update for zip
"
96 # change drive and directory
98 # expect cygwin tools to exist
118 .ELIF "$(GUI
)"=="UNX
" # "$(GUI
)"=="WNT
"
126 .IF "$(OS
)"=="MACOSX
"
128 .ELSE #"$(OS
)"=="MACOSX
"
131 .IF "$(OS
)"=="SOLARIS
"
135 GNUTAR*=/usr/sfw/bin/gtar
137 .ELSE # "$(OS
)"=="SOLARIS
"
142 .ENDIF # "$(OS
)"=="SOLARIS
"
143 .IF "$(OS
)"=="LINUX
" || "$(OS
)"=="MACOSX
"
145 .ELSE # "$(OS
)"=="LINUX
" || "$(OS
)"=="MACOSX
"
147 .ENDIF # "$(OS
)"=="LINUX
" || "$(OS
)"=="MACOSX
"
155 .ELIF "$(GUI
)"=="OS2
"
161 COPY*=$(SHELL) /c copy /b
172 #YD rename doesn't work across different drives!
182 .ENDIF # "$(GUI
)"=="UNX
"
184 # (Global) Set if not set before
187 MKDIRHIER*=mkdir$E -p
194 ADJUSTVISIBILITY*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/adjustvisibility
195 CONVERT*:=$(PERL) $(SOLARENV)/bin/leconvert.pl
196 EXECTEST := $(PERL) -w $(SOLARENV)/bin/exectest.pl
197 GCCINSTLIB:=$(PERL) -w $(SOLARENV)/bin/gccinstlib.pl
199 # The dmake $(PWD) variable and the tcsh pwd command both apparantly produce
200 # paths with symlinks resolved, while the bash pwd command by default produces
201 # paths with unresolved symlinks, so that computing PATH_IN_MODULE in
202 # settings.mk would fail without the -P flag to the bash pwd command:
203 .IF "$(USE_SHELL
)" == "bash
"