make/MakeHelpers.gmk
changeset 29156 bd932374081c
parent 29060 baa66d2b7e95
equal deleted inserted replaced
29153:874d76e4699d 29156:bd932374081c
     1 #
     1 #
     2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
     2 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     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
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.  Oracle designates this
     7 # published by the Free Software Foundation.  Oracle designates this
   295   endif
   295   endif
   296 endef
   296 endef
   297 
   297 
   298 ### Convenience functions from Main.gmk
   298 ### Convenience functions from Main.gmk
   299 
   299 
       
   300 # Run the tests specified by $1.
       
   301 define RunTests
       
   302 	($(CD) $(SRC_ROOT)/test && $(MAKE) $(MAKE_ARGS) -j1 -k MAKEFLAGS= \
       
   303 	    JT_HOME=$(JT_HOME) PRODUCT_HOME=$(JDK_IMAGE_DIR) \
       
   304 	    TEST_IMAGE_DIR=$(TEST_IMAGE_DIR) \
       
   305 	    ALT_OUTPUTDIR=$(OUTPUT_ROOT) CONCURRENCY=$(JOBS) $1) || true
       
   306 endef
       
   307 
   300 # Cleans the dir given as $1
   308 # Cleans the dir given as $1
   301 define CleanDir
   309 define CleanDir
   302 	@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
   310 	@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
   303 	@($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
   311 	@($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
       
   312 	@$(PRINTF) " done\n"
       
   313 endef
       
   314 
       
   315 define CleanTest
       
   316 	@$(PRINTF) "Cleaning test $(strip $1) ..."
       
   317 	@$(RM) -r $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))
   304 	@$(PRINTF) " done\n"
   318 	@$(PRINTF) " done\n"
   305 endef
   319 endef
   306 
   320 
   307 define Clean-gensrc
   321 define Clean-gensrc
   308 	@$(PRINTF) "Cleaning gensrc $(if $1,for $(strip $1) )..."
   322 	@$(PRINTF) "Cleaning gensrc $(if $1,for $(strip $1) )..."