diff --git a/README b/README index d774ab80b70466958efc3ae02347b54eb84fc1b5..fec16f9520d4f0967157f4b7bc12df138fd24199 100644 --- a/README +++ b/README @@ -9,25 +9,20 @@ Simple Build Instructions: http://java.sun.com/javase/downloads/index.jsp Set the environment variable ALT_BOOTDIR to the location of this JDK 6. - 2. Download and install the Binary Plugs for the most recent JDK7 from - http://download.java.net/openjdk/jdk7/ - Set the environment variable ALT_BINARY_PLUGS_PATH to the location of - these binary plugs. - - 3. Either download and install the latest JDK7 from + 2. Either download and install the latest JDK7 from http://download.java.net/openjdk/jdk7/, or build your own complete OpenJDK7 by using the top level Makefile in the OpenJDK Mercurial forest. Set the environment variable ALT_JDK_IMPORT_PATH to the location of this latest JDK7 or OpenJDK7 build. - 4. Check the sanity of doing a build with the current machine: + 3. Check the sanity of doing a build with the current machine: cd make && gnumake sanity See README-builds.html if you run into problems. - 5. Do a partial build of the jdk: + 4. Do a partial build of the jdk: cd make && gnumake all - 6. Construct the images: + 5. Construct the images: cd make && gnumake images The resulting JDK image should be found in build/*/j2sdk-image diff --git a/make/Makefile b/make/Makefile index 9ec690639a90405ec9d5eb9cdffb1ce90db361c6..36bf631d5b807b6431bccc7e25c61cd0befb4b61 100644 --- a/make/Makefile +++ b/make/Makefile @@ -100,7 +100,6 @@ CACERTS_FILE.desc = Location of certificates file DEVTOOLS_PATH.desc = Directory containing zip and unzip CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files DXSDK_PATH.desc = Root directory of DirectX SDK -MSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe) MSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll # Make variables to print out (description and value) @@ -135,12 +134,10 @@ ifeq ($(PLATFORM), windows) VARIABLE_PRINTVAL_LIST += \ DXSDK_PATH \ - MSDEVTOOLS_PATH \ MSVCRT_DLL_PATH VARIABLE_CHECKDIR_LIST += \ DXSDK_PATH \ - MSDEVTOOLS_PATH \ MSVCRT_DLL_PATH endif @@ -324,11 +321,6 @@ else $(ECHO) "Rule $@ does not apply on $(PLATFORM)-$(ARCH)" endif -# -# Binary Plug rules and macros -# -include $(BUILDDIR)/common/internal/BinaryPlugs.gmk - # # Test rule # diff --git a/make/com/sun/jmx/Makefile b/make/com/sun/jmx/Makefile index aefb1e7ec51e24b764c100ec41b6344c8a826c42..cc3393cbdf7c612d7b404b8449b62fa389ba5b67 100644 --- a/make/com/sun/jmx/Makefile +++ b/make/com/sun/jmx/Makefile @@ -42,12 +42,8 @@ include $(BUILDDIR)/common/Defs.gmk # within common included gmk files : that is why the following for loop # has been duplicated. -# When building the openjdk, build snmp only if importing binary plugs, -ifdef OPENJDK - ifeq ($(IMPORT_BINARY_PLUGS),true) - SUBDIRS = snmp - endif -else +# When building the openjdk, no snmp +ifndef OPENJDK SUBDIRS = snmp endif diff --git a/make/common/Defs.gmk b/make/common/Defs.gmk index 194986cb77e59e90d44d249ac7fda01fd9eeb018..278ffaf7ce7c03b447ad2761fe5a84232f7ceab0 100644 --- a/make/common/Defs.gmk +++ b/make/common/Defs.gmk @@ -109,83 +109,6 @@ else endif endif -# If OPENJDK is defined, we may still need to use some native libraries that -# exist only as part of the closed source. If the closed sources are not -# available, the libraries must have been pre-built. Since these libraries -# and the JDK internal interfaces to these are reasonably stable this is not -# a significant problem. But we do need to provide a way to locate them, -# including a way to point to a new one when there have been changes. -# -# If you have a formal binary plugs download, set ALT_BINARY_PLUGS_PATH -# to the location. -# (Optionally you can set ALT_CLOSED_JDK_IMPORT_PATH to point to the latest -# build JDK, or last promotion for this JDK version, but will not work -# on windows). -# -# As the OPENJDK is built, the binary plugs are used instead of building the -# libraries. -# Individual Makefiles that specify USE_BINARY_PLUG_LIBRARY, will get -# the binary plug copy (or a copy from a built JDK). -# -# See common/internal/BinaryPlugs.gmk for more information. -# -# Usage notes: -# -# ALT_BINARY_PLUGS_JARFILE is probably rarely needed. It can be used -# to identify the exact jar file to be used for all closed classes.. -# -# ALT_BINARY_PLUGS_PATH points to a directory containing precisely the -# binaries needed to build. -# -# ALT_BUILD_BINARY_PLUGS_PATH points to a directory containing binary plug dirs -# multiple architectures named using the standard conventions -# This is useful for build scripts that need to build multiple architectures -# of the OpenJDK. -# -# ALT_CLOSED_JDK_IMPORT_PATH points to the top-level of a specific platform -# JDK image. -# -# The precedence is that -# 1. ALT_BINARY_PLUGS_JARFILE overrides any other location of the classes -# 2. ALT_BINARY_PLUGS_PATH overrides all locations of classes and libraries -# 3. ALT_BUILD_BINARY_PLUGS_PATH is used to find a ALT_BINARY_PLUGS_PATH -# 4. ALT_CLOSED_JDK_IMPORT_PATH is used to locate classes and libraries -# Note: If any of the ALT_ variables are modified here, it is assumed -# that the build should be done with IMPORT_BINARY_PLUGS=true as -# well. Otherwise the default will be IMPORT_BINARY_PLUGS=false. -# Lastly, setting IMPORT_BINARY_PLUGS=false on the command line -# will override this logic, and plugs will not be imported. -# - -# Always needed, defines the name of the imported/exported jarfile -BINARY_PLUGS_JARNAME = rt-closed.jar - -ifdef OPENJDK - ifdef ALT_CLOSED_JDK_IMPORT_PATH - CLOSED_JDK_IMPORT_PATH = $(ALT_CLOSED_JDK_IMPORT_PATH) - BINARY_PLUGS_PATH = $(CLOSED_JDK_IMPORT_PATH) - BINARY_PLUGS_JARFILE = $(CLOSED_JDK_IMPORT_PATH)/jre/lib/rt.jar - IMPORT_BINARY_PLUGS=true - endif - ifdef ALT_BUILD_BINARY_PLUGS_PATH - BUILD_BINARY_PLUGS_PATH = $(ALT_BUILD_BINARY_PLUGS_PATH) - IMPORT_BINARY_PLUGS=true - else - BUILD_BINARY_PLUGS_PATH = $(SLASH_JAVA)/re/jdk/$(JDK_VERSION)/promoted/latest/openjdk/binaryplugs - endif - BINARY_PLUGS_PATH = $(BUILD_BINARY_PLUGS_PATH)/$(PLATFORM)-$(ARCH) - BINARY_PLUGS_JARFILE = $(BINARY_PLUGS_PATH)/jre/lib/$(BINARY_PLUGS_JARNAME) - ifdef ALT_BINARY_PLUGS_PATH - BINARY_PLUGS_PATH = $(ALT_BINARY_PLUGS_PATH) - BINARY_PLUGS_JARFILE = $(BINARY_PLUGS_PATH)/jre/lib/$(BINARY_PLUGS_JARNAME) - IMPORT_BINARY_PLUGS=true - endif - ifdef ALT_BINARY_PLUGS_JARFILE - BINARY_PLUGS_JARFILE = $(ALT_BINARY_PLUGS_JARFILE) - IMPORT_BINARY_PLUGS=true - endif -endif # OPENJDK - # # Get platform definitions # @@ -289,17 +212,6 @@ endif # PROGRAM LDLIBS_COMMON += $(EXTRA_LIBS) -# -# Default is to build, not import native binaries -# -ifndef IMPORT_NATIVE_BINARIES - IMPORT_NATIVE_BINARIES=false -endif -# If importing libraries in, no incremental builds -ifeq ($(IMPORT_NATIVE_BINARIES),true) - INCREMENTAL_BUILD=false -endif - # for generated libraries LIBDIR = $(OUTPUTDIR)/lib ABS_LIBDIR = $(ABS_OUTPUTDIR)/lib diff --git a/make/common/Library.gmk b/make/common/Library.gmk index 1278e526c93da18833772cbc2dabef78c99dc01c..2094ab79b73088127a2c5f53b25551c4a6322a1d 100644 --- a/make/common/Library.gmk +++ b/make/common/Library.gmk @@ -77,26 +77,6 @@ else LINKER=$(LINK.c) endif -# FIXUP: unpack needs the zip .o files. So we must build zip? -# or fix unpack makefile so it uses Program.gmk. -ifneq ($(IMPORT_NATIVE_BINARIES),true) - COMPILE_IT=true -else - ifeq ($(LIBRARY),zip) - COMPILE_IT=true - else - COMPILE_IT=false - endif -endif - -# If a Makefile has specified a pre-compiled closed src lib, just copy it. -ifdef USE_BINARY_PLUG_LIBRARY - COMPILE_IT=false -endif - -# We either need to import (copy) libraries in, or build them -ifeq ($(COMPILE_IT),true) - $(ACTUAL_LIBRARY):: $(INIT) $(TEMPDIR) $(LIBDIR) $(BINDIR) $(EXTDIR) classheaders # @@ -275,31 +255,6 @@ lint.errors : $(FILES_ln) $(LINT.c) $(FILES_ln) $(LDLIBS) endif -else # COMPILE_IT - -# OpenJDK rule is first so any lib is preferentially copied from that location. -ifndef USE_BINARY_PLUG_LIBRARY - -# In this case we are just copying the file. -ifneq ($(LIBRARY), fdlibm) -# Copies in the file from the JDK_IMPORT_PATH area -$(ACTUAL_LIBRARY_DIR)/%: $(JDK_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/% - $(install-import-file) -$(ACTUAL_LIBRARY_DIR)/%: $(JDK_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/native_threads/% - $(install-import-file) -$(ACTUAL_LIBRARY_DIR)/%: $(JDK_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/headless/% - $(install-import-file) -$(ACTUAL_LIBRARY_DIR)/%: $(JDK_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/xawt/% - $(install-import-file) -else # fdlibm -$(ACTUAL_LIBRARY_DIR)/%: - $(prep-target) -endif # fdlibm - -endif # USE_BINARY_PLUG_LIBRARY - -endif # COMPILE_IT - # # Class libraries with JNI native methods get a include to the package. # diff --git a/make/common/Program.gmk b/make/common/Program.gmk index b6eb8662f32dc9622d792730d437672e2d012e31..edac78ddf7af8f4de0c9c7902d2c8c8c05b18e69 100644 --- a/make/common/Program.gmk +++ b/make/common/Program.gmk @@ -105,15 +105,6 @@ endif FILES_o = \ $(OBJDIR)/main.$(OBJECT_SUFFIX) -# We either need to import (copy) binaries in, or build them -ifneq ($(IMPORT_NATIVE_BINARIES),true) - COMPILE_IT=true -else - COMPILE_IT=false -endif - -ifeq ($(COMPILE_IT),true) - $(ACTUAL_PROGRAM):: classes $(INIT) # @@ -192,19 +183,6 @@ $(ACTUAL_PROGRAM):: $(FILES_o) endif # PLATFORM -else # COMPILE_IT - -$(ACTUAL_PROGRAM):: - -# Copies in the file from the JDK_IMPORT_PATH area -$(ACTUAL_PROGRAM_DIR)/%: $(JDK_IMPORT_PATH)/jre/bin/% - @$(install-import-file) -$(ACTUAL_PROGRAM_DIR)/%: $(JDK_IMPORT_PATH)/bin/% - @$(install-import-file) - -endif # COMPILE_IT - - clean:: ifeq ($(PLATFORM), windows) $(RM) $(OBJDIR)/$(PROGRAM).rc diff --git a/make/common/Release.gmk b/make/common/Release.gmk index b8e95bea2eeb3033d515c7dd01283b0e3cdb2e83..a7e2eb0c7d1eaddc17f0ebdee472bffdf3017d7f 100644 --- a/make/common/Release.gmk +++ b/make/common/Release.gmk @@ -249,18 +249,8 @@ compare-image \ sec-files sec-files-win jgss-files :: @$(ECHO) ">>>Making "$@" @ `$(DATE)` ..." -# -# Export binary plugs if not building OPENJDK -# -ifdef OPENJDK - EXPORT_BINARY_PLUGS = -else # !OPENJDK - EXPORT_BINARY_PLUGS = export-binary-plugs test-binary-plugs -endif # OPENJDK - # Order is important here, trim jre after jdk image is created images:: sanity-images post-sanity-images \ - $(EXPORT_BINARY_PLUGS) \ $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \ trim-image-jre trim-image-jdk \ process-image-jre process-image-jdk sec-files sec-files-win jgss-files diff --git a/make/common/Sanity.gmk b/make/common/Sanity.gmk index 57b0a1d7c826b97e2eb106ca6afa47feca68ca66..eb303f9b95693b4cd67fd775adb7089b94024bdb 100644 --- a/make/common/Sanity.gmk +++ b/make/common/Sanity.gmk @@ -85,7 +85,6 @@ sanity-all:: sanity-base \ sane-classpath \ sane-java_home \ sane-fonts \ - sane-binary-plugs \ sane-variant \ sane-ld_library_path \ sane-ld_library_path_64 \ diff --git a/make/common/internal/BinaryPlugs.gmk b/make/common/internal/BinaryPlugs.gmk deleted file mode 100644 index d5eeb6d5a62908a77fe69f2bcc643463ff4d7304..0000000000000000000000000000000000000000 --- a/make/common/internal/BinaryPlugs.gmk +++ /dev/null @@ -1,270 +0,0 @@ -# -# Copyright (c) 2007, 2008, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -######################################################################## - -# Definitions for openjdk plugs (used by both import and export) - -# Names of native shared libraries - -PLUG_LIBRARY_NAMES= - -# Sub-directory where native shared libraries are located (e.g. jre/bin or...) - -PLUG_LOCATION_SUBDIR=$(ARCH_VM_SUBDIR) - -# Explicit classfile lists - -# WARNING: These classlists will not work with pattern rules, only used in -# shell commands. -# The \$$ patterns will fail in pattern rules, which want $$, -# but the $$ fails in shell commands. -# The shell commands are more important. -# Also, the $1 pattern in these names causes problems with the -# GNU make define feature, so you can't use these in define's. - -PLUG_JMF_CLASS_NAMES = \ -com/sun/jmx/snmp/SnmpDataTypeEnums.class \ -com/sun/jmx/snmp/SnmpDefinitions.class \ -com/sun/jmx/snmp/SnmpOid.class \ -com/sun/jmx/snmp/SnmpOidDatabase.class \ -com/sun/jmx/snmp/SnmpOidDatabaseSupport.class \ -com/sun/jmx/snmp/SnmpOidRecord.class \ -com/sun/jmx/snmp/SnmpOidTable.class \ -com/sun/jmx/snmp/SnmpOidTableSupport.class \ -com/sun/jmx/snmp/SnmpParameters.class \ -com/sun/jmx/snmp/SnmpPduPacket.class \ -com/sun/jmx/snmp/SnmpPeer.class \ -com/sun/jmx/snmp/SnmpTimeticks.class \ -com/sun/jmx/snmp/SnmpVarBind.class \ -com/sun/jmx/snmp/SnmpVarBindList.class \ -com/sun/jmx/snmp/Timestamp.class \ -com/sun/jmx/snmp/daemon/SendQ.class \ -com/sun/jmx/snmp/daemon/SnmpInformRequest.class \ -com/sun/jmx/snmp/daemon/SnmpQManager.class \ -com/sun/jmx/snmp/daemon/SnmpRequestCounter.class \ -com/sun/jmx/snmp/daemon/SnmpResponseHandler.class \ -com/sun/jmx/snmp/daemon/SnmpSendServer.class \ -com/sun/jmx/snmp/daemon/SnmpSession.class \ -com/sun/jmx/snmp/daemon/SnmpSocket.class \ -com/sun/jmx/snmp/daemon/SnmpTimerServer.class \ -com/sun/jmx/snmp/daemon/WaitQ.class - -# Class list temp files (used by both import and export of plugs) - -PLUG_TEMPDIR=$(ABS_TEMPDIR)/plugs -PLUG_CLASS_AREAS = jmf -PLUG_CLISTS = $(PLUG_CLASS_AREAS:%=$(PLUG_TEMPDIR)/%.clist) - -# Create jargs file command - -define plug-create-jargs -@$(prep-target) -$(SED) -e "s@^@-C $(CLASSDESTDIR) @" $< > $@ -endef # plug-create-clist-jargs - -# Create clist (class name list) and jargs file (input to jar) -# Need these files to avoid long command lines which fail on some systems. - -$(PLUG_TEMPDIR)/jmf.clist: - @$(prep-target) - @for i in $(PLUG_JMF_CLASS_NAMES) ; do \ - $(ECHO) "$$i" >> $@; \ - done -$(PLUG_TEMPDIR)/all.clist: $(PLUG_CLISTS) - @$(prep-target) - $(CAT) $(PLUG_CLISTS) > $@ -$(PLUG_TEMPDIR)/jmf.jargs: $(PLUG_TEMPDIR)/jmf.clist - $(plug-create-jargs) -$(PLUG_TEMPDIR)/all.jargs: $(PLUG_TEMPDIR)/all.clist - $(plug-create-jargs) - -# -# Specific to OPENJDK import of binary plugs -# - -ifdef OPENJDK - -# Import - -PLUG_IMPORT_DIR=$(BINARY_PLUGS_PATH) -PLUG_IMPORT_JARFILE=$(BINARY_PLUGS_JARFILE) - -# Import file command - -define import-binary-plug-file -@$(ECHO) "PLUG IMPORT: $(@F)" -$(install-non-module-file) -endef # import-binary-plug-file - -# Import classes command - -define import-binary-plug-classes -@$(MKDIR) -p $(CLASSDESTDIR) -@$(CAT) $1 | $(SED) -e 's/^/PLUG IMPORT: /' -($(CD) $(CLASSDESTDIR) && $(BOOT_JAR_CMD) xf $(PLUG_IMPORT_JARFILE) @$1 $(BOOT_JAR_JFLAGS) ) -($(CD) $(CLASSDESTDIR) && $(java-vm-cleanup) ) -endef # import-binary-plug-classes - -# Import specific area classes (the classes are always created) - -import-binary-plug-jmf-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/jmf.clist - $(call import-binary-plug-classes,$(PLUG_TEMPDIR)/jmf.clist) - -# Import all classes from the jar file - -import-binary-plug-jar: \ - import-binary-plug-jmf-classes - -# Binary plug start/complete messages - -import-binary-plugs-started: - @$(ECHO) "BinaryPlugs import started: `date`" - @$(ECHO) "BINARY_PLUGS_PATH=$(BINARY_PLUGS_PATH)" -import-binary-plugs-completed: - @$(ECHO) "BinaryPlugs import completed: `date`" - -# Import lib files (only if they don't exist already) - -import-binary-plugs-libs: \ - $(PLUG_LIBRARY_NAMES:%=$(LIB_LOCATION)/%) - -# Import everything - -import-binary-plugs: \ - import-binary-plugs-started \ - import-binary-plugs-libs \ - import-binary-plug-jar \ - import-binary-plugs-completed - -# All these targets are phony (no filenames) - -.PHONY: import-binary-plugs-started \ - import-binary-plugs-completed \ - import-binary-plugs-libs \ - import-binary-plugs \ - import-binary-plug-jar \ - import-binary-plug-jmf-classes - -else # !OPENJDK - -# -# Specific to exporting binary plugs for OPENJDK (e.g. OPENJDK is NOT defined) -# - -# Export names (See make/common/Defs.gmk for BINARY_PLUGS_JARNAME definition) - -PLUG_EXPORT_DIRNAME=openjdk-binary-plugs-image -PLUG_EXPORT_DIR=$(OUTPUTDIR)/$(PLUG_EXPORT_DIRNAME) -PLUG_EXPORT_JARFILE=$(PLUG_EXPORT_DIR)/jre/lib/$(BINARY_PLUGS_JARNAME) - -# Export file command - -define export-binary-plug-file -@$(ECHO) "PLUG EXPORT: $(@F)" -$(install-non-module-file) -endef # export-binary-plug-file - -# OpenJDK Binary Plug License - -$(PLUG_EXPORT_DIR)/LICENSE: $(CLOSED_SHARE_SRC)/doc/openjdk/binary-plugs/LICENSE - $(export-binary-plug-file) -export-binary-plugs-license: $(PLUG_EXPORT_DIR)/LICENSE - -# Create jar file of plug classes (always created) - -$(PLUG_EXPORT_JARFILE): $(PLUG_TEMPDIR)/all.clist $(PLUG_TEMPDIR)/all.jargs - @$(prep-target) - @$(ECHO) "PLUG EXPORT: $(@F)" - @$(CAT) $(PLUG_TEMPDIR)/all.clist | $(SED) -e 's/^/PLUG EXPORT: /' - $(BOOT_JAR_CMD) cf $@ @$(PLUG_TEMPDIR)/all.jargs $(BOOT_JAR_JFLAGS) - @$(java-vm-cleanup) -export-binary-plugs-jar: $(PLUG_EXPORT_JARFILE) - -# Export binary plug start/complete messages - -export-binary-plugs-started: - @$(ECHO) "BinaryPlugs export started: `date`" - @$(ECHO) "PLUG_EXPORT_DIR=$(PLUG_EXPORT_DIR)" - $(RM) -r $(PLUG_EXPORT_DIR) - @$(MKDIR) -p $(PLUG_EXPORT_DIR) - @$(MKDIR) -p $(PLUG_TEMPDIR) -export-binary-plugs-completed: - @$(RM) -r $(PLUG_TEMPDIR) - @$(ECHO) "BinaryPlugs export completed: `date`" - -# Export lib files (only if they don't exist already) - -export-binary-plugs-libs: \ - $(PLUG_LIBRARY_NAMES:%=$(PLUG_EXPORT_DIR)/$(PLUG_LOCATION_SUBDIR)/%) - -# Export everything - -export-binary-plugs: \ - export-binary-plugs-started \ - export-binary-plugs-libs \ - export-binary-plugs-license \ - export-binary-plugs-jar \ - export-binary-plugs-completed - -# All these targets are phony (no filenames) - -.PHONY: export-binary-plugs-started \ - export-binary-plugs-license \ - export-binary-plugs-jar \ - export-binary-plugs-libs \ - export-binary-plugs-completed \ - export-binary-plugs - -# Rules that test the export and import of plugs (only when you can export) - -TEST_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-testing-plugs -TEST_PLUG_COPY=$(TEST_OUTPUTDIR)/$(PLUG_EXPORT_DIRNAME)-testcopy - -# Run export-binary-plugs first, then use this rule to test an import - -test-binary-plugs: $(TEST_PLUG_COPY) - $(RM) -r $(TEST_OUTPUTDIR)/$(PLUG_EXPORT_DIRNAME) - $(MKDIR) -p $(TEST_OUTPUTDIR) - @$(ECHO) "Testing import of plugs" - ($(CD) $(JDK_TOPDIR)/make && \ - $(MAKE) OPENJDK=true \ - ALT_OUTPUTDIR=$(TEST_OUTPUTDIR) \ - ALT_JDK_IMPORT_PATH=$(JDK_IMPORT_PATH) \ - ALT_BINARY_PLUGS_PATH=$(TEST_PLUG_COPY) \ - import-binary-plugs ) - $(RM) -r $(TEST_OUTPUTDIR) - @$(ECHO) "Testing of plugs was successful" - -$(TEST_PLUG_COPY): - @$(ECHO) "Creating test plug copy" - $(RM) -r $@ - $(MKDIR) -p $(@D) - $(CP) -r -p $(PLUG_EXPORT_DIR) $@ - -.PHONY: test-binary-plugs - -endif # !OPENJDK - diff --git a/make/common/shared/Compiler-gcc.gmk b/make/common/shared/Compiler-gcc.gmk index b4a4f536353fd4a60d06bb68e626cb8d74a280d4..570ea1c85dba9d787ee9eb0a86ba4f8637264b30 100644 --- a/make/common/shared/Compiler-gcc.gmk +++ b/make/common/shared/Compiler-gcc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 @@ ifeq ($(PLATFORM), windows) CCC = $(COMPILER_PATH)g++ LIBEXE = $(COMPILER_PATH)lib LINK = $(COMPILER_PATH)link - RC = $(MSDEVTOOLS_PATH)link + RC = $(COMPILER_PATH)rc LINK32 = $(LINK) RSC = $(RC) # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake diff --git a/make/common/shared/Compiler-msvc.gmk b/make/common/shared/Compiler-msvc.gmk index 08ea9b332b19cd4f40e3499664ed6838e815111c..49a0d5fe63cace132cf940d23b8edf9fe01aa101 100644 --- a/make/common/shared/Compiler-msvc.gmk +++ b/make/common/shared/Compiler-msvc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 @@ -34,8 +34,6 @@ ifeq ($(PLATFORM), windows) CCC = $(COMPILER_PATH)cl LIBEXE = $(COMPILER_PATH)lib LINK = $(COMPILER_PATH)link - RC = $(MSDEVTOOLS_PATH)rc - RSC = $(MSDEVTOOLS_PATH)rc LINK32 = $(LINK) # Fill in unknown values @@ -47,7 +45,10 @@ ifeq ($(PLATFORM), windows) # Compiler version and type (Always get word after "Version") CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}') - + + # The MSDEVTOOLS_PATH is for older compilers, place for rc, mt, etc. + _OTHER_TOOLS_PATH = $(MSDEVTOOLS_PATH) + # SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure... ifeq ($(ARCH_DATA_MODEL), 32) LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') @@ -56,43 +57,26 @@ ifeq ($(PLATFORM), windows) # This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077 COMPILER_NAME=Visual Studio .NET 2003 Professional C++ COMPILER_VERSION=VS2003 + RC = $(_OTHER_TOOLS_PATH)rc REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase MTL = $(COMPILER_PATH)../../Common7/Tools/Bin/midl - ifndef COMPILER_PATH - COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) - endif endif ifeq ($(CC_MAJORVER), 14) COMPILER_NAME=Visual Studio 8 COMPILER_VERSION=VS2005 + RC = $(_OTHER_TOOLS_PATH)rc REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl - MT = $(MSDEVTOOLS_PATH)/mt - ifndef COMPILER_PATH - COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) - endif + MT = $(_OTHER_TOOLS_PATH)/mt endif ifeq ($(CC_MAJORVER), 15) COMPILER_NAME=Visual Studio 9 COMPILER_VERSION=VS2008 + RC = $(_OTHER_TOOLS_PATH)rc #rebase and midl moved out of Visual Studio into the SDK: - REBASE = $(MSDEVTOOLS_PATH)/rebase - MTL = $(MSDEVTOOLS_PATH)/midl.exe - MT = $(MSDEVTOOLS_PATH)mt - ifndef COMPILER_PATH - COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) - endif - endif - ifeq ($(CC_MAJORVER), 16) - COMPILER_NAME=Visual Studio 10 - COMPILER_VERSION=VS2010 - #rebase and midl moved out of Visual Studio into the SDK: - REBASE = $(MSDEVTOOLS_PATH)/rebase - MTL = $(MSDEVTOOLS_PATH)/midl.exe - MT = $(MSDEVTOOLS_PATH)mt - ifndef COMPILER_PATH - COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) - endif + REBASE = $(_OTHER_TOOLS_PATH)/rebase + MTL = $(_OTHER_TOOLS_PATH)/midl.exe + MT = $(_OTHER_TOOLS_PATH)mt endif else # else ARCH_DATA_MODEL is 64 @@ -105,13 +89,15 @@ ifeq ($(PLATFORM), windows) # This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7 COMPILER_NAME=Microsoft Platform SDK - November 2001 Edition COMPILER_VERSION=VS2003 + RC = $(_OTHER_TOOLS_PATH)rc endif endif ifeq ($(CC_MAJORVER), 14) ifeq ($(ARCH), amd64) #rebase and midl moved out of Visual Studio into the SDK: - REBASE = $(MSDEVTOOLS_PATH)/rebase - MTL = $(MSDEVTOOLS_PATH)/midl.exe + RC = $(_OTHER_TOOLS_PATH)/rc + REBASE = $(_OTHER_TOOLS_PATH)/rebase + MTL = $(_OTHER_TOOLS_PATH)/midl.exe ifeq ($(CC_MICROVER), 30701) # This should be: CC_VER=14.00.30701 LINK_VER=8.00.30701 # WARNING: it says 14, but it is such an early build it doesn't @@ -135,24 +121,42 @@ ifeq ($(PLATFORM), windows) MT = $(MSSDK61)/Bin/X64/mt.exe MTL = $(MSSDK61)/Bin/X64/midl.exe endif - ifeq ($(CC_MAJORVER), 16) - COMPILER_NAME=Microsoft Visual Studio 10 (16.00.30319.01) - COMPILER_VERSION=VS2010 - RC = $(MSDEVTOOLS_PATH)/Bin/x64/rc.exe - RSC = $(MSDEVTOOLS_PATH)/Bin/x64/rc.exe - MT = $(MSDEVTOOLS_PATH)/Bin/x64/mt.exe - MTL = $(MSDEVTOOLS_PATH)/Bin/X64/midl.exe + endif + + # The VS2010 compiler is the same one used on both 32bit and 64bit + ifeq ($(CC_MAJORVER), 16) + COMPILER_NAME=Microsoft Visual Studio 10 (16.00.30319.01) + COMPILER_VERSION=VS2010 + ifeq ($(WINDOWSSDKDIR),) + WINDOWSSDKDIR := $(error WINDOWSSDKDIR cannot be empty here) endif - # This will cause problems if ALT_COMPILER_PATH is defined to "" - # which is a directive to use the PATH. - ifndef COMPILER_PATH - COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) + ifeq ($(ARCH_DATA_MODEL), 32) + _OTHER_TOOLS_BIN = $(WINDOWSSDKDIR)/Bin + else + ifeq ($(ARCH), ia64) + _OTHER_TOOLS_BIN = $(WINDOWSSDKDIR)/Bin/ia64 + else + _OTHER_TOOLS_BIN = $(WINDOWSSDKDIR)/Bin/x64 + endif endif + RC = $(_OTHER_TOOLS_BIN)/rc.exe + REBASE = $(_OTHER_TOOLS_BIN)/rebase.exe + MT = $(_OTHER_TOOLS_BIN)/mt.exe + MTL = $(_OTHER_TOOLS_BIN)/midl.exe + endif + + # These variables can never be empty + ifndef COMPILER_PATH + COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) endif ifndef COMPILER_VERSION COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here) endif + # Shared library generation flag SHARED_LIBRARY_FLAG = -LD + # RSC is always same as RC (Not sure who uses this RSC variable) + RSC = $(RC) + endif diff --git a/make/common/shared/Defs-solaris.gmk b/make/common/shared/Defs-solaris.gmk index 8ba3f4e98cdd87915f74981893caf51750bebdd9..98b054ef3d48f1b163dadbfc05ff4b92a49f9179 100644 --- a/make/common/shared/Defs-solaris.gmk +++ b/make/common/shared/Defs-solaris.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 @@ -91,7 +91,6 @@ endif ifneq "$(origin ALT_COMPILER_PATH)" "undefined" COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH)) else - # Careful here, REQUIRED_COMPILER_VERSION may not be defined yet (see Defs-versions.gmk) # If the place where we keep a set of Sun Studio compilers doesn't exist, # try and use /opt/SUNWspro, the default location for the SS compilers. # (DirExists checks for this path twice, an automount double check) diff --git a/make/common/shared/Defs-versions.gmk b/make/common/shared/Defs-versions.gmk index 1d741d54d3ba899e59ab893e6f8da509abd256d0..6784be6f04ac4d1da8424bc03ce7747c8026b961 100644 --- a/make/common/shared/Defs-versions.gmk +++ b/make/common/shared/Defs-versions.gmk @@ -27,7 +27,22 @@ # WARNING: This file is shared with other workspaces. # -# This file needs these set: CC_VERSION, PLATFORM, ARCH_FAMILY, and ARCH_DATA_MODEL. +# This file needs these set: PLATFORM, ARCH_FAMILY, and ARCH_DATA_MODEL. + +# Windows uses Microsoft compilers by default +ifeq ($(PLATFORM), windows) + override CC_VERSION = msvc +endif + +# Solaris uses Sun Studio compilers by default +ifeq ($(PLATFORM), solaris) + override CC_VERSION = sun +endif + +# Linux uses GNU compilers by default +ifeq ($(PLATFORM), linux) + override CC_VERSION = gcc +endif ########################################################################## # diff --git a/make/common/shared/Defs-windows.gmk b/make/common/shared/Defs-windows.gmk index ac9daf4cd6ce140b7fb18e5fc00c9fdc5b211ee1..2c149e07de1d9fbaef5cb0a8eb18c073e1cbe9e0 100644 --- a/make/common/shared/Defs-windows.gmk +++ b/make/common/shared/Defs-windows.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 @@ -80,13 +80,20 @@ override INCREMENTAL_BUILD = false # their own variable assigned with :=, then use FullPath. # -# Use FullPath to get C:/ style non-spaces path. Never ends with a /! ifdef USING_CYGWIN +# All possible drive letters +drives=a b c d e f g h i j k l m n o p q r s t v u w x y z +# Convert /cygdrive/ paths to the mixed style without an exec of cygpath +# Must be a path with no spaces. +define MixedPath +$(patsubst /%,c:/cygwin/%,$(sort $(filter-out /cygdrive/%,$(foreach drive,$(drives),$(patsubst /cygdrive/$(drive)/%,$(drive):/%,$1))))) +endef +# Use FullPath to get C:/ style non-spaces path. Never ends with a /! # We assume cygpath is available in the search path # NOTE: Use of 'pwd' with CYGWIN will not get you a mixed style path! CYGPATH_CMD=cygpath -a -s -m define FullPath -$(shell $(CYGPATH_CMD) $1 2> $(DEV_NULL)) +$(if $(word 2,$1),$(shell $(CYGPATH_CMD) $1 2> $(DEV_NULL)),$(call MixedPath,$(realpath $(subst ",,$1)))) endef define OptFullPath $(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1" 2> $(DEV_NULL); else echo "$1"; fi) @@ -228,29 +235,125 @@ else _dx_sdk_dir :=$(call FullPath,$(xDXSDK_DIR)) endif -# Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit] -ifeq ($(ARCH_DATA_MODEL), 32) - # Try looking in MSVCDIR or MSVCDir area first - # (set by vcvars32.bat for VC .NET, not defined in the VC 2008/2010) - ifdef MSVCDIR - xMSVCDIR :="$(subst \,/,$(MSVCDIR))" - _msvc_dir :=$(call FullPath,$(xMSVCDIR)) +# Use of the Visual Studio compilers requires certain env variables be set: +# PATH should include the path to cl.exe +# INCLUDE should be defined +# LIB should be defined +# LIBPATH should be defined +# VS100COMNTOOLS should be defined +# WINDOWSSDKDIR should be defined +# The 7.0a path is from VS2010 Pro, the 7.1 path is the standalone SDK. +# For 64bit either will work for us. +# If a developer chooses to install the standalone SDK in some other +# location, then they need to set WINDOWSSDKDIR. +# +# Compilers for 64bit may be from the free SDK, or Visual Studio Professional. +# The free Express compilers don't contain 64 bit compilers, which is why +# you instead need the SDK. +# Release enginering will use VS2010 Pro, so the frequency of testing of +# SDK based builds will depend entirely on individual usage. + +# We only need to do this once +ifndef VS2010_EXISTS + # The 2 key paths we need are WINDOWSSDKDIR and VS100COMNTOOLS. + # If not defined try to see if default location exists. + # If defined make sure that the path has no spaces. + # Finally, export path with no spaces so logic minimizes FullPath calls. + ifndef WINDOWSSDKDIR + # The 7.0a SDK is the second choice. + xWINDOWSSDKDIR :="$(_program_files32)/Microsoft SDKs/Windows/v7.0a/" + fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR)) + # The 7.1 SDK is the second choice. + ifeq ($(fWINDOWSSDKDIR),) + xWINDOWSSDKDIR :="$(_program_files32)/Microsoft SDKs/Windows/v7.1/" + fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR)) + endif else - ifdef MSVCDir - xMSVCDIR :="$(subst \,/,$(MSVCDir))" - _msvc_dir :=$(call FullPath,$(xMSVCDIR)) + ifneq ($(word 2,$(WINDOWSSDKDIR)),) + xWINDOWSSDKDIR :="$(subst \,/,$(WINDOWSSDKDIR))" + fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR)) + else + fWINDOWSSDKDIR :=$(WINDOWSSDKDIR) endif endif - # If we still don't have it, look for VSnnCOMNTOOLS (newest first), - # set by installer? - ifeq ($(_msvc_dir),) - ifdef VS100COMNTOOLS # /Common/Tools directory, use ../../Vc + ifneq ($(fWINDOWSSDKDIR),) + WINDOWSSDKDIR :=$(fWINDOWSSDKDIR)/ + endif + ifndef VS100COMNTOOLS + xVS100COMNTOOLS :="$(_program_files32)/Microsoft Visual Studio 10.0/Common7/Tools/" + fVS100COMNTOOLS :=$(call FullPath,$(xVS100COMNTOOLS)) + else + ifneq ($(word 2,$(VS100COMNTOOLS)),) xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))" - _vs100tools :=$(call FullPath,$(xVS100COMNTOOLS)) + fVS100COMNTOOLS :=$(call FullPath,$(xVS100COMNTOOLS)) + else + fVS100COMNTOOLS :=$(xVS100COMNTOOLS) endif - ifneq ($(_vs100tools),) - _msvc_dir :=$(_vs100tools)/../../Vc + endif + ifneq ($(fVS100COMNTOOLS),) + VS100COMNTOOLS :=$(fVS100COMNTOOLS)/ + endif + # Check to see that both exist + ifeq ($(WINDOWSSDKDIR),) + _vs2010_message := No WINDOWSSDKDIR found on system. $(_vs2010_message) + VS2010_EXISTS := false + endif + ifeq ($(VS100COMNTOOLS),) + _vs2010_message := No VS100COMNTOOLS found on system. $(_vs2010_message) + VS2010_EXISTS := false + endif + ifeq ($(VS2010_EXISTS),false) + x:=$(warning WARNING: No VS2010 available. $(_vs2010_message)) + VS100COMNTOOLS := + WINDOWSSDKDIR := + else + VS2010_EXISTS := true + _msvc_dir :=$(VS100COMNTOOLS)/../../Vc + endif + export VS2010_EXISTS + export VS100COMNTOOLS + export WINDOWSSDKDIR +endif + +# Setup for VS2010 is simple, others logic is historic +ifeq ($(VS2010_EXISTS),true) + + # VS2010 Compiler root directory + _msvc_dir :=$(VS100COMNTOOLS)/../../Vc + # SDK root directory + _ms_sdk :=$(WINDOWSSDKDIR) + # Compiler bin directory and redist directory + ifeq ($(ARCH_DATA_MODEL), 32) + _compiler_bin :=$(_msvc_dir)/Bin + _redist_sdk :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC100.CRT) + endif + ifeq ($(ARCH_DATA_MODEL), 64) + _compiler_bin :=$(_msvc_dir)/bin/amd64 + _redist_sdk :=$(call FullPath,$(_msvc_dir)/redist/x64/Microsoft.VC100.CRT) + endif + ifeq ($(_redist_sdk),) + _redist_sdk :=$(_system_root)/system32 + endif + +else # Not VS2010 + + # Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit] + ifeq ($(ARCH_DATA_MODEL), 32) + + # Try looking in MSVCDIR or MSVCDir area first + # (set by vcvars32.bat for VC .NET, not defined in the VC 2008/2010) + ifdef MSVCDIR + xMSVCDIR :="$(subst \,/,$(MSVCDIR))" + _msvc_dir :=$(call FullPath,$(xMSVCDIR)) else + ifdef MSVCDir + xMSVCDIR :="$(subst \,/,$(MSVCDir))" + _msvc_dir :=$(call FullPath,$(xMSVCDIR)) + endif + endif + # If we still don't have it, look for VSnnCOMNTOOLS (newest first), + # set by installer? + ifeq ($(_msvc_dir),) ifdef VS90COMNTOOLS # /Common/Tools directory, use ../../Vc xVS90COMNTOOLS :="$(subst \,/,$(VS90COMNTOOLS))" _vs90tools :=$(call FullPath,$(xVS90COMNTOOLS)) @@ -275,46 +378,38 @@ ifeq ($(ARCH_DATA_MODEL), 32) endif endif endif - endif - ifneq ($(_msvc_dir),) - _compiler_bin :=$(_msvc_dir)/Bin - # Assume PlatformSDK is in VS71 (will be empty if VS90) - _ms_sdk :=$(call FullPath,$(_msvc_dir)/PlatformSDK) - # Assume VS100, then VS90, then VS80, then VS71 - _redist_sdk :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC100.CRT) - ifeq ($(_redist_sdk),) - ifneq ($(VS100COMNTOOLS),) - _redist_sdk :=c:/windows/system32 - else - _redist_sdk :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC90.CRT) + + ifneq ($(_msvc_dir),) + _compiler_bin :=$(_msvc_dir)/Bin + # Assume PlatformSDK is in VS71 (will be empty if VS90) + _ms_sdk :=$(call FullPath,$(_msvc_dir)/PlatformSDK) + _redist_sdk :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC90.CRT) + ifeq ($(_redist_sdk),) + _redist_sdk :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC80.CRT) ifeq ($(_redist_sdk),) - _redist_sdk :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC80.CRT) - ifeq ($(_redist_sdk),) - _redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v1.1/Bin) - endif + _redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v1.1/Bin) endif endif endif endif -endif -# The Microsoft Platform SDK installed by itself -ifneq ($(_program_files),) - _PSDK :="$(_program_files)/Microsoft SDKs/Windows/v6.1/" - _psdk :=$(call FullPath,$(xMSSDK61)) - ifeq ($(_psdk),) - xPSDK :="$(_program_files)/Microsoft Platform SDK" - _psdk :=$(call FullPath,$(xPSDK)) + # The Microsoft Platform SDK installed by itself + ifneq ($(_program_files),) + _PSDK :="$(_program_files)/Microsoft SDKs/Windows/v6.1/" + _psdk :=$(call FullPath,$(xMSSDK61)) ifeq ($(_psdk),) - xPSDK :="$(_program_files)/Microsoft SDK" - _psdk :=$(call FullPath,$(xMSSDK)) + xPSDK :="$(_program_files)/Microsoft Platform SDK" + _psdk :=$(call FullPath,$(xPSDK)) + ifeq ($(_psdk),) + xPSDK :="$(_program_files)/Microsoft SDK" + _psdk :=$(call FullPath,$(xMSSDK)) + endif endif endif -endif -# If no SDK found yet, look in other places -ifeq ($(_ms_sdk),) - ifdef MSSDK + # If no SDK found yet, look in other places + ifeq ($(_ms_sdk),) + ifdef MSSDK xMSSDK :="$(subst \,/,$(MSSDK))" _ms_sdk :=$(call FullPath,$(xMSSDK)) else @@ -322,56 +417,13 @@ ifeq ($(_ms_sdk),) xMSSDK :="$(subst \,/,$(MSSdk))" _ms_sdk :=$(call FullPath,$(xMSSDK)) else - _ms_sdk :=$(_psdk) + _ms_sdk :=$(_psdk) + endif endif endif -endif - -# Compilers for 64bit may be from the free SDK, or Visual Studio Professional -# The free Express compilers don't contain 64 bit compilers, which is why -# you instead need the SDK. -# So for VS2010 based builds, either VS2010 Pro with the 7.0a SDK, or -# the Windows 7.1 standalone SDK with compilers may be used. -# Release enginering will use VS2010 Pro, so the frequency of testing of -# SDK based builds will depend entirely on individual usage. -ifeq ($(ARCH_DATA_MODEL), 64) - ifdef VS100COMNTOOLS # /Common7/Tools directory, use ../../Vc - # VS2010 default location is used when building 64 bit using the 7.1 SDK - # This is safe to hardwire as the SDK installer won't let you change it - # and the VS2010 variable is only used if the compilers are from the SDK - xVS2010 :="$(_program_files32)/Microsoft Visual Studio 10.0/" - VS2010 :=$(call FullPath,$(xVS2010)) - xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))" - _vs100tools :=$(call FullPath,$(xVS100COMNTOOLS)) - endif - ifneq ($(_vs100tools),) - _compiler_bin :=$(_vs100tools)/../../Vc/bin/amd64 - x_redist_sdk :=$(_vs100tools)/../../Vc/redist/x64/Microsoft.VC100.CRT - _redist_sdk :=$(call FullPath,$(x_redist_sdk)) - # The SDK doesn't have the redist directory, but the DLL is installed - # into the windows directory. - ifeq ($(_redist_sdk),) - _redist_sdk :=c:/windows/system32 - endif - # Not currently using MSSDK7n, but maybe we can make use of it for - # doing default location lookup to find some SDK tools that presently - # require the developer to explicitly set the path. - # The 7.0a path is from VS2010 Pro, the 7.1 path is the standalone SDK. - # Either will work for us. - # If a developer chooses to install the standalone SDK in some other - # location, then this will fail to find it, which won't matter so long as - # we aren't using this variable. If we do they'd still need to set the - # ALT_MSDEVTOOLS_PATH as now. - # %WindowsSdkDir% could be referenced instead but the SDK installer - # doesn't set it and in the case of the VS2010 compilers, - # you can't change this location in the installer anyway. - xMSSDK7n :="$(_program_files32)/Microsoft SDKs/Windows/v7.0a/" - MSSDK7n :=$(call FullPath,$(xMSSDK7n)) - ifeq ($(MSSDK7n),) - xMSSDK7n :="$(_program_files32)/Microsoft SDKs/Windows/v7.1/" - MSSDK7n :=$(call FullPath,$(xMSSDK7n)) - endif - else + + # Compilers for 64bit may be from the free SDK, or Visual Studio Professional. + ifeq ($(ARCH_DATA_MODEL), 64) xVS2008 :="$(_program_files32)/Microsoft Visual Studio 9.0/" VS2008 :=$(call FullPath,$(xVS2008)) ifneq ($(VS2008),) @@ -391,7 +443,8 @@ ifeq ($(ARCH_DATA_MODEL), 64) endif endif endif -endif + +endif # VS2010_EXISTS # Location on system where jdk installs might be ifneq ($(_program_files),) @@ -509,7 +562,7 @@ MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH) ifeq ($(ARCH_DATA_MODEL), 32) _NEEDS_MSVCRNN = true else - ifneq ($(VS2010),) + ifeq ($(VS2010_EXISTS),true) _NEEDS_MSVCRNN = true else ifneq ($(VS2008),) diff --git a/make/common/shared/Defs.gmk b/make/common/shared/Defs.gmk index 43e27a5a4cad0c74eba59fea728c04c953e9e5e2..aae5e6d85f07e70977358a1e715c37d891e46382 100644 --- a/make/common/shared/Defs.gmk +++ b/make/common/shared/Defs.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 @@ -373,6 +373,9 @@ OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR) # Get platform specific settings # NB: OUTPUTDIR must be defined. Otherwise hotspot import detection will not work correctly # On other hand this must be included early as it provides platform specific defines such as FullPath +include $(JDK_MAKE_SHARED_DIR)/Defs-versions.gmk + +# Get platform specific settings (defines COMPILER_PATH) include $(JDK_MAKE_SHARED_DIR)/Defs-$(PLATFORM).gmk # Components @@ -608,24 +611,9 @@ else COPYRIGHT_YEAR = $(shell $(DATE) '+%Y') endif -# Windows uses Microsoft compilers by default -ifeq ($(PLATFORM), windows) - override CC_VERSION = msvc -endif - -# Solaris uses Sun Studio compilers by default -ifeq ($(PLATFORM), solaris) - override CC_VERSION = sun -endif - -# Linux uses GNU compilers by default -ifeq ($(PLATFORM), linux) - override CC_VERSION = gcc -endif - -# Get the REQUIRED versions (needs CC_VERSION set) -include $(JDK_MAKE_SHARED_DIR)/Defs-versions.gmk - -# Get the compiler specific settings +# Get the compiler specific settings (will run the compiler to find out) +# NOTE: COMPILER_PATH must be set by this time. +# Up until we include this file, we don't know what specific compiler +# version is actually being used (i.e. what is in PATH or COMPILER_PATH). include $(JDK_MAKE_SHARED_DIR)/Compiler-$(CC_VERSION).gmk diff --git a/make/common/shared/Sanity-Settings.gmk b/make/common/shared/Sanity-Settings.gmk index 75e0cc86bcb5ced2202f0743c5ffa73280e46250..3979d8a8ec58f3ca2f95787571d5239211316666 100644 --- a/make/common/shared/Sanity-Settings.gmk +++ b/make/common/shared/Sanity-Settings.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 @@ -100,7 +100,8 @@ ifeq ($(PLATFORM),windows) ifneq ($(MSVCRNN_DLL),) ALL_SETTINGS+=$(call addAltSetting,MSVCRNN_DLL_PATH) endif - ALL_SETTINGS+=$(call addAltSetting,MSDEVTOOLS_PATH) + ALL_SETTINGS+=$(call addRequiredSetting,INCLUDE) + ALL_SETTINGS+=$(call addRequiredSetting,LIB) endif ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_NAME) ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_VERSION) @@ -223,6 +224,7 @@ ifeq ($(PLATFORM),windows) ALL_SETTINGS+=$(call addAltSetting,DXSDK_PATH) ALL_SETTINGS+=$(call addAltSetting,DXSDK_INCLUDE_PATH) ALL_SETTINGS+=$(call addAltSetting,DXSDK_LIB_PATH) + ALL_SETTINGS+=$(call addAltSetting,WINDOWSSDKDIR) ifndef OPENJDK ALL_SETTINGS+=$(call addAltSetting,DEPLOY_MSSDK) ALL_SETTINGS+=$(call addAltSetting,INSTALL_MSSDK) @@ -244,16 +246,7 @@ ifdef OPENJDK ALL_SETTINGS+=$(call addHeading,OpenJDK-specific settings) ALL_SETTINGS+=$(call addAltSetting,FREETYPE_HEADERS_PATH) ALL_SETTINGS+=$(call addAltSetting,FREETYPE_LIB_PATH) - ALL_SETTINGS+=$(call addHeading,OPENJDK Import Binary Plug Settings) - ALL_SETTINGS+=$(call addOptionalSetting,IMPORT_BINARY_PLUGS) - ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_JARFILE) - ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_PATH) - ALL_SETTINGS+=$(call addAltSetting,BUILD_BINARY_PLUGS_PATH) -else - ALL_SETTINGS+=$(call addHeading,OPENJDK Export Binary Plug Settings) - ALL_SETTINGS+=$(call addOptionalSetting,PLUG_EXPORT_DIRNAME) endif -ALL_SETTINGS+=$(call addOptionalSetting,PLUG_LIBRARY_NAMES) ifdef OPENJDK ALL_SETTINGS+=$(call addHeading,Previous JDK Settings) diff --git a/make/common/shared/Sanity.gmk b/make/common/shared/Sanity.gmk index 64278a1891db56e8b0d4f51054b83e76723bff4f..b17690ca4c237e75c396008f05ac22cfb9f3e8cc 100644 --- a/make/common/shared/Sanity.gmk +++ b/make/common/shared/Sanity.gmk @@ -187,7 +187,6 @@ include $(JDK_MAKE_SHARED_DIR)/Sanity-Settings.gmk sane-classpath \ sane-java_home \ sane-fonts \ - sane-binary-plugs \ sane-variant \ sane-ld_library_path \ sane-ld_library_path_64 \ @@ -502,23 +501,6 @@ ifndef OPENJDK fi endif -###################################################### -# If building OPENJDK check pre-built binaries are -# available for binary plug source components. -###################################################### -ifdef OPENJDK -sane-binary-plugs: - ifeq ($(IMPORT_BINARY_PLUGS),true) - @if [ ! -d "$(BINARY_PLUGS_PATH)" ]; then \ - $(ECHO) "WARNING: Can't locate pre-built libraries. \n" \ - " Please check your access to \n" \ - " $(BINARY_PLUGS_PATH) \n" \ - " and/or check your value of ALT_BINARY_PLUGS_PATH. \n" \ - "" >> $(WARNING_FILE); \ - fi - endif -endif - ###################################################### # VARIANT must be set to DBG or OPT ###################################################### @@ -1024,10 +1006,11 @@ ifeq ($(PLATFORM), solaris) endif ###################################################### -# Check for existence of MSDEVTOOLS_PATH on windows +# Check for existence of the extra tools on windows ###################################################### sane-msdevtools_path: ifeq ($(PLATFORM), windows) + ifneq ($(COMPILER_VERSION), VS2010) @if [ "$(MSDEVTOOLS_PATH)" != "" -a ! -r "$(MSDEVTOOLS_PATH)" ]; then \ $(ECHO) "ERROR: You do not have a valid MSDEVTOOLS_PATH setting. \n" \ " Please check your access to \n" \ @@ -1035,6 +1018,7 @@ ifeq ($(PLATFORM), windows) " and/or check your value of ALT_MSDEVTOOLS_PATH. \n" \ "" >> $(ERROR_FILE) ; \ fi + endif endif ###################################################### @@ -1443,10 +1427,24 @@ ifeq ($(PLATFORM), windows) endif ###################################################### -# Check for existence of INSTALL_MSSDK on windows +# Check for existence of the MSSDK on windows ###################################################### sane-install-mssdk_path: ifeq ($(PLATFORM), windows) + ifeq ($(COMPILER_VERSION), VS2010) + @if [ -z "$(WINDOWSSDKDIR)" ]; then \ + $(ECHO) "WARNING: Your WINDOWSSDKDIR setting is empty.\n" \ + " It is recommended to set ALT_WINDOWSSDKDIR.\n" \ + "" >> $(WARNING_FILE) ; \ + fi + @if [ ! -r "$(WINDOWSSDKDIR)" ]; then \ + $(ECHO) "ERROR: You do not have a valid WINDOWSSDKDIR setting. \n" \ + " Please check your access to \n" \ + " $(WINDOWSSDKDIR) \n" \ + " and/or check your value of ALT_WINDOWSSDKDIR. \n" \ + "" >> $(ERROR_FILE) ; \ + fi + endif @if [ -z "$(INSTALL_MSSDK)" ]; then \ $(ECHO) "WARNING: Your INSTALL_MSSDK setting is empty.\n" \ " It is recommended to set ALT_INSTALL_MSSDK.\n" \ diff --git a/make/java/redist/Makefile b/make/java/redist/Makefile index 6f86be97f149a340c2b969bd3fb8fa49656036f7..be2f886bbc9a8cb78c2cad004a4b30a75b42fe97 100644 --- a/make/java/redist/Makefile +++ b/make/java/redist/Makefile @@ -272,17 +272,9 @@ $(LIB_LOCATION)/$(KERNEL_LOCATION)/Xusage.txt : $(HOTSPOT_KERNEL_PATH)/Xusage.tx $(install-file) # -# Specific to OpenJDK building +# Specific to non-OpenJDK building # -ifdef OPENJDK - - ifeq ($(IMPORT_BINARY_PLUGS),true) - include $(BUILDDIR)/common/internal/BinaryPlugs.gmk - - build: import-binary-plugs - endif - -else # !OPENJDK +ifndef OPENJDK INTERNAL_IMPORT_LIST += \ $(LIBDIR)/security/US_export_policy.jar \ diff --git a/make/javax/sound/Makefile b/make/javax/sound/Makefile index b8dac1f28006151d52af4ea593b1d0e594e6aa7e..e52c946ad8c536de54a3e1db0b7d41fefc0b8bde 100644 --- a/make/javax/sound/Makefile +++ b/make/javax/sound/Makefile @@ -23,8 +23,6 @@ # questions. # -# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk - BUILDDIR = ../.. MODULE = sound PACKAGE = javax.sound diff --git a/make/jdk_generic_profile.sh b/make/jdk_generic_profile.sh index 4363a1b710e634b70445578db6ebf4dee85a9bce..a498c46680f7082d75121c40a10e6f310e5971b7 100644 --- a/make/jdk_generic_profile.sh +++ b/make/jdk_generic_profile.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2010, 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 @@ -78,11 +78,8 @@ # Attempts to set these variables for the JDK builds: # ALT_COMPILER_PATH # ALT_BOOTDIR -# ALT_BINARY_PLUGS_PATH -# ALT_CLOSED_JDK_IMPORT_PATH # Windows Only: # ALT_UNIXCOMMAND_PATH -# ALT_MSDEVTOOLS_PATH # ALT_DXSDK_PATH # ALT_MSVCRT_DLL_PATH # ALT_MSVCR71_DLL_PATH @@ -221,8 +218,6 @@ else # VisualStudio .NET 2003 VC++ 7.1 (VS71COMNTOOLS should be defined) vs_root=$(${cygpath} "${VS71COMNTOOLS}/../..") # Fill in PATH, LIB, and INCLUDE (unset all others to make sure) - msdev_root="${vs_root}/Common7/Tools" - msdevtools_path="${msdev_root}/bin" vc7_root="${vs_root}/Vc7" compiler_path="${vc7_root}/bin" platform_sdk="${vc7_root}/PlatformSDK" @@ -260,12 +255,6 @@ else else compiler_path="${platform_sdk}/Bin/win64/x86/AMD64" fi - if [ "${ALT_MSDEVTOOLS_PATH}" != "" ] ; then - msdevtools_path=${ALT_MSDEVTOOLS_PATH} - else - msdevtools_path="${platform_sdk}/Bin/win64/x86/AMD64" - fi - msdevtools_path="${compiler_path}" # LIB and INCLUDE must use ; as a separator include4sdk="${platform_sdk}/Include" include4sdk="${include4sdk};${platform_sdk}/Include/crt/sys" @@ -313,28 +302,6 @@ if [ "${ALT_JDK_IMPORT_PATH}" = "" -a -d ${jdk_instances}/${importjdk} ] ; then export ALT_JDK_IMPORT_PATH fi -# Get the latest JDK binary plugs or build to import pre-built binaries -if [ "${ALT_BINARY_PLUGS_PATH}" = "" ] ; then - binplugs=${jdk_instances}/openjdk-binary-plugs - jdkplugs=${jdk_instances}/${importjdk} - if [ -d ${binplugs} ] ; then - ALT_BINARY_PLUGS_PATH=${binplugs} - export ALT_BINARY_PLUGS_PATH - elif [ "${ALT_CLOSED_JDK_IMPORT_PATH}" = "" -a -d ${jdkplugs} ] ; then - ALT_CLOSED_JDK_IMPORT_PATH=${jdkplugs} - export ALT_CLOSED_JDK_IMPORT_PATH - fi - if [ "${ALT_BINARY_PLUGS_PATH}" = "" ] ; then - echo "WARNING: Missing ALT_BINARY_PLUGS_PATH: ${binplugs}" - fi -fi -if [ "${ALT_BINARY_PLUGS_PATH}" != "" -a ! -d "${ALT_BINARY_PLUGS_PATH}" ] ; then - echo "WARNING: Cannot access ALT_BINARY_PLUGS_PATH=${ALT_BINARY_PLUGS_PATH}" -fi -if [ "${ALT_CLOSED_JDK_IMPORT_PATH}" != "" -a ! -d "${ALT_CLOSED_JDK_IMPORT_PATH}" ] ; then - echo "WARNING: Cannot access ALT_CLOSED_JDK_IMPORT_PATH=${ALT_CLOSED_JDK_IMPORT_PATH}" -fi - # Export PATH setting PATH="${path4sdk}" export PATH diff --git a/make/netbeans/README b/make/netbeans/README index b23433401faef91a5c0473ceb0e9ea26744709d9..a375b8b55e303e909897c6c9adcd2a0f2611f255 100644 --- a/make/netbeans/README +++ b/make/netbeans/README @@ -93,7 +93,6 @@ Configuring make.options=\ ALT_BOOTDIR=/home/me/bin/jdk1.6.0 \ - ALT_BINARY_PLUGS_PATH=/home/me/bin/openjdk-binary-plugs \ ALT_JDK_IMPORT_PATH=/home/me/bin/jdk1.7.0 \ OPENJDK=true diff --git a/make/sun/dcpr/Makefile b/make/sun/dcpr/Makefile index 054d49ef7609147dbee63f6607e690d7138fef13..0d8003ef870fc9bf1ee2fb243266391d40e4fbc1 100644 --- a/make/sun/dcpr/Makefile +++ b/make/sun/dcpr/Makefile @@ -23,8 +23,6 @@ # questions. # -# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk - BUILDDIR = ../.. MODULE = java2d PACKAGE = sun.dc diff --git a/make/sun/font/t2k/Makefile b/make/sun/font/t2k/Makefile index 31a95122875e74a340dd14abce1b2ead97317655..8f54a9ce944d2a8f60bf688140a33c459c19779a 100644 --- a/make/sun/font/t2k/Makefile +++ b/make/sun/font/t2k/Makefile @@ -23,8 +23,6 @@ # questions. # -# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk - # # Makefile for building t2k rasteriser. # diff --git a/make/sun/management/Makefile b/make/sun/management/Makefile index 65f6fbde263582a9c19eb8912c996315d28ee554..4f04601d25b4a6618d0ee55bdaf5e0310f0a53fb 100644 --- a/make/sun/management/Makefile +++ b/make/sun/management/Makefile @@ -37,12 +37,8 @@ MGMT_LIB_SRC = $(SHARE_SRC)/lib/management all build:: properties aclfile jmxremotefiles -# When building the openjdk, build snmp only if importing binary plugs, -ifdef OPENJDK - ifeq ($(IMPORT_BINARY_PLUGS),true) - SUBDIRS = snmp - endif -else +# When building the openjdk, no snmp +ifndef OPENJDK SUBDIRS = snmp endif SUBDIRS += jmxremote