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: tg_compv.mk,v $
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)"==""
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
50 CFLAGSVERSION_CMD
= $(PIPEERROR
) $(AWK
) -f
$(SOLARENV
)/bin
/getcompver.awk
51 CFLAGSNUMVERSION_CMD
= $(PIPEERROR
) $(AWK
) -v num
=true
-f
$(SOLARENV
)/bin
/getcompver.awk
54 .IF
"$(COM)"=="C55" ||
"$(COM)"=="C54" ||
"$(COM)"=="C52" ||
"$(COM)"=="C40" ||
"$(COM)"=="sunpro"
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
61 CFLAGSVERSION
= -version
62 CFLAGSVERSION_CMD
= -version |
& cut
-d
" " -f4-
63 CFLAGSNUMVERSION_CMD
= -version |
& cut
-d
" " -f4-
66 # that's the version known by the specific
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
))
75 .IF
"$(CCNUMVER)">="001200000000"
85 .IF
"$(CCNUMVER)">="000200910000"
90 .IF
"$(CCNUMVER)">="000300000001"
95 .IF
"$(CCNUMVER)">="000300000001"
99 .IF
"$(CCNUMVER)">="000300010000"
103 .IF
"$(CCNUMVER)">="000300020000"
107 .IF
"$(CCNUMVER)">="000300040000"
114 .IF
"$(COM)"=="C55" ||
"$(COM)" == "C54" ||
"$(COM)"=="C52" ||
"$(COM)"=="C40" ||
"$(COM)"=="sunpro"
115 .IF
"$(CCNUMVER)">="00050002"
128 # "EXCEPTIONSFILES" get compiled before this, but shouldn't
129 # appear in the first n modules.
131 compiler_version_error
:
132 @echo
++++++++++++++++++++++++++++++++++++
134 @echo Could not detect compiler version
!
135 @echo Please extend tg_compv.mk in
137 @echo
++++++++++++++++++++++++++++++++++++
138 @echo
"$(CXX) $(CFLAGSVERSION)" returns
139 @
$(CXX
) $(CFLAGSVERSION
)
140 @echo
++++++++++++++++++++++++++++++++++++
143 .ENDIF
# "$(COMNAME)"==""
145 CDEFS
+=-DCPPU_ENV
=$(COMNAME
)
147 .ENDIF
# "$(L10N_framework)"==""
148 .ENDIF
# "$(COMNAME)"==""