jdk-24/make/idea/idea.gmk
Maurizio Cimadamore 16eae50cca 8157061: Add support for running jtreg tests from IntelliJ project
Add basic capabilities for running jtreg tests from the IDE using a custom ant target

Reviewed-by: chegar
2016-05-19 16:48:43 +01:00

41 lines
1.3 KiB
Plaintext

include Makefile
include make/MainSupport.gmk
.PHONY: idea
ifeq ($(SPEC),)
ifneq ($(words $(SPECS)),1)
@echo "Error: Multiple build specification files found. Please select one explicitly."
@exit 2
endif
idea:
@cd $(topdir)
@$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/idea/idea.gmk SPEC=$(SPECS) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) MODULES="$(MODULES)" idea
else #with SPEC
include make/common/Modules.gmk
ifeq ($(MODULES),)
SEL_MODULES := $(call FindAllModules)
else
SEL_MODULES := $(MODULES)
endif
# Find all source dirs for a particular module
# $1 - Module to find source dirs for
FindIdeaModuleSrcDirs = \
$(strip $(addsuffix /$(strip $1), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
$(wildcard $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
idea:
$(ECHO) "SUPPORT=$(SUPPORT_OUTPUTDIR)" >> $(OUT)
$(ECHO) "MODULE_ROOTS=\"$(foreach mod, $(SEL_MODULES), $(call FindIdeaModuleSrcDirs,$(mod)))\"" >> $(OUT)
$(ECHO) "MODULE_NAMES=\"$(strip $(foreach mod, $(SEL_MODULES), $(mod)))\"" >> $(OUT)
$(ECHO) "SEL_MODULES=\"$(SEL_MODULES)\"" >> $(OUT)
$(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT)
$(ECHO) "CYGPATH=\"$(CYGPATH)\"" >> $(OUT)
$(ECHO) "SPEC=\"$(SPEC)\"" >> $(OUT)
$(ECHO) "JT_HOME=\"$(JT_HOME)\"" >> $(OUT)
endif