2000-10-29 23:00:05 -06:00
|
|
|
#*************************************************************************
|
|
|
|
#
|
2008-04-10 11:44:42 -05:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# Copyright 2008 by Sun Microsystems, Inc.
|
2000-10-29 23:00:05 -06:00
|
|
|
#
|
2008-04-10 11:44:42 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2000-10-29 23:00:05 -06:00
|
|
|
#
|
2008-04-10 11:44:42 -05:00
|
|
|
# $RCSfile: unitools.mk,v $
|
2000-10-29 23:00:05 -06:00
|
|
|
#
|
2008-07-22 10:52:23 -05:00
|
|
|
# $Revision: 1.59 $
|
2000-10-29 23:00:05 -06:00
|
|
|
#
|
2008-04-10 11:44:42 -05:00
|
|
|
# This file is part of OpenOffice.org.
|
2000-10-29 23:00:05 -06:00
|
|
|
#
|
2008-04-10 11:44:42 -05:00
|
|
|
# OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
# only, as published by the Free Software Foundation.
|
2000-10-29 23:00:05 -06:00
|
|
|
#
|
2008-04-10 11:44:42 -05:00
|
|
|
# OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License version 3 for more details
|
|
|
|
# (a copy is included in the LICENSE file that accompanied this code).
|
2000-10-29 23:00:05 -06:00
|
|
|
#
|
2008-04-10 11:44:42 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# version 3 along with OpenOffice.org. If not, see
|
|
|
|
# <http://www.openoffice.org/license.html>
|
|
|
|
# for a copy of the LGPLv3 License.
|
2000-10-29 23:00:05 -06:00
|
|
|
#
|
|
|
|
#*************************************************************************
|
2005-03-18 03:15:12 -06:00
|
|
|
|
2008-03-05 09:34:39 -06:00
|
|
|
# Common tools - move this to the end / consolidate
|
2009-06-16 13:11:49 -05:00
|
|
|
TRANSEX*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/transex3
|
|
|
|
ULFEX*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/ulfex
|
|
|
|
XMLEX*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/xmlex
|
|
|
|
XRMEX*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/xrmex
|
|
|
|
CFGEX*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/cfgex
|
|
|
|
|
|
|
|
.IF "$(SYSTEM_LIBXSLT)"!="YES"
|
|
|
|
XSLTPROC*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/xsltproc
|
|
|
|
.ELSE # "$(SYSTEM_LIBXSLT)"!="YES"
|
2009-02-23 07:23:11 -06:00
|
|
|
XSLTPROC*=$(AUGMENT_LIBRARY_PATH) xsltproc
|
2009-06-16 13:11:49 -05:00
|
|
|
.ENDIF # "$(SYSTEM_LIBXSLT)"!="YES"
|
2004-09-08 08:59:14 -05:00
|
|
|
|
2009-06-16 13:11:49 -05:00
|
|
|
ULFCONV*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/ulfconv
|
2004-10-18 07:56:17 -05:00
|
|
|
|
2009-02-19 05:42:47 -06:00
|
|
|
MAKEDEPEND*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/makedepend
|
2005-03-18 03:15:12 -06:00
|
|
|
|
|
|
|
SCP_CHECK_TOOL:=checkscp$E
|
|
|
|
|
2004-09-09 05:19:31 -05:00
|
|
|
# Not 4nt means $(GUI)==UNX or $(GUI)==WNT with tcsh
|
|
|
|
.IF "$(USE_SHELL)"!="4nt"
|
|
|
|
# iz32110: Calling a cygwin application from a non-cygwin shell requires
|
|
|
|
# backslashes to be escaped by another backslash: EES .. extra escape slash
|
2005-03-18 03:15:12 -06:00
|
|
|
EES:=
|
|
|
|
|
|
|
|
# iz29675: 4nt must not quote special characters, but tcsh has to.
|
|
|
|
# *NIX shells needs to use " quotes, but 4nt must not.
|
|
|
|
# EMQ .. extra meta quote (\\ at line end is \)
|
|
|
|
# USQ .. unix shell quote
|
|
|
|
EMQ:=\\
|
|
|
|
USQ:="
|
|
|
|
|
|
|
|
NULLDEV:=/dev/null
|
|
|
|
|
2006-07-05 15:59:58 -05:00
|
|
|
# iz29609 helpmacro to check if file exists
|
|
|
|
.IF "$(USE_SHELL)"=="bash"
|
2007-11-21 11:50:29 -06:00
|
|
|
IFEXIST:=if test -e
|
2006-07-05 15:59:58 -05:00
|
|
|
THEN:= ; then
|
|
|
|
FI:= ; fi
|
|
|
|
PIPEERROR=2>&1 |
|
|
|
|
.ELSE
|
2005-03-18 03:15:12 -06:00
|
|
|
IFEXIST:=if ( -e
|
|
|
|
THEN:= )
|
2006-07-05 15:59:58 -05:00
|
|
|
FI:=
|
|
|
|
PIPEERROR=|&
|
|
|
|
.ENDIF
|
2005-03-18 03:15:12 -06:00
|
|
|
|
|
|
|
# iz31658
|
2006-07-05 15:59:58 -05:00
|
|
|
.IF "$(USE_SHELL)"=="bash"
|
2009-05-28 11:03:55 -05:00
|
|
|
CHECKZIPRESULT:=|| ret=$$?; if [[ "$$ret" != "12" && "$$ret" != "1" ]] ; then exit $$ret ; fi && echo "Nothing to update for zip"
|
2006-07-05 15:59:58 -05:00
|
|
|
.ELSE
|
2005-09-07 10:09:47 -05:00
|
|
|
CHECKZIPRESULT:=|| if ("$$status" != "12" && "$$status" != "1") exit $$status && echo "Nothing to update for zip"
|
2006-07-05 15:59:58 -05:00
|
|
|
.ENDIF
|
2005-03-18 03:15:12 -06:00
|
|
|
|
|
|
|
.ELSE # "$(USE_SHELL)"!="4nt"
|
|
|
|
# (\\ at line end is \)
|
|
|
|
EES:=\\
|
|
|
|
|
|
|
|
EMQ:=
|
|
|
|
USQ:=
|
2004-09-09 05:19:31 -05:00
|
|
|
|
2005-03-18 03:15:12 -06:00
|
|
|
NULLDEV:=nul
|
|
|
|
|
|
|
|
# iz29609 helpmacro to check if file exists 4nt style
|
2007-01-25 05:58:19 -06:00
|
|
|
IFEXIST:=+if exist
|
2005-03-18 03:15:12 -06:00
|
|
|
THEN:=
|
2006-07-05 15:59:58 -05:00
|
|
|
FI:=
|
|
|
|
PIPEERROR=|&
|
2005-03-18 03:15:12 -06:00
|
|
|
|
|
|
|
# iz31658
|
2005-09-07 10:09:47 -05:00
|
|
|
CHECKZIPRESULT:=^ iff errorlevel == 12 .and. errorlevel == 12 then ( echo Nothing to update for zip ^ set somedummyvar=%somedummyvar)
|
2005-03-18 03:15:12 -06:00
|
|
|
|
2007-01-25 05:58:19 -06:00
|
|
|
# try the same for 4nt "copy /u"
|
|
|
|
CHECKCOPYURESULT:=^ iff errorlevel == 2 then ( echo Nothing to update for copy ^ set somedummyvar=%somedummyvar)
|
|
|
|
|
2006-09-22 02:55:59 -05:00
|
|
|
# tell makedepend to write windows native format
|
2009-03-24 07:17:31 -05:00
|
|
|
#MKDEPFLAGS=-n
|
2006-09-22 02:55:59 -05:00
|
|
|
|
2005-03-18 03:15:12 -06:00
|
|
|
.ENDIF # "$(USE_SHELL)"!="4nt"
|
|
|
|
|
|
|
|
# Platform specific
|
2003-04-01 06:34:43 -06:00
|
|
|
.IF "$(GUI)"=="WNT"
|
2000-10-11 09:01:18 -05:00
|
|
|
AWK*=awk
|
2001-11-15 09:11:34 -06:00
|
|
|
SORT*=sort
|
2000-09-20 08:43:26 -05:00
|
|
|
SED*=sed
|
2009-03-16 04:15:41 -05:00
|
|
|
GNUPATCH*=patch
|
2002-03-19 11:11:17 -06:00
|
|
|
.IF "$(USE_SHELL)"!="4nt"
|
2004-07-13 10:30:07 -05:00
|
|
|
# change drive and directory
|
2004-07-16 07:14:42 -05:00
|
|
|
CDD=cd
|
2002-03-14 05:46:17 -06:00
|
|
|
# expect cygwin tools to exist
|
|
|
|
COPY*=cp
|
|
|
|
COPYRECURSE=-r
|
|
|
|
COPYUPDATE=-u
|
|
|
|
ECHON=echo -n
|
|
|
|
ECHONL=echo
|
|
|
|
FIND*=find
|
2009-03-24 07:17:31 -05:00
|
|
|
FLIPCMD*=slfl.pl
|
2002-03-14 05:46:17 -06:00
|
|
|
GNUCOPY*=cp
|
|
|
|
GNUMAKE*=make
|
|
|
|
GREP*=grep
|
|
|
|
LS*=ls
|
|
|
|
PERL*:=perl
|
2007-06-07 04:27:53 -05:00
|
|
|
.EXPORT : PERL
|
2002-03-14 05:46:17 -06:00
|
|
|
RENAME*=mv
|
|
|
|
TOUCH*=touch
|
|
|
|
TYPE*=cat
|
2003-04-01 06:34:43 -06:00
|
|
|
.ELSE # "$(USE_SHELL)"!="4nt"
|
2007-01-25 05:58:19 -06:00
|
|
|
CDD=+cdd
|
|
|
|
COPY*=+copy
|
2001-06-22 10:06:10 -05:00
|
|
|
COPYRECURSE=/s
|
2002-03-14 05:46:17 -06:00
|
|
|
COPYUPDATE=/u
|
2008-03-05 09:34:39 -06:00
|
|
|
DELAY*=+delay
|
2007-01-25 05:58:19 -06:00
|
|
|
ECHON*=+echos
|
|
|
|
ECHONL=+echo.
|
2000-10-11 09:01:18 -05:00
|
|
|
FIND*=$(BUILD_TOOLS)$/find.exe
|
2004-03-29 03:47:56 -06:00
|
|
|
.IF "$(use_cygcp)"!=""
|
2004-03-02 04:33:23 -06:00
|
|
|
GNUCOPY=$(BUILD_TOOLS)$/gnucp.exe
|
2004-03-29 03:47:56 -06:00
|
|
|
.ENDIF # "$(use_cygcp)"!=""
|
2000-10-11 09:01:18 -05:00
|
|
|
GNUCOPY*=$(BUILD_TOOLS)$/cp.exe
|
2006-03-31 03:58:13 -06:00
|
|
|
GNUMAKE*=$(BUILD_TOOLS)$/gnumake.exe
|
|
|
|
GREP*=$(BUILD_TOOLS)$/grep.exe
|
2002-03-14 05:46:17 -06:00
|
|
|
LS*=$(BUILD_TOOLS)$/ls.exe
|
2009-03-24 07:17:31 -05:00
|
|
|
MKDIRHIER=+mkdir /sn
|
2000-10-10 11:57:58 -05:00
|
|
|
#wraper for solenv\bin\mkdir.pl to fix mkdir /p problem
|
2007-01-25 05:58:19 -06:00
|
|
|
PERL*:=+call perl5.btm
|
2007-06-07 04:27:53 -05:00
|
|
|
.EXPORT : PERL
|
2007-01-25 05:58:19 -06:00
|
|
|
RENAME*=+ren
|
2008-07-11 08:11:38 -05:00
|
|
|
RMDIR:=$(PERL) $(SOLARENV)$/bin$/rmdir.pl
|
2007-02-06 07:02:20 -06:00
|
|
|
TOUCH*=$(PERL) $(SOLARENV)$/bin$/touch.pl
|
2007-01-25 05:58:19 -06:00
|
|
|
TYPE*=+type
|
2008-03-05 09:34:39 -06:00
|
|
|
XARGS*=tr -d "\015" | xargs
|
2007-01-25 05:58:19 -06:00
|
|
|
4nt_force_shell:=+
|
2003-04-01 06:34:43 -06:00
|
|
|
.ENDIF "$(USE_SHELL)"!="4nt"
|
2008-03-05 09:34:39 -06:00
|
|
|
DUMPBIN*=dumpbin
|
2001-04-06 08:27:08 -05:00
|
|
|
|
2003-04-01 06:34:43 -06:00
|
|
|
.ELIF "$(GUI)"=="UNX" # "$(GUI)"=="WNT"
|
2000-09-20 08:43:26 -05:00
|
|
|
SED*=sed
|
2001-11-15 09:11:34 -06:00
|
|
|
SORT*=sort
|
2005-03-18 09:40:05 -06:00
|
|
|
PERL*=perl
|
2007-06-07 04:27:53 -05:00
|
|
|
.EXPORT : PERL
|
2000-09-20 08:43:26 -05:00
|
|
|
TYPE=cat
|
2004-07-13 10:30:07 -05:00
|
|
|
CDD=cd
|
2000-09-20 08:43:26 -05:00
|
|
|
COPY=cp -f
|
2001-06-22 10:06:10 -05:00
|
|
|
COPYRECURSE=-r
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(OS)"=="SOLARIS"
|
2003-06-04 04:40:46 -05:00
|
|
|
AWK*=nawk
|
2003-07-16 12:21:03 -05:00
|
|
|
GNUCOPY*=gnucp
|
|
|
|
GNUPATCH*=gnupatch
|
2009-04-23 10:52:08 -05:00
|
|
|
GNUTAR*=gtar
|
2000-09-20 08:43:26 -05:00
|
|
|
.ELSE # "$(OS)"=="SOLARIS"
|
2003-06-04 04:40:46 -05:00
|
|
|
AWK*=awk
|
2003-12-17 11:07:06 -06:00
|
|
|
GNUCOPY*=cp
|
|
|
|
GNUPATCH*=patch
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(OS)"=="SOLARIS"
|
2002-06-07 08:01:43 -05:00
|
|
|
.IF "$(OS)"=="LINUX" || "$(OS)"=="MACOSX"
|
2002-11-04 11:10:43 -06:00
|
|
|
GNUMAKE*=make
|
2002-06-07 08:01:43 -05:00
|
|
|
.ELSE # "$(OS)"=="LINUX" || "$(OS)"=="MACOSX"
|
2002-11-04 11:10:43 -06:00
|
|
|
GNUMAKE*=gmake
|
2002-06-07 08:01:43 -05:00
|
|
|
.ENDIF # "$(OS)"=="LINUX" || "$(OS)"=="MACOSX"
|
2000-09-20 08:43:26 -05:00
|
|
|
TOUCH=touch
|
|
|
|
RENAME=mv
|
|
|
|
GREP=grep
|
|
|
|
FIND=find
|
|
|
|
LS=ls
|
|
|
|
ECHON=echo -n
|
2002-03-14 05:46:17 -06:00
|
|
|
ECHONL=echo
|
2008-07-22 10:52:23 -05:00
|
|
|
.ELIF "$(GUI)"=="OS2"
|
|
|
|
SED*=sed
|
|
|
|
SORT*=sort
|
|
|
|
PERL*=perl
|
|
|
|
TYPE=cat
|
|
|
|
CDD=@cd
|
2008-12-09 02:43:20 -06:00
|
|
|
COPY*=$(SHELL) /c copy /b
|
2008-07-22 10:52:23 -05:00
|
|
|
COPYRECURSE=/s
|
|
|
|
COPYUPDATE=/u
|
|
|
|
DELAY=sleep
|
|
|
|
ECHON*=echos
|
|
|
|
ECHONL=+echo.
|
|
|
|
AWK*=awk
|
|
|
|
GNUCOPY*=cp
|
|
|
|
GNUPATCH*=gnupatch
|
|
|
|
GNUMAKE*=make
|
|
|
|
TOUCH=touch /c
|
|
|
|
#YD rename doesn't work across different drives!
|
|
|
|
RENAME=mv
|
|
|
|
MKDIR=+md
|
|
|
|
MKDIRHIER=+md /s
|
|
|
|
GREP=grep
|
|
|
|
FIND=find
|
|
|
|
LS=ls
|
|
|
|
DUMPBIN=echo
|
|
|
|
4nt_force_shell:=+
|
2003-04-01 06:34:43 -06:00
|
|
|
.ENDIF # "$(GUI)"=="UNX"
|
2000-09-20 08:43:26 -05:00
|
|
|
|
2008-03-05 09:34:39 -06:00
|
|
|
# (Global) Set if not set before
|
|
|
|
DELAY*=sleep
|
|
|
|
MKDIR*=mkdir$E
|
|
|
|
MKDIRHIER*=mkdir$E -p
|
2008-07-11 08:11:38 -05:00
|
|
|
RMDIR*=rmdir
|
2008-03-05 09:34:39 -06:00
|
|
|
XARGS*=xargs
|
2009-04-23 10:52:08 -05:00
|
|
|
GNUTAR*:=tar
|
|
|
|
TAR*:=tar
|
2008-03-05 09:34:39 -06:00
|
|
|
|
2000-09-20 08:43:26 -05:00
|
|
|
RM+=$(RMFLAGS)
|
2009-06-16 13:11:49 -05:00
|
|
|
ADJUSTVISIBILITY*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/adjustvisibility
|
2005-08-18 06:04:35 -05:00
|
|
|
CONVERT*:=$(PERL) $(SOLARENV)$/bin$/leconvert.pl
|
2006-01-26 10:44:06 -06:00
|
|
|
EXECTEST := $(PERL) -w $(SOLARENV)$/bin$/exectest.pl
|
2006-08-28 09:43:23 -05:00
|
|
|
GCCINSTLIB:=$(PERL) -w $(SOLARENV)$/bin$/gccinstlib.pl
|
2008-10-06 08:36:44 -05:00
|
|
|
|
|
|
|
# The dmake $(PWD) variable and the tcsh pwd command both apparantly produce
|
|
|
|
# paths with symlinks resolved, while the bash pwd command by default produces
|
|
|
|
# paths with unresolved symlinks, so that computing PATH_IN_MODULE in
|
|
|
|
# settings.mk would fail without the -P flag to the bash pwd command:
|
|
|
|
.IF "$(USE_SHELL)" == "bash"
|
|
|
|
PWDFLAGS = -P
|
|
|
|
.ENDIF
|