merge the formfield patch from ooo-build
[ooovba.git] / solenv / inc / tg_compv.mk
blob5c00ffb74f28497a81e28ca222cabd09e770f546
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: tg_compv.mk,v $
11 # $Revision: 1.22 $
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 COMPVERMK:=$(SOLARINCDIR)/comp_ver.mk
34 .INCLUDE .IGNORE : $(COMPVERMK)
36 .IF "$(COMNAME)"=="" || "$(COMPATH:s!\!/!)"!="$(COMPATH_STORED)"
37 .IF "$(L10N_framework)"==""
39 COMNAME:=
41 .IF "$(COM)"=="GCC"
42 CFLAGSVERSION=-dumpversion
43 CFLAGSVERSION_CMD=-dumpversion
44 CFLAGSNUMVERSION_CMD=-dumpversion $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
45 #CFLAGSNUMVERSION_CMD=-dumpversion | 2>&1 $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
46 .ENDIF
48 .IF "$(COM)"=="MSC"
49 CFLAGSVERSION=
50 CFLAGSVERSION_CMD= $(PIPEERROR) $(AWK) -f $(SOLARENV)/bin/getcompver.awk
51 CFLAGSNUMVERSION_CMD= $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
52 .ENDIF
54 .IF "$(COM)"=="C55" || "$(COM)"=="C54" || "$(COM)"=="C52" || "$(COM)"=="C40" || "$(COM)"=="sunpro"
55 CFLAGSVERSION= -V
56 CFLAGSVERSION_CMD= -V $(PIPEERROR) $(AWK) -f $(SOLARENV)/bin/getcompver.awk
57 CFLAGSNUMVERSION_CMD= -V $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
58 .ENDIF
60 .IF "$(COM)"=="C730"
61 CFLAGSVERSION= -version
62 CFLAGSVERSION_CMD= -version |& cut -d" " -f4-
63 CFLAGSNUMVERSION_CMD= -version |& cut -d" " -f4-
64 .ENDIF
66 # that's the version known by the specific
67 # compiler
68 CCVER:=$(shell @-$(CXX) $(CFLAGSVERSION_CMD))
70 # and a computed integer for comparing
71 # each point seperated token blown up to 4 digits
72 CCNUMVER:=$(shell @-$(CXX) $(CFLAGSNUMVERSION_CMD))
74 .IF "$(COM)"=="MSC"
75 .IF "$(CCNUMVER)">="001200000000"
76 COMID=MSC
77 COMNAME=msci
78 .ENDIF
79 .ENDIF
81 .IF "$(COM)"=="GCC"
83 SHORTSTDCPP3:=
85 .IF "$(CCNUMVER)">="000200910000"
86 COMID=GCC
87 COMNAME=gcc2
88 .ENDIF
90 .IF "$(CCNUMVER)">="000300000001"
92 COMID=gcc3
93 COMNAME=gcc3
95 .IF "$(CCNUMVER)">="000300000001"
96 SHORTSTDCPP3="3"
97 .ENDIF
99 .IF "$(CCNUMVER)">="000300010000"
100 SHORTSTDCPP3="4"
101 .ENDIF
103 .IF "$(CCNUMVER)">="000300020000"
104 SHORTSTDCPP3="5"
105 .ENDIF
107 .IF "$(CCNUMVER)">="000300040000"
108 SHORTSTDCPP3="6"
109 .ENDIF
111 .ENDIF
112 .ENDIF
114 .IF "$(COM)"=="C55" || "$(COM)" == "C54" || "$(COM)"=="C52" || "$(COM)"=="C40" || "$(COM)"=="sunpro"
115 .IF "$(CCNUMVER)">="00050002"
116 COMID=C52
117 COMNAME=sunpro5
118 .ENDIF
119 .ENDIF
121 .IF "$(COM)"=="C730"
122 COMID=C730
123 COMNAME=MipsPro
124 .ENDIF
126 .IF "$(COMNAME)"==""
128 # "EXCEPTIONSFILES" get compiled before this, but shouldn't
129 # appear in the first n modules.
131 compiler_version_error:
132 @echo ++++++++++++++++++++++++++++++++++++
133 @echo ERROR!
134 @echo Could not detect compiler version!
135 @echo Please extend tg_compv.mk in
136 @echo "solenv/inc".
137 @echo ++++++++++++++++++++++++++++++++++++
138 @echo "$(CXX) $(CFLAGSVERSION)" returns
139 @$(CXX) $(CFLAGSVERSION)
140 @echo ++++++++++++++++++++++++++++++++++++
141 force_dmake_to_error
143 .ENDIF # "$(COMNAME)"==""
145 CDEFS+=-DCPPU_ENV=$(COMNAME)
147 .ENDIF # "$(L10N_framework)"==""
148 .ENDIF # "$(COMNAME)"==""