8034191: Move relevant parts of build system to new closed repo
authorihse
Thu, 13 Feb 2014 00:00:20 +0100
changeset 22714 a752920c4317
parent 22713 8c959ab35832
child 22715 8621ef3d6caa
8034191: Move relevant parts of build system to new closed repo Reviewed-by: erikj, tbell
common/autoconf/autogen.sh
common/autoconf/configure
common/autoconf/generated-configure.sh
common/autoconf/jdk-options.m4
common/autoconf/spec.gmk.in
make/Main.gmk
--- a/common/autoconf/autogen.sh	Tue Feb 11 10:44:23 2014 +0100
+++ b/common/autoconf/autogen.sh	Thu Feb 13 00:00:20 2014 +0100
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
 fi
 
 if test "x$CUSTOM_CONFIG_DIR" = "x"; then
-  custom_script_dir="$script_dir/../../jdk/make/closed/autoconf"
+  custom_script_dir="$script_dir/../../closed/autoconf"
 else
   custom_script_dir=$CUSTOM_CONFIG_DIR
 fi
--- a/common/autoconf/configure	Tue Feb 11 10:44:23 2014 +0100
+++ b/common/autoconf/configure	Thu Feb 13 00:00:20 2014 +0100
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@
 conf_script_dir=`dirname $0`
 
 if [ "$CUSTOM_CONFIG_DIR" = "" ]; then
-  conf_custom_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf"
+  conf_custom_script_dir="$conf_script_dir/../../closed/autoconf"
 else
   conf_custom_script_dir=$CUSTOM_CONFIG_DIR
 fi
--- a/common/autoconf/generated-configure.sh	Tue Feb 11 10:44:23 2014 +0100
+++ b/common/autoconf/generated-configure.sh	Thu Feb 13 00:00:20 2014 +0100
@@ -968,7 +968,6 @@
 BASENAME
 DATE_WHEN_CONFIGURED
 CONFIGURE_COMMAND_LINE
-CUSTOM_MAKE_DIR
 target_alias
 host_alias
 build_alias
@@ -1010,12 +1009,12 @@
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
-with_custom_make_dir
 with_target_bits
 with_sys_root
 with_tools_dir
 with_devkit
 enable_openjdk_only
+with_custom_make_dir
 with_jdk_variant
 with_jvm_interpreter
 with_jvm_variants
@@ -1833,7 +1832,6 @@
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-custom-make-dir  use this directory for custom build/make files
   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
                           support it), e.g. --with-target-bits=32 [guessed]
   --with-sys-root         pass this sys-root to the compilers and tools (for
@@ -1842,6 +1840,8 @@
                           cross-compiling)
   --with-devkit           use this directory as base for tools-dir and
                           sys-root (for cross-compiling)
+  --with-custom-make-dir  Deprecated. Option is kept for backwards
+                          compatibility and is ignored
   --with-jdk-variant      JDK variant to build (normal) [normal]
   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
   --with-jvm-variants     JVM variants (separated by commas) to build (server,
@@ -1863,7 +1863,7 @@
   --with-update-version   Set update version value for build [b00]
   --with-user-release-suffix
                           Add a custom string to the version string if build
-                          number isn't set.[username_builddateb00]
+                          number is not set.[username_builddateb00]
   --with-build-number     Set build number value for build [b00]
   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
@@ -3780,7 +3780,7 @@
 
 
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -3831,18 +3831,6 @@
 
 
 
-# Support for customization of the build process. Some build files
-# will include counterparts from this location, if they exist. This allows
-# for a degree of customization of the build targets and the rules/recipes
-# to create them
-
-# Check whether --with-custom-make-dir was given.
-if test "${with_custom_make_dir+set}" = set; then :
-  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
-fi
-
-
-
 #
 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4092,7 +4080,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1392111785
+DATE_WHEN_GENERATED=1392245654
 
 ###############################################################################
 #
@@ -14307,6 +14295,18 @@
 
 
 
+  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
+  # the IncludeCustomExtension macro.
+
+
+# Check whether --with-custom-make-dir was given.
+if test "${with_custom_make_dir+set}" = set; then :
+  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
+fi
+
+
+
 
 # These are needed to be able to create a configuration name (and thus the output directory)
 
--- a/common/autoconf/jdk-options.m4	Tue Feb 11 10:44:23 2014 +0100
+++ b/common/autoconf/jdk-options.m4	Thu Feb 13 00:00:20 2014 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -332,6 +332,10 @@
   fi
 
   AC_SUBST(SET_OPENJDK)
+
+  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
+  # the IncludeCustomExtension macro.
+  BASIC_DEPRECATED_ARG_WITH(custom-make-dir)
 ])
 
 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
@@ -482,7 +486,7 @@
   fi
 
   AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
-      [Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
+      [Add a custom string to the version string if build number is not set.@<:@username_builddateb00@:>@])])
   if test "x$with_user_release_suffix" = xyes; then
     AC_MSG_ERROR([Release suffix must have a value])
   elif test "x$with_user_release_suffix" != x; then
@@ -605,11 +609,3 @@
   AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
   AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
 ])
-
-# Support for customization of the build process. Some build files
-# will include counterparts from this location, if they exist. This allows
-# for a degree of customization of the build targets and the rules/recipes
-# to create them
-AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
-[use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
-AC_SUBST(CUSTOM_MAKE_DIR)
--- a/common/autoconf/spec.gmk.in	Tue Feb 11 10:44:23 2014 +0100
+++ b/common/autoconf/spec.gmk.in	Thu Feb 13 00:00:20 2014 +0100
@@ -147,9 +147,6 @@
 NASHORN_TOPDIR:=@NASHORN_TOPDIR@
 COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
 
-# Location where build customization files may be found
-CUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@
-
 # Information gathered from the version.numbers file.
 JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
 JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
@@ -677,5 +674,14 @@
 JDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
 JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
 
+# This macro is called to allow inclusion of closed source counterparts.
+# Unless overridden in closed sources, it expands to nothing.
+# Usage: This function is called in an open makefile, with the following 
+# arguments:
+# $1 the name of the repo, or empty if the top-level repo.
+# $2 the name of the makefile
+define IncludeCustomExtension
+endef
+
 # Include the custom-spec.gmk file if it exists
 -include $(dir @SPEC@)/custom-spec.gmk
--- a/make/Main.gmk	Tue Feb 11 10:44:23 2014 +0100
+++ b/make/Main.gmk	Thu Feb 13 00:00:20 2014 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -31,8 +31,8 @@
 # Load the vital tools for all the makefiles.
 include $(SRC_ROOT)/make/common/MakeBase.gmk
 
-# Include the corresponding custom file, if present.
--include $(CUSTOM_MAKE_DIR)/Main.gmk
+# Hook to include the corresponding custom file, if present.
+$(eval $(call IncludeCustomExtension, , Main.gmk))
 
 ### Clean up from previous run