8027566: Remove the old build system

Mon, 04 Nov 2013 11:11:03 +0100

author
ihse
date
Mon, 04 Nov 2013 11:11:03 +0100
changeset 676
779e155419b8
parent 672
2f0f8d1d0753
child 681
73d741231651

8027566: Remove the old build system
Reviewed-by: erikj, tbell

make/BuildNashorn.gmk file | annotate | diff | comparison | revisions
make/Makefile file | annotate | diff | comparison | revisions
makefiles/BuildNashorn.gmk file | annotate | diff | comparison | revisions
makefiles/Makefile file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/make/BuildNashorn.gmk	Mon Nov 04 11:11:03 2013 +0100
     1.3 @@ -0,0 +1,112 @@
     1.4 +#
     1.5 +# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 +#
     1.8 +# This code is free software; you can redistribute it and/or modify it
     1.9 +# under the terms of the GNU General Public License version 2 only, as
    1.10 +# published by the Free Software Foundation.  Oracle designates this
    1.11 +# particular file as subject to the "Classpath" exception as provided
    1.12 +# by Oracle in the LICENSE file that accompanied this code.
    1.13 +#
    1.14 +# This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 +# version 2 for more details (a copy is included in the LICENSE file that
    1.18 +# accompanied this code).
    1.19 +#
    1.20 +# You should have received a copy of the GNU General Public License version
    1.21 +# 2 along with this work; if not, write to the Free Software Foundation,
    1.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 +#
    1.24 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.25 +# or visit www.oracle.com if you need additional information or have any
    1.26 +# questions.
    1.27 +#
    1.28 +
    1.29 +# This must be the first rule
    1.30 +default: all
    1.31 +
    1.32 +-include $(SPEC)
    1.33 +include MakeBase.gmk
    1.34 +include JavaCompilation.gmk
    1.35 +
    1.36 +JDK_CLASSES := $(JDK_OUTPUTDIR)/classes
    1.37 +
    1.38 +NASHORN_JAR := $(NASHORN_DIST)/nashorn.jar
    1.39 +NASHORN_VERSION := $(JDK_VERSION)
    1.40 +NASHORN_FULL_VERSION := $(FULL_VERSION)
    1.41 +
    1.42 +ifdef MILESTONE
    1.43 +  ifeq ($(MILESTONE), internal)
    1.44 +    NASHORN_VERSION = $(FULL_VERSION)
    1.45 +  endif
    1.46 +endif
    1.47 +
    1.48 +# Need to use source and target 7 for nasgen to work.
    1.49 +$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
    1.50 +    JVM := $(JAVA), \
    1.51 +    JAVAC := $(NEW_JAVAC), \
    1.52 +    FLAGS := -g -source 7 -target 7 -bootclasspath $(JDK_CLASSES), \
    1.53 +    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
    1.54 +    SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
    1.55 +
    1.56 +# Build nashorn into intermediate directory
    1.57 +$(eval $(call SetupJavaCompilation,BUILD_NASHORN, \
    1.58 +    SETUP := GENERATE_NEWBYTECODE_DEBUG, \
    1.59 +    SRC := $(NASHORN_TOPDIR)/src, \
    1.60 +    COPY := .properties .js, \
    1.61 +    BIN := $(NASHORN_OUTPUTDIR)/nashorn_classes))
    1.62 +
    1.63 +NASGEN_SRC := $(NASHORN_TOPDIR)/buildtools/nasgen/src
    1.64 +ASM_SRC := $(JDK_TOPDIR)/src/share/classes/jdk/internal/org/objectweb/asm
    1.65 +
    1.66 +# Build nasgen
    1.67 +$(eval $(call SetupJavaCompilation,BUILD_NASGEN, \
    1.68 +    SETUP := GENERATE_NEWBYTECODE_DEBUG, \
    1.69 +    SRC := $(NASGEN_SRC) $(ASM_SRC), \
    1.70 +    BIN := $(NASHORN_OUTPUTDIR)/nasgen_classes, \
    1.71 +    ADD_JAVAC_FLAGS := -cp $(NASHORN_OUTPUTDIR)/nashorn_classes))
    1.72 +
    1.73 +# Nasgen needs nashorn classes
    1.74 +$(BUILD_NASGEN): $(BUILD_NASHORN)
    1.75 +
    1.76 +# Copy classes to final classes dir and run nasgen to modify classes in jdk.nashorn.internal.objects package
    1.77 +$(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run: $(BUILD_NASGEN)
    1.78 +	$(ECHO) Running nasgen
    1.79 +	$(MKDIR) -p $(@D)
    1.80 +	$(RM) -rf $(@D)/jdk $(@D)/netscape
    1.81 +	$(CP) -R -p $(NASHORN_OUTPUTDIR)/nashorn_classes/* $(@D)/
    1.82 +	$(FIXPATH) $(JAVA) \
    1.83 +	    -cp "$(NASHORN_OUTPUTDIR)/nasgen_classes$(PATH_SEP)$(NASHORN_OUTPUTDIR)/nashorn_classes" \
    1.84 +	    jdk.nashorn.internal.tools.nasgen.Main $(@D) jdk.nashorn.internal.objects $(@D)
    1.85 +	$(TOUCH) $@
    1.86 +
    1.87 +# Version file needs to be processed with version numbers
    1.88 +VERSION_FILE := $(NASHORN_OUTPUTDIR)/classes/jdk/nashorn/internal/runtime/resources/version.properties
    1.89 +
    1.90 +# Needs to happen after nasgen run since nasgen run deletes it
    1.91 +$(VERSION_FILE): $(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run
    1.92 +$(VERSION_FILE): $(NASHORN_TOPDIR)/src/jdk/nashorn/internal/runtime/resources/version.properties-template
    1.93 +	$(ECHO) Creating version.properties
    1.94 +	$(MKDIR) -p $(@D)
    1.95 +	$(CAT) $< | $(SED) -e 's/$$(FULL_VERSION)/$(NASHORN_FULL_VERSION)/g' \
    1.96 +	    -e 's/$$(RELEASE)/$(NASHORN_VERSION)/g' \
    1.97 +	    -e '/^#.*$$/d' -e '/^$$/d'  > $@
    1.98 +
    1.99 +
   1.100 +MANIFEST_ATTRIBUTES := Name: jdk/nashorn/\nImplementation-Title: Oracle Nashorn\nImplementation-Version: $(NASHORN_FULL_VERSION)
   1.101 +
   1.102 +# Create nashorn.jar from the final classes dir
   1.103 +$(eval $(call SetupArchive,BUILD_NASHORN_JAR, \
   1.104 +    $(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run \
   1.105 +    $(VERSION_FILE), \
   1.106 +    SRCS := $(NASHORN_OUTPUTDIR)/classes, \
   1.107 +    SUFFIXES := .class .js .properties Factory, \
   1.108 +    MANIFEST := $(NASHORN_TOPDIR)/src/META-INF/MANIFEST.MF, \
   1.109 +    EXTRA_MANIFEST_ATTR := $(MANIFEST_ATTRIBUTES), \
   1.110 +    SKIP_METAINF := true, \
   1.111 +    JAR := $(NASHORN_JAR)))
   1.112 +
   1.113 +all: $(NASHORN_JAR)
   1.114 +
   1.115 +.PHONY: all
     2.1 --- a/make/Makefile	Tue Nov 12 10:23:42 2013 +0530
     2.2 +++ b/make/Makefile	Mon Nov 04 11:11:03 2013 +0100
     2.3 @@ -1,5 +1,5 @@
     2.4  #
     2.5 -# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
     2.6 +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
     2.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8  #
     2.9  # This code is free software; you can redistribute it and/or modify it
    2.10 @@ -23,37 +23,27 @@
    2.11  # questions.
    2.12  #
    2.13  
    2.14 -#
    2.15 -# On Solaris, the standard 'make' utility will not work with these makefiles.
    2.16 -#    This little rule is only understood by Solaris make, and is harmless
    2.17 -#    when seen by the GNU make tool. If using Solaris make, this causes the
    2.18 -#    make command to fail.
    2.19 -#
    2.20 -SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
    2.21 +# Locate this Makefile
    2.22 +ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
    2.23 +  makefile_path := $(CURDIR)/$(lastword $(MAKEFILE_LIST))
    2.24 +else
    2.25 +  makefile_path := $(lastword $(MAKEFILE_LIST))
    2.26 +endif
    2.27 +repo_dir := $(patsubst %/make/Makefile, %, $(makefile_path))
    2.28  
    2.29 +# What is the name of this subsystem (langtools, corba, etc)?
    2.30 +subsystem_name := $(notdir $(repo_dir))
    2.31  
    2.32 -# Default target and expected 'do everything' target
    2.33 +# Try to locate top-level makefile
    2.34 +top_level_makefile := $(repo_dir)/../Makefile
    2.35 +ifneq ($(wildcard $(top_level_makefile)), )
    2.36 +  $(info Will run $(subsystem_name) target on top-level Makefile)
    2.37 +  $(info WARNING: This is a non-recommended way of building!)
    2.38 +  $(info ===================================================)
    2.39 +else
    2.40 +  $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?)
    2.41 +  $(error Build from top-level Makefile instead)
    2.42 +endif
    2.43 +
    2.44  all:
    2.45 -	echo Nashorn can only be built with NEWBUILD=true
    2.46 -
    2.47 -# Standard make clobber target
    2.48 -clobber:
    2.49 -
    2.50 -#-------------------------------------------------------------------
    2.51 -#
    2.52 -# Targets for Oracle's internal JPRT build system
    2.53 -
    2.54 -CD = cd
    2.55 -ZIP = zip
    2.56 -
    2.57 -JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
    2.58 -
    2.59 -jprt_build_product jprt_build_debug jprt_build_fastdebug: all
    2.60 -	( $(CD) $(OUTPUTDIR) && \
    2.61 -	  $(ZIP) -q -r $(JPRT_ARCHIVE_BUNDLE) build dist )
    2.62 -
    2.63 -#-------------------------------------------------------------------
    2.64 -
    2.65 -# Declare these phony (not filenames)
    2.66 -.PHONY: $(ANT_TARGETS) all clobber \
    2.67 -	jprt_build_product jprt_build_debug jprt_build_fastdebug
    2.68 +	@$(MAKE) -f $(top_level_makefile) $(subsystem_name)
     3.1 --- a/makefiles/BuildNashorn.gmk	Tue Nov 12 10:23:42 2013 +0530
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,112 +0,0 @@
     3.4 -#
     3.5 -# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
     3.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.7 -#
     3.8 -# This code is free software; you can redistribute it and/or modify it
     3.9 -# under the terms of the GNU General Public License version 2 only, as
    3.10 -# published by the Free Software Foundation.  Oracle designates this
    3.11 -# particular file as subject to the "Classpath" exception as provided
    3.12 -# by Oracle in the LICENSE file that accompanied this code.
    3.13 -#
    3.14 -# This code is distributed in the hope that it will be useful, but WITHOUT
    3.15 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    3.16 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    3.17 -# version 2 for more details (a copy is included in the LICENSE file that
    3.18 -# accompanied this code).
    3.19 -#
    3.20 -# You should have received a copy of the GNU General Public License version
    3.21 -# 2 along with this work; if not, write to the Free Software Foundation,
    3.22 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    3.23 -#
    3.24 -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    3.25 -# or visit www.oracle.com if you need additional information or have any
    3.26 -# questions.
    3.27 -#
    3.28 -
    3.29 -# This must be the first rule
    3.30 -default: all
    3.31 -
    3.32 --include $(SPEC)
    3.33 -include MakeBase.gmk
    3.34 -include JavaCompilation.gmk
    3.35 -
    3.36 -JDK_CLASSES := $(JDK_OUTPUTDIR)/classes
    3.37 -
    3.38 -NASHORN_JAR := $(NASHORN_DIST)/nashorn.jar
    3.39 -NASHORN_VERSION := $(JDK_VERSION)
    3.40 -NASHORN_FULL_VERSION := $(FULL_VERSION)
    3.41 -
    3.42 -ifdef MILESTONE
    3.43 -  ifeq ($(MILESTONE), internal)
    3.44 -    NASHORN_VERSION = $(FULL_VERSION)
    3.45 -  endif
    3.46 -endif
    3.47 -
    3.48 -# Need to use source and target 7 for nasgen to work.
    3.49 -$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
    3.50 -    JVM := $(JAVA), \
    3.51 -    JAVAC := $(NEW_JAVAC), \
    3.52 -    FLAGS := -g -source 7 -target 7 -bootclasspath $(JDK_CLASSES), \
    3.53 -    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
    3.54 -    SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
    3.55 -
    3.56 -# Build nashorn into intermediate directory
    3.57 -$(eval $(call SetupJavaCompilation,BUILD_NASHORN, \
    3.58 -    SETUP := GENERATE_NEWBYTECODE_DEBUG, \
    3.59 -    SRC := $(NASHORN_TOPDIR)/src, \
    3.60 -    COPY := .properties .js, \
    3.61 -    BIN := $(NASHORN_OUTPUTDIR)/nashorn_classes))
    3.62 -
    3.63 -NASGEN_SRC := $(NASHORN_TOPDIR)/buildtools/nasgen/src
    3.64 -ASM_SRC := $(JDK_TOPDIR)/src/share/classes/jdk/internal/org/objectweb/asm
    3.65 -
    3.66 -# Build nasgen
    3.67 -$(eval $(call SetupJavaCompilation,BUILD_NASGEN, \
    3.68 -    SETUP := GENERATE_NEWBYTECODE_DEBUG, \
    3.69 -    SRC := $(NASGEN_SRC) $(ASM_SRC), \
    3.70 -    BIN := $(NASHORN_OUTPUTDIR)/nasgen_classes, \
    3.71 -    ADD_JAVAC_FLAGS := -cp $(NASHORN_OUTPUTDIR)/nashorn_classes))
    3.72 -
    3.73 -# Nasgen needs nashorn classes
    3.74 -$(BUILD_NASGEN): $(BUILD_NASHORN)
    3.75 -
    3.76 -# Copy classes to final classes dir and run nasgen to modify classes in jdk.nashorn.internal.objects package
    3.77 -$(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run: $(BUILD_NASGEN)
    3.78 -	$(ECHO) Running nasgen
    3.79 -	$(MKDIR) -p $(@D)
    3.80 -	$(RM) -rf $(@D)/jdk $(@D)/netscape
    3.81 -	$(CP) -R -p $(NASHORN_OUTPUTDIR)/nashorn_classes/* $(@D)/
    3.82 -	$(FIXPATH) $(JAVA) \
    3.83 -	    -cp "$(NASHORN_OUTPUTDIR)/nasgen_classes$(PATH_SEP)$(NASHORN_OUTPUTDIR)/nashorn_classes" \
    3.84 -	    jdk.nashorn.internal.tools.nasgen.Main $(@D) jdk.nashorn.internal.objects $(@D)
    3.85 -	$(TOUCH) $@
    3.86 -
    3.87 -# Version file needs to be processed with version numbers
    3.88 -VERSION_FILE := $(NASHORN_OUTPUTDIR)/classes/jdk/nashorn/internal/runtime/resources/version.properties
    3.89 -
    3.90 -# Needs to happen after nasgen run since nasgen run deletes it
    3.91 -$(VERSION_FILE): $(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run
    3.92 -$(VERSION_FILE): $(NASHORN_TOPDIR)/src/jdk/nashorn/internal/runtime/resources/version.properties-template
    3.93 -	$(ECHO) Creating version.properties
    3.94 -	$(MKDIR) -p $(@D)
    3.95 -	$(CAT) $< | $(SED) -e 's/$$(FULL_VERSION)/$(NASHORN_FULL_VERSION)/g' \
    3.96 -	    -e 's/$$(RELEASE)/$(NASHORN_VERSION)/g' \
    3.97 -	    -e '/^#.*$$/d' -e '/^$$/d'  > $@
    3.98 -
    3.99 -
   3.100 -MANIFEST_ATTRIBUTES := Name: jdk/nashorn/\nImplementation-Title: Oracle Nashorn\nImplementation-Version: $(NASHORN_FULL_VERSION)
   3.101 -
   3.102 -# Create nashorn.jar from the final classes dir
   3.103 -$(eval $(call SetupArchive,BUILD_NASHORN_JAR, \
   3.104 -    $(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run \
   3.105 -    $(VERSION_FILE), \
   3.106 -    SRCS := $(NASHORN_OUTPUTDIR)/classes, \
   3.107 -    SUFFIXES := .class .js .properties Factory, \
   3.108 -    MANIFEST := $(NASHORN_TOPDIR)/src/META-INF/MANIFEST.MF, \
   3.109 -    EXTRA_MANIFEST_ATTR := $(MANIFEST_ATTRIBUTES), \
   3.110 -    SKIP_METAINF := true, \
   3.111 -    JAR := $(NASHORN_JAR)))
   3.112 -
   3.113 -all: $(NASHORN_JAR)
   3.114 -
   3.115 -.PHONY: all
     4.1 --- a/makefiles/Makefile	Tue Nov 12 10:23:42 2013 +0530
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,49 +0,0 @@
     4.4 -#
     4.5 -# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
     4.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.7 -#
     4.8 -# This code is free software; you can redistribute it and/or modify it
     4.9 -# under the terms of the GNU General Public License version 2 only, as
    4.10 -# published by the Free Software Foundation.  Oracle designates this
    4.11 -# particular file as subject to the "Classpath" exception as provided
    4.12 -# by Oracle in the LICENSE file that accompanied this code.
    4.13 -#
    4.14 -# This code is distributed in the hope that it will be useful, but WITHOUT
    4.15 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    4.16 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    4.17 -# version 2 for more details (a copy is included in the LICENSE file that
    4.18 -# accompanied this code).
    4.19 -#
    4.20 -# You should have received a copy of the GNU General Public License version
    4.21 -# 2 along with this work; if not, write to the Free Software Foundation,
    4.22 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    4.23 -#
    4.24 -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    4.25 -# or visit www.oracle.com if you need additional information or have any
    4.26 -# questions.
    4.27 -#
    4.28 -
    4.29 -# Locate this Makefile
    4.30 -ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
    4.31 -  makefile_path := $(CURDIR)/$(lastword $(MAKEFILE_LIST))
    4.32 -else
    4.33 -  makefile_path := $(lastword $(MAKEFILE_LIST))
    4.34 -endif
    4.35 -repo_dir := $(patsubst %/makefiles/Makefile, %, $(makefile_path))
    4.36 -
    4.37 -# What is the name of this subsystem (langtools, corba, etc)?
    4.38 -subsystem_name := $(notdir $(repo_dir))
    4.39 -
    4.40 -# Try to locate top-level makefile
    4.41 -top_level_makefile := $(repo_dir)/../common/makefiles/Makefile
    4.42 -ifneq ($(wildcard $(top_level_makefile)), )
    4.43 -  $(info Will run $(subsystem_name) target on top-level Makefile)
    4.44 -  $(info WARNING: This is a non-recommended way of building!)
    4.45 -  $(info ===================================================)
    4.46 -else
    4.47 -  $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?)
    4.48 -  $(error Build from top-level Makefile instead)
    4.49 -endif
    4.50 -
    4.51 -all:
    4.52 -	@$(MAKE) -f $(top_level_makefile) $(subsystem_name)

mercurial