No subst in macos version flags ihse-cflags-rewrite-branch
authorihse
Mon, 26 Feb 2018 10:47:52 +0100
branchihse-cflags-rewrite-branch
changeset 56171 e97310213377
parent 56170 d509ae946997
child 56172 e18d3ca0f32f
No subst in macos version flags
make/autoconf/flags.m4
--- a/make/autoconf/flags.m4	Mon Feb 26 10:19:03 2018 +0100
+++ b/make/autoconf/flags.m4	Mon Feb 26 10:47:52 2018 +0100
@@ -347,6 +347,8 @@
     # exposure to API changes in header files. Bumping this is likely to
     # require code changes to build.
     MACOSX_VERSION_MIN=10.7.0
+    MACOSX_VERSION_MIN_NODOTS=1070
+
     AC_SUBST(MACOSX_VERSION_MIN)
 
     # Setting --with-macosx-version-max=<version> makes it an error to build or
@@ -368,6 +370,8 @@
         ],
         [MACOSX_VERSION_MAX=]
     )
+    MACOSX_VERSION_MAX_NODOTS=`$ECHO $MACOSX_VERSION_MAX | $TR -d .`
+
     AC_SUBST(MACOSX_VERSION_MAX)
   fi
 
@@ -613,14 +617,12 @@
 
   # Additional macosx handling
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    # Let the flags variables get resolved in make for easier override on make
-    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
-    OS_CFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
-        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    OS_CFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
+        -mmacosx-version-min=$MACOSX_VERSION_MIN"
 
     if test -n "$MACOSX_VERSION_MAX"; then
         OS_CFLAGS="$OS_CFLAGS \
-            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=$MACOSX_VERSION_MAX_NODOTS"
     fi
   fi