merge the formfield patch from ooo-build
[ooovba.git] / solenv / inc / unitools.mk
blob6166161348e6d1c3e037609f82e2945575a817bd
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
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
56 EES:=
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
62 EMQ:=\\
63 USQ:="
65 NULLDEV:=/dev/null
68 # iz29609 helpmacro to check if file exists
69 .IF "$(USE_SHELL)"=="bash"
70 IFEXIST:=if [ -f
71 IFNOTEXIST:= if ! test -f
72 THEN:= ] ; then
73 FI:= ; fi
74 PIPEERROR=2>&1 |
75 .ELSE
76 IFEXIST:=if ( -e
77 IFNOTEXIST:=if ( ! -e
78 THEN:= )
79 FI:=
80 PIPEERROR=|&
81 .ENDIF
83 # iz31658
84 .IF "$(USE_SHELL)"=="bash"
85 CHECKZIPRESULT:=|| ret=$$?; if [[ "$$ret" != "12" && "$$ret" != "1" ]] ; then exit $$ret ; fi && echo "Nothing to update for zip"
86 .ELSE
87 CHECKZIPRESULT:=|| if ("$$status" != "12" && "$$status" != "1") exit $$status && echo "Nothing to update for zip"
88 .ENDIF
90 # Platform specific
91 .IF "$(GUI)"=="WNT"
92 AWK*=awk
93 SORT*=sort
94 SED*=sed
95 GNUPATCH*=patch
96 # change drive and directory
97 CDD=cd
98 # expect cygwin tools to exist
99 COPY*=cp
100 COPYRECURSE=-r
101 DEREFERENCE=-L
102 COPYUPDATE=-u
103 ECHON=echo -n
104 ECHONL=echo
105 FIND*=find
106 FLIPCMD*=slfl.pl
107 GNUCOPY*=cp
108 GNUMAKE*=make
109 GREP*=grep
110 LS*=ls
111 PERL*:=perl
112 .EXPORT : PERL
113 RENAME*=mv
114 TOUCH*=touch
115 TYPE*=cat
116 DUMPBIN*=dumpbin
118 .ELIF "$(GUI)"=="UNX" # "$(GUI)"=="WNT"
119 SED*=sed
120 SORT*=sort
121 PERL*=perl
122 .EXPORT : PERL
123 TYPE=cat
124 CDD=cd
125 COPY=cp -f
126 .IF "$(OS)"=="MACOSX"
127 COPYRECURSE=-R
128 .ELSE #"$(OS)"=="MACOSX"
129 COPYRECURSE=-r
130 .ENDIF
131 .IF "$(OS)"=="SOLARIS"
132 AWK*=nawk
133 GNUCOPY*=gnucp
134 GNUPATCH*=gnupatch
135 GNUTAR*=/usr/sfw/bin/gtar
136 DEREFERENCE=
137 .ELSE # "$(OS)"=="SOLARIS"
138 AWK*=awk
139 GNUCOPY*=cp
140 GNUPATCH*=patch
141 DEREFERENCE=-L
142 .ENDIF # "$(OS)"=="SOLARIS"
143 .IF "$(OS)"=="LINUX" || "$(OS)"=="MACOSX"
144 GNUMAKE*=make
145 .ELSE # "$(OS)"=="LINUX" || "$(OS)"=="MACOSX"
146 GNUMAKE*=gmake
147 .ENDIF # "$(OS)"=="LINUX" || "$(OS)"=="MACOSX"
148 TOUCH=touch
149 RENAME=mv
150 GREP=grep
151 FIND=find
152 LS=ls
153 ECHON=echo -n
154 ECHONL=echo
155 .ELIF "$(GUI)"=="OS2"
156 SED*=sed
157 SORT*=sort
158 PERL*=perl
159 TYPE=cat
160 CDD=@cd
161 COPY*=$(SHELL) /c copy /b
162 COPYRECURSE=/s
163 COPYUPDATE=/u
164 DELAY=sleep
165 ECHON*=echos
166 ECHONL=+echo.
167 AWK*=awk
168 GNUCOPY*=cp
169 GNUPATCH*=gnupatch
170 GNUMAKE*=make
171 TOUCH=touch /c
172 #YD rename doesn't work across different drives!
173 RENAME=mv
174 MKDIR=+md
175 MKDIRHIER=+md /s
176 GREP=grep
177 FIND=find
178 LS=ls
179 DUMPBIN=echo
180 4nt_force_shell:=+
182 .ENDIF # "$(GUI)"=="UNX"
184 # (Global) Set if not set before
185 DELAY*=sleep
186 MKDIR*=mkdir$E
187 MKDIRHIER*=mkdir$E -p
188 RMDIR*=rmdir
189 XARGS*=xargs
190 GNUTAR*:=tar
191 TAR*:=tar
193 RM+=$(RMFLAGS)
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"
204 PWDFLAGS = -P
205 .ENDIF