xref: /trunk/main/solenv/inc/tg_javav.mk (revision 86e1cf34)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24JAVAVERMK:=$(INCCOM)/java_ver.mk
25
26.INCLUDE .IGNORE : $(JAVAVERMK)
27
28.IF "$(JAVAVER)"=="" || "$(JAVALOCATION)"!="$(JAVA_HOME)"
29.IF "$(L10N_framework)"==""
30
31.IF "$(SOLAR_JAVA)"!=""
32JFLAGSVERSION=-version
33JFLAGSVERSION_CMD=-version $(PIPEERROR) $(AWK) -f $(SOLARENV)/bin/getcompver.awk
34JFLAGSNUMVERSION_CMD=-version $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
35
36# that's the version known by the specific
37# java version
38JAVAVER:=$(shell @-$(JAVA_HOME)/bin/java $(JFLAGSVERSION_CMD))
39
40# and a computed integer for comparing
41# each point separated token blown up to 4 digits
42JAVANUMVER:=$(shell @-$(JAVA_HOME)/bin/java $(JFLAGSNUMVERSION_CMD))
43
44.ELSE          # "$(SOLAR_JAVA)"!=""
45JAVAVER=0.0.0
46JAVANUMVER=000000000000
47.ENDIF          # "$(SOLAR_JAVA)"!=""
48.ENDIF			# "$(L10N_framework)"==""
49.ENDIF			# "$(JAVAVER)"=="" || "$(JAVALOCATION)"!="$(JAVA_HOME)"
50