< prev index next >

./Makefile

Print this page




  31 # affected, however. This is required for correct dependency management.
  32 .NOTPARALLEL:
  33 
  34 # The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
  35 # /usr/ccs/bin/make lacks basically every other flow control mechanism.
  36 .TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
  37 
  38 # Assume we have GNU make, but check version.
  39 ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), )
  40   $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
  41 endif
  42 
  43 # Locate this Makefile
  44 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
  45   makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
  46 else
  47   makefile_path:=$(lastword $(MAKEFILE_LIST))
  48 endif
  49 root_dir:=$(patsubst %/,%,$(dir $(makefile_path)))
  50 











  51 ifneq ($(findstring qp,$(MAKEFLAGS)),)
  52   # When called with -qp, assume an external part (e.g. bash completion) is trying
  53   # to understand our targets.
  54   # Duplication of global targets, needed before ParseConfAndSpec in case we have
  55   # no configurations.
  56   help:
  57   # If both CONF and SPEC are unset, look for all available configurations by
  58   # setting CONF to the empty string.
  59   ifeq ($(SPEC), )
  60     CONF?=
  61   endif
  62 endif
  63 
  64 # ... and then we can include our helper functions
  65 include $(root_dir)/make/MakeHelpers.gmk
  66 
  67 $(eval $(call ParseLogLevel))
  68 $(eval $(call ParseConfAndSpec))
  69 
  70 # Now determine if we have zero, one or several configurations to build.


 131         ifneq ($(SEQUENTIAL_TARGETS), )
 132           (cd $(SRC_ROOT)/make && $(MAKE) -f Main.gmk SPEC=$(SPEC) -j 1 \
 133               $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(SEQUENTIAL_TARGETS))
 134         endif
 135         ifneq ($(PARALLEL_TARGETS), )
 136           @$(call AtMakeStart)
 137           (cd $(SRC_ROOT)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -f Main.gmk SPEC=$(SPEC) -j $(JOBS) \
 138               $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(PARALLEL_TARGETS) \
 139               $(if $(filter true, $(OUTPUT_SYNC_SUPPORTED)), -O$(OUTPUT_SYNC)))
 140           @$(call AtMakeEnd)
 141         endif
 142 
 143      .PHONY: main-wrapper
 144 
 145    endif
 146 endif
 147 
 148 # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
 149 # If you add more global targets, please update the variable global_targets in MakeHelpers.
 150 



 151 help:
 152         $(info )
 153         $(info OpenJDK Makefile help)
 154         $(info =====================)
 155         $(info )
 156         $(info Common make targets)
 157         $(info .  make [default]         # Compile all modules in langtools, hotspot, jaxp, jaxws,)
 158         $(info .                         # corba and jdk and create a runnable "exploded" image)
 159         $(info .  make all               # Compile everything, all repos, docs and images)
 160         $(info .  make images            # Create complete jdk and jre images)
 161         $(info .  make <phase>           # Compile the specified phase and everything it depends on)
 162         $(info .                         # (gensrc, java, copy, libs, launchers, gendata, rmic))
 163         $(info .  make *-only            # Applies to most targets and disables compling the)
 164         $(info .                         # dependencies for the target. This is faster but may)
 165         $(info .                         # result in incorrect build results!)
 166         $(info .  make docs              # Create all docs)
 167         $(info .  make docs-javadoc      # Create just javadocs, depends on less than full docs)
 168         $(info .  make profiles          # Create complete jre compact profile images)
 169         $(info .  make bootcycle-images  # Build images twice, second time with newly built JDK)
 170         $(info .  make install           # Install the generated images locally)
 171         $(info .  make reconfigure       # Rerun configure with the same arguments as last time)
 172         $(info .  make help              # Give some help on using make)
 173         $(info .  make test              # Run tests, default is all tests (see TEST below))
 174         $(info )
 175         $(info Targets for cleaning)
 176         $(info .  make clean             # Remove all files generated by make, but not those)
 177         $(info .                         # generated by configure)
 178         $(info .  make dist-clean        # Remove all files, including configuration)
 179         $(info .  make clean-<outputdir> # Remove the subdir in the output dir with the name)
 180         $(info .  make clean-<phase>     # Remove all build results related to a certain build)
 181         $(info .                         # phase (gensrc, java, libs, launchers))
 182         $(info .  make clean-<module>    # Remove all build results related to a certain module)
 183         $(info .  make clean-<module>-<phase> # Remove all build results related to a certain)
 184         $(info .                         # module and phase)
 185         $(info )
 186         $(info Targets for specific modules)
 187         $(info .  make <module>          # Build <module> and everything it depends on. )
 188         $(info .  make <module>-<phase>  # Compile the specified phase for the specified module)
 189         $(info .                         # and everything it depends on)
 190         $(info .                         # (gensrc, java, copy, libs, launchers, gendata, rmic))
 191         $(info )
 192         $(info Useful make variables)
 193         $(info .  make CONF=             # Build all configurations (note, assignment is empty))
 194         $(info .  make CONF=<substring>  # Build the configuration(s) with a name matching)
 195         $(info .                         # <substring>)
 196         $(info )
 197         $(info .  make LOG=<loglevel>    # Change the log level from warn to <loglevel>)
 198         $(info .                         # Available log levels are:)
 199         $(info .                         # 'warn' (default), 'info', 'debug' and 'trace')
 200         $(info .                         # To see executed command lines, use LOG=debug)
 201         $(info )
 202         $(info .  make JOBS=<n>          # Run <n> parallel make jobs)
 203         $(info .                         # Note that -jN does not work as expected!)
 204         $(info )
 205         $(info .  make test TEST=<test>  # Only run the given test or tests, e.g.)
 206         $(info .                         # make test TEST="jdk_lang jdk_net")
 207         $(info )
 208 
 209 .PHONY: help


  31 # affected, however. This is required for correct dependency management.
  32 .NOTPARALLEL:
  33 
  34 # The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
  35 # /usr/ccs/bin/make lacks basically every other flow control mechanism.
  36 .TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
  37 
  38 # Assume we have GNU make, but check version.
  39 ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), )
  40   $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
  41 endif
  42 
  43 # Locate this Makefile
  44 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
  45   makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
  46 else
  47   makefile_path:=$(lastword $(MAKEFILE_LIST))
  48 endif
  49 root_dir:=$(patsubst %/,%,$(dir $(makefile_path)))
  50 
  51 ifeq ($(MAIN_TARGETS), )
  52   COMMAND_LINE_VARIABLES:=$(subst =command,,$(filter %=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var))))))
  53   MAKE_CONTROL_VARIABLES:=LOG CONF SPEC JOBS TEST IGNORE_OLD_CONFIG
  54   UNKNOWN_COMMAND_LINE_VARIABLES:=$(strip $(filter-out $(MAKE_CONTROL_VARIABLES), $(COMMAND_LINE_VARIABLES)))
  55   ifneq ($(UNKNOWN_COMMAND_LINE_VARIABLES), )
  56     $(info Note: Command line contains non-control variables: $(UNKNOWN_COMMAND_LINE_VARIABLES).)
  57     $(info Make sure it is not mistyped, and that you intend to override this variable.)
  58     $(info 'make help' will list known control variables)
  59   endif
  60 endif
  61 
  62 ifneq ($(findstring qp,$(MAKEFLAGS)),)
  63   # When called with -qp, assume an external part (e.g. bash completion) is trying
  64   # to understand our targets.
  65   # Duplication of global targets, needed before ParseConfAndSpec in case we have
  66   # no configurations.
  67   help:
  68   # If both CONF and SPEC are unset, look for all available configurations by
  69   # setting CONF to the empty string.
  70   ifeq ($(SPEC), )
  71     CONF?=
  72   endif
  73 endif
  74 
  75 # ... and then we can include our helper functions
  76 include $(root_dir)/make/MakeHelpers.gmk
  77 
  78 $(eval $(call ParseLogLevel))
  79 $(eval $(call ParseConfAndSpec))
  80 
  81 # Now determine if we have zero, one or several configurations to build.


 142         ifneq ($(SEQUENTIAL_TARGETS), )
 143           (cd $(SRC_ROOT)/make && $(MAKE) -f Main.gmk SPEC=$(SPEC) -j 1 \
 144               $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(SEQUENTIAL_TARGETS))
 145         endif
 146         ifneq ($(PARALLEL_TARGETS), )
 147           @$(call AtMakeStart)
 148           (cd $(SRC_ROOT)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -f Main.gmk SPEC=$(SPEC) -j $(JOBS) \
 149               $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(PARALLEL_TARGETS) \
 150               $(if $(filter true, $(OUTPUT_SYNC_SUPPORTED)), -O$(OUTPUT_SYNC)))
 151           @$(call AtMakeEnd)
 152         endif
 153 
 154      .PHONY: main-wrapper
 155 
 156    endif
 157 endif
 158 
 159 # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
 160 # If you add more global targets, please update the variable global_targets in MakeHelpers.
 161 
 162 # Helper macro to allow $(info) to properly print strings beginning with spaces.
 163 _:=
 164 
 165 help:
 166         $(info )
 167         $(info OpenJDK Makefile help)
 168         $(info =====================)
 169         $(info )
 170         $(info Common make targets)
 171         $(info $(_) make [default]         # Compile all modules in langtools, hotspot, jdk, jaxws,)
 172         $(info $(_)                        # jaxp and corba, and create a runnable "exploded" image)
 173         $(info $(_) make all               # Compile everything, all repos, docs and images)
 174         $(info $(_) make images            # Create complete j2sdk and j2re images)
 175         $(info $(_) make <phase>           # Build the specified phase and everything it depends on)
 176         $(info $(_)                        # (gensrc, java, copy, libs, launchers, gendata, rmic))
 177         $(info $(_) make *-only            # Applies to most targets and disables compling the)
 178         $(info $(_)                        # dependencies for the target. This is faster but may)
 179         $(info $(_)                        # result in incorrect build results!)
 180         $(info $(_) make docs              # Create all docs)
 181         $(info $(_) make docs-javadoc      # Create just javadocs, depends on less than full docs)
 182         $(info $(_) make profiles          # Create complete j2re compact profile images)
 183         $(info $(_) make bootcycle-images  # Build images twice, second time with newly built JDK)
 184         $(info $(_) make install           # Install the generated images locally)
 185         $(info $(_) make reconfigure       # Rerun configure with the same arguments as last time)
 186         $(info $(_) make help              # Give some help on using make)
 187         $(info $(_) make test              # Run tests, default is all tests (see TEST below))
 188         $(info )
 189         $(info Targets for cleaning)
 190         $(info $(_) make clean             # Remove all files generated by make, but not those)
 191         $(info $(_)                        # generated by configure)
 192         $(info $(_) make dist-clean        # Remove all files, including configuration)
 193         $(info $(_) make clean-<outputdir> # Remove the subdir in the output dir with the name)
 194         $(info $(_) make clean-<phase>     # Remove all build results related to a certain build)
 195         $(info $(_)                        # phase (gensrc, java, libs, launchers))
 196         $(info $(_) make clean-<module>    # Remove all build results related to a certain module)
 197         $(info $(_) make clean-<module>-<phase> # Remove all build results related to a certain)
 198         $(info $(_)                        # module and phase)
 199         $(info )
 200         $(info Targets for specific modules)
 201         $(info $(_) make <module>          # Build <module> and everything it depends on.)
 202         $(info $(_) make <module>-<phase>  # Compile the specified phase for the specified module)
 203         $(info $(_)                        # and everything it depends on)
 204         $(info $(_)                        # (gensrc, java, copy, libs, launchers, gendata, rmic))
 205         $(info )
 206         $(info Make control variables)
 207         $(info $(_) CONF=                  # Build all configurations (note, assignment is empty))
 208         $(info $(_) CONF=<substring>       # Build the configuration(s) with a name matching)
 209         $(info $(_)                        # <substring>)
 210         $(info $(_) SPEC=<spec file>       # Build the configuration given by the spec file)
 211         $(info $(_) LOG=<loglevel>         # Change the log level from warn to <loglevel>)
 212         $(info $(_)                        # Available log levels are:)
 213         $(info $(_)                        # 'warn' (default), 'info', 'debug' and 'trace')
 214         $(info $(_)                        # To see executed command lines, use LOG=debug)
 215         $(info $(_) JOBS=<n>               # Run <n> parallel make jobs)
 216         $(info $(_)                        # Note that -jN does not work as expected!)
 217         $(info $(_) IGNORE_OLD_CONFIG=true # Skip tests if spec file is up to date)
 218         $(info $(_) make test TEST=<test>  # Only run the given test or tests, e.g.)
 219         $(info $(_)                        # make test TEST="jdk_lang jdk_net")

 220         $(info )
 221 
 222 .PHONY: help
< prev index next >