< prev index next >

hotspot/make/bsd/makefiles/buildtree.make

Print this page


   1 #
   2 # Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #
  23 #
  24 
  25 # Usage:
  26 #
  27 # $(MAKE) -f buildtree.make SRCARCH=srcarch BUILDARCH=buildarch LIBARCH=libarch
  28 #         GAMMADIR=dir OS_FAMILY=os VARIANT=variant
  29 #
  30 # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
  31 # environment or on the command-line:
  32 #
  33 # ARCH          - sparc, i486, ... HotSpot cpu and os_cpu source directory
  34 # BUILDARCH     - build directory
  35 # LIBARCH       - the corresponding directory in JDK/JRE
  36 # GAMMADIR      - top of workspace
  37 # OS_FAMILY     - operating system
  38 # VARIANT       - core, compiler1, compiler2, or tiered
  39 # HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
  40 # HOTSPOT_BUILD_VERSION   - internal, internal-$(USER_RELEASE_SUFFIX) or empty
  41 # JRE_RELEASE_VERSION     - <major>.<minor>.<micro> (1.7.0)
  42 #
  43 # Builds the directory trees with makefiles plus some convenience files in
  44 # each directory:
  45 #
  46 # Makefile      - for "make foo"
  47 # flags.make    - with macro settings
  48 # vm.make       - to support making "$(MAKE) -v vm.make" in makefiles
  49 # adlc.make     -
  50 # trace.make    - generate tracing event and type definitions
  51 # jvmti.make    - generate JVMTI bindings from the spec (JSR-163)
  52 # sa.make       - generate SA jar file and natives
  53 #
  54 # The makefiles are split this way so that "make foo" will run faster by not
  55 # having to read the dependency files for the vm.
  56 
  57 # needs to be set here since this Makefile doesn't include defs.make
  58 OS_VENDOR:=$(shell uname -s)
  59 
  60 -include $(SPEC)
  61 include $(GAMMADIR)/make/scm.make


 120         $(PLATFORM_DIR)/generated/dependencies \
 121         $(PLATFORM_DIR)/generated/adfiles \
 122         $(PLATFORM_DIR)/generated/jvmtifiles \
 123         $(PLATFORM_DIR)/generated/tracefiles \
 124         $(PLATFORM_DIR)/generated/dtracefiles
 125 
 126 TARGETS      = debug fastdebug optimized product
 127 SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
 128 
 129 # For dependencies and recursive makes.
 130 BUILDTREE_MAKE  = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
 131 
 132 # dtrace.make is used on BSD versions that implement Dtrace (like MacOS X)
 133 BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make dtrace.make
 134 
 135 BUILDTREE_VARS  = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
 136         SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
 137 
 138 # Define variables to be set in flags.make.
 139 # Default values are set in make/defs.make.
 140 ifeq ($(HOTSPOT_BUILD_VERSION),)
 141   HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
 142 else
 143   HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
 144 endif
 145 # Set BUILD_USER from system-dependent hints:  $LOGNAME, $(whoami)
 146 ifndef HOTSPOT_BUILD_USER
 147   HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
 148 endif
 149 ifndef HOTSPOT_BUILD_USER
 150   HOTSPOT_BUILD_USER := $(shell whoami)
 151 endif
 152 # Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
 153 # or make/hotspot_distro.
 154 ifndef HOTSPOT_VM_DISTRO
 155   ifeq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
 156     include $(GAMMADIR)/make/hotspot_distro
 157   else
 158     include $(GAMMADIR)/make/openjdk_distro
 159   endif
 160 endif
 161 
 162 # if hotspot-only build and/or OPENJDK isn't passed down, need to set OPENJDK
 163 ifndef OPENJDK
 164   ifneq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
 165     OPENJDK=true
 166   endif
 167 endif
 168 
 169 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION=  JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
 170 
 171 BUILDTREE       = \
 172         $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
 173 
 174 BUILDTREE_COMMENT       = echo "\# Generated by $(BUILDTREE_MAKE)"
 175 
 176 all:  $(SUBMAKE_DIRS)
 177 
 178 # Run make in each subdirectory recursively.
 179 $(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE
 180         $(QUIETLY) [ -d $@ ] || { mkdir -p $@; }
 181         +$(QUIETLY) cd $@ && $(BUILDTREE) TARGET=$(@F)
 182         $(QUIETLY) touch $@
 183 
 184 $(SIMPLE_DIRS):
 185         $(QUIETLY) mkdir -p $@
 186 
 187 # Convenience macro which takes a source relative path, applies $(1) to the
 188 # absolute path, and then replaces $(GAMMADIR) in the result with a
 189 # literal "$(GAMMADIR)/" suitable for inclusion in a Makefile.


 199 DATA_MODE/amd64 = 64
 200 
 201 DATA_MODE = $(DATA_MODE/$(BUILDARCH))
 202 
 203 flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
 204         @echo $(LOG_INFO) Creating $@ ...
 205         $(QUIETLY) ( \
 206         $(BUILDTREE_COMMENT); \
 207         echo; \
 208         echo "Platform_file = $(PLATFORM_FILE)" | sed 's|$(GAMMADIR)|$$(GAMMADIR)|'; \
 209         sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \
 210         echo; \
 211         echo "GAMMADIR = $(GAMMADIR)"; \
 212         echo "HS_ALT_MAKE = $(HS_ALT_MAKE)"; \
 213         echo "OSNAME = $(OSNAME)"; \
 214         echo "SYSDEFS = \$$(Platform_sysdefs)"; \
 215         echo "SRCARCH = $(SRCARCH)"; \
 216         echo "BUILDARCH = $(BUILDARCH)"; \
 217         echo "LIBARCH = $(LIBARCH)"; \
 218         echo "TARGET = $(TARGET)"; \
 219         echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \
 220         echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \
 221         echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
 222         echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 223         echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
 224         echo "OPENJDK = $(OPENJDK)"; \
 225         echo "$(LP64_SETTING/$(DATA_MODE))"; \
 226         echo; \
 227         echo "# Used for platform dispatching"; \
 228         echo "TARGET_DEFINES  = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
 229         echo "TARGET_DEFINES += -DTARGET_ARCH_\$$(Platform_arch)"; \
 230         echo "TARGET_DEFINES += -DTARGET_ARCH_MODEL_\$$(Platform_arch_model)"; \
 231         echo "TARGET_DEFINES += -DTARGET_OS_ARCH_\$$(Platform_os_arch)"; \
 232         echo "TARGET_DEFINES += -DTARGET_OS_ARCH_MODEL_\$$(Platform_os_arch_model)"; \
 233         echo "TARGET_DEFINES += -DTARGET_COMPILER_\$$(Platform_compiler)"; \
 234         echo "CFLAGS += \$$(TARGET_DEFINES)"; \
 235         echo; \
 236         echo "Src_Dirs_V = \\"; \
 237         sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
 238         echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \
 239         echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \
 240         echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
 241         echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \


   1 #
   2 # Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #
  23 #
  24 
  25 # Usage:
  26 #
  27 # $(MAKE) -f buildtree.make SRCARCH=srcarch BUILDARCH=buildarch LIBARCH=libarch
  28 #         GAMMADIR=dir OS_FAMILY=os VARIANT=variant
  29 #
  30 # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
  31 # environment or on the command-line:
  32 #
  33 # ARCH          - sparc, i486, ... HotSpot cpu and os_cpu source directory
  34 # BUILDARCH     - build directory
  35 # LIBARCH       - the corresponding directory in JDK/JRE
  36 # GAMMADIR      - top of workspace
  37 # OS_FAMILY     - operating system
  38 # VARIANT       - core, compiler1, compiler2, or tiered
  39 # VERSION_STRING - the JDK version string as specified by JEP-223
  40 # HOTSPOT_VERSION_STRING - the same as VERSION_STRING, unless overridden by a standalone build

  41 #
  42 # Builds the directory trees with makefiles plus some convenience files in
  43 # each directory:
  44 #
  45 # Makefile      - for "make foo"
  46 # flags.make    - with macro settings
  47 # vm.make       - to support making "$(MAKE) -v vm.make" in makefiles
  48 # adlc.make     -
  49 # trace.make    - generate tracing event and type definitions
  50 # jvmti.make    - generate JVMTI bindings from the spec (JSR-163)
  51 # sa.make       - generate SA jar file and natives
  52 #
  53 # The makefiles are split this way so that "make foo" will run faster by not
  54 # having to read the dependency files for the vm.
  55 
  56 # needs to be set here since this Makefile doesn't include defs.make
  57 OS_VENDOR:=$(shell uname -s)
  58 
  59 -include $(SPEC)
  60 include $(GAMMADIR)/make/scm.make


 119         $(PLATFORM_DIR)/generated/dependencies \
 120         $(PLATFORM_DIR)/generated/adfiles \
 121         $(PLATFORM_DIR)/generated/jvmtifiles \
 122         $(PLATFORM_DIR)/generated/tracefiles \
 123         $(PLATFORM_DIR)/generated/dtracefiles
 124 
 125 TARGETS      = debug fastdebug optimized product
 126 SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
 127 
 128 # For dependencies and recursive makes.
 129 BUILDTREE_MAKE  = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
 130 
 131 # dtrace.make is used on BSD versions that implement Dtrace (like MacOS X)
 132 BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make dtrace.make
 133 
 134 BUILDTREE_VARS  = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
 135         SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
 136 
 137 # Define variables to be set in flags.make.
 138 # Default values are set in make/defs.make.
 139 




 140 # Set BUILD_USER from system-dependent hints:  $LOGNAME, $(whoami)
 141 ifndef HOTSPOT_BUILD_USER
 142   HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
 143 endif
 144 ifndef HOTSPOT_BUILD_USER
 145   HOTSPOT_BUILD_USER := $(shell whoami)
 146 endif
 147 # Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
 148 # or make/hotspot_distro.
 149 ifndef HOTSPOT_VM_DISTRO
 150   ifeq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
 151     include $(GAMMADIR)/make/hotspot_distro
 152   else
 153     include $(GAMMADIR)/make/openjdk_distro
 154   endif
 155 endif
 156 
 157 # if hotspot-only build and/or OPENJDK isn't passed down, need to set OPENJDK
 158 ifndef OPENJDK
 159   ifneq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
 160     OPENJDK=true
 161   endif
 162 endif
 163 
 164 BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
 165 
 166 BUILDTREE       = \
 167         $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
 168 
 169 BUILDTREE_COMMENT       = echo "\# Generated by $(BUILDTREE_MAKE)"
 170 
 171 all:  $(SUBMAKE_DIRS)
 172 
 173 # Run make in each subdirectory recursively.
 174 $(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE
 175         $(QUIETLY) [ -d $@ ] || { mkdir -p $@; }
 176         +$(QUIETLY) cd $@ && $(BUILDTREE) TARGET=$(@F)
 177         $(QUIETLY) touch $@
 178 
 179 $(SIMPLE_DIRS):
 180         $(QUIETLY) mkdir -p $@
 181 
 182 # Convenience macro which takes a source relative path, applies $(1) to the
 183 # absolute path, and then replaces $(GAMMADIR) in the result with a
 184 # literal "$(GAMMADIR)/" suitable for inclusion in a Makefile.


 194 DATA_MODE/amd64 = 64
 195 
 196 DATA_MODE = $(DATA_MODE/$(BUILDARCH))
 197 
 198 flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
 199         @echo $(LOG_INFO) Creating $@ ...
 200         $(QUIETLY) ( \
 201         $(BUILDTREE_COMMENT); \
 202         echo; \
 203         echo "Platform_file = $(PLATFORM_FILE)" | sed 's|$(GAMMADIR)|$$(GAMMADIR)|'; \
 204         sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \
 205         echo; \
 206         echo "GAMMADIR = $(GAMMADIR)"; \
 207         echo "HS_ALT_MAKE = $(HS_ALT_MAKE)"; \
 208         echo "OSNAME = $(OSNAME)"; \
 209         echo "SYSDEFS = \$$(Platform_sysdefs)"; \
 210         echo "SRCARCH = $(SRCARCH)"; \
 211         echo "BUILDARCH = $(BUILDARCH)"; \
 212         echo "LIBARCH = $(LIBARCH)"; \
 213         echo "TARGET = $(TARGET)"; \
 214         echo "HOTSPOT_VERSION_STRING = $(HOTSPOT_VERSION_STRING)"; \
 215         echo "VERSION_STRING = $(VERSION_STRING)"; \
 216         echo "SA_BUILD_VERSION = $(HOTSPOT_VERSION_STRING)"; \
 217         echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 218         echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
 219         echo "OPENJDK = $(OPENJDK)"; \
 220         echo "$(LP64_SETTING/$(DATA_MODE))"; \
 221         echo; \
 222         echo "# Used for platform dispatching"; \
 223         echo "TARGET_DEFINES  = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
 224         echo "TARGET_DEFINES += -DTARGET_ARCH_\$$(Platform_arch)"; \
 225         echo "TARGET_DEFINES += -DTARGET_ARCH_MODEL_\$$(Platform_arch_model)"; \
 226         echo "TARGET_DEFINES += -DTARGET_OS_ARCH_\$$(Platform_os_arch)"; \
 227         echo "TARGET_DEFINES += -DTARGET_OS_ARCH_MODEL_\$$(Platform_os_arch_model)"; \
 228         echo "TARGET_DEFINES += -DTARGET_COMPILER_\$$(Platform_compiler)"; \
 229         echo "CFLAGS += \$$(TARGET_DEFINES)"; \
 230         echo; \
 231         echo "Src_Dirs_V = \\"; \
 232         sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
 233         echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \
 234         echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \
 235         echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
 236         echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \


< prev index next >