diff --git a/.gitignore b/.gitignore index 6787b232535..452e9f5a9d6 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ NashornProfile.txt /src/utils/LogCompilation/target/ /.project/ /.settings/ +/.project +/.classpath +/.cproject diff --git a/doc/ide.html b/doc/ide.html index d6e510319b7..18d45617f91 100644 --- a/doc/ide.html +++ b/doc/ide.html @@ -79,6 +79,45 @@ native source. After configuring, the project is generated using:

ide\hotspot-visualstudio subfolder of the build output folder. The file can be opened in Visual Studio via File -> Open -> Project/Solution.

+

Eclipse CDT

+

The make system can generate an Eclipse CDT Workspace that enables +Eclipse indexing for the C and C++ sources throughout the entire +codebase, as well as registering all common make targets to be runnable +from the Eclipse explorer. This can be done after configuring by +running:

+
make eclipse-native-env
+

After this is run, simply open and import the workspace in Eclipse +through +File -> Import -> Projects from Folder or Archive and +at Import source click on the directory +ide\eclipse, which can be found in the build output +folder.

+

If this doesn't work, you can also try +File -> Import -> Existing Projects into Workspace +instead.

+

Setting up an Eclipse Workspace is relatively lightweight compared to +other supported IDEs, but requires that your CDT installation has Cross +GCC support enabled at the moment, even if you aren't cross compiling. +The Visual C++ compiler is, at present, not supported as an indexer.

+

If desired, you can instead request make to only include indexing +support for just the Java Virtual Machine instead of the entire native +codebase, by running:

+
make eclipse-hotspot-env
+

If you think your particular Eclipse installation can handle the +strain, the make system also supports generating a combined Java and +C/C++ Workspace for Eclipse which can then conveniently switch between +Java and C/C++ natures during development by running:

+
make eclipse-mixed-env
+

Do note that this generates all features that come with both Java and +C/C++ natures.

+

By default, the Eclipse Workspace is located in the ide subdirectory +in the build output. To share the JDK's source directory with the +Eclipse Workspace, you can instead run:

+
make eclipse-shared-<ENV>-env
+

Eclipse support in the JDK is relatively new, so do keep in mind that +not everything may work at the moment. As such, the resulting Workspace +also has compilation database parsing support enabled, so you can pass +Eclipse the compile commands file (see below) if all else fails.

Compilation Database

The make system can generate generic native code indexing support in the form of a

In order to run the tests from the IDE, you can use the JTReg plugin. Instructions for building and using the plugin can be found here.

+

Eclipse

+

Eclipse JDT is a widely used Java IDE and has been for a very long +time, being a popular choice alongside IntelliJ IDEA for Java +development. Likewise, the JDK now includes support for developing its +Java sources with Eclipse, which can be achieved by setting up a Java +Workspace by running:

+
make eclipse-java-env
+

After the workspace has been generated you can import it in the same +way as you would with Eclipse CDT:

+

Follow +File -> Import -> Projects from Folder or Archive and +select the ide\eclipse directory in the build output folder +to import the newly created Java Workspace.

+

If doing so results in an error, you can also import the JDK via +File -> Import -> Existing Projects into Workspace as +a last resort.

+

Alternatively, if you want a Java Workspace inside the JDK's source +directory, you can instead run:

+
make eclipse-shared-java-env
+

As mentioned above for Eclipse CDT, you can create a combined Java +and C/C++ Workspace which can conveniently switch between Java and C/C++ +natures during development by running:

+
make eclipse-mixed-env
diff --git a/doc/ide.md b/doc/ide.md index f0a419c948b..3a1c9de3128 100644 --- a/doc/ide.md +++ b/doc/ide.md @@ -56,6 +56,63 @@ This creates a file named `jvm.vcxproj` in `ide\hotspot-visualstudio` subfolder of the build output folder. The file can be opened in Visual Studio via `File -> Open -> Project/Solution`. +#### Eclipse CDT + +The make system can generate an Eclipse CDT Workspace that enables Eclipse +indexing for the C and C++ sources throughout the entire codebase, as well as +registering all common make targets to be runnable from the Eclipse explorer. +This can be done after configuring by running: + +``` +make eclipse-native-env +``` + +After this is run, simply open and import the workspace in Eclipse through +`File -> Import -> Projects from Folder or Archive` and at +`Import source` click on the directory `ide\eclipse`, which can be +found in the build output folder. + +If this doesn't work, you can also try +`File -> Import -> Existing Projects into Workspace` +instead. + +Setting up an Eclipse Workspace is relatively lightweight compared to other +supported IDEs, but requires that your CDT installation has Cross GCC support +enabled at the moment, even if you aren't cross compiling. The Visual C++ +compiler is, at present, not supported as an indexer. + +If desired, you can instead request make to only include indexing support for +just the Java Virtual Machine instead of the entire native codebase, by running: + +``` +make eclipse-hotspot-env +``` + +If you think your particular Eclipse installation can handle the strain, the +make system also supports generating a combined Java and C/C++ Workspace for +Eclipse which can then conveniently switch between Java and C/C++ natures +during development by running: + +``` +make eclipse-mixed-env +``` + +Do note that this generates all features that come with both Java and C/C++ +natures. + +By default, the Eclipse Workspace is located in the ide subdirectory in the +build output. To share the JDK's source directory with the Eclipse Workspace, +you can instead run: + +``` +make eclipse-shared--env +``` + +Eclipse support in the JDK is relatively new, so do keep in mind that not +everything may work at the moment. As such, the resulting Workspace also +has compilation database parsing support enabled, so you can pass Eclipse +the compile commands file (see below) if all else fails. + #### Compilation Database The make system can generate generic native code indexing support in the form of @@ -96,3 +153,40 @@ as the SDK to use. In order to run the tests from the IDE, you can use the JTReg plugin. Instructions for building and using the plugin can be found [here](https://github.com/openjdk/jtreg/tree/master/plugins/idea). + +#### Eclipse + +Eclipse JDT is a widely used Java IDE and has been for a very long time, being +a popular choice alongside IntelliJ IDEA for Java development. Likewise, the +JDK now includes support for developing its Java sources with Eclipse, which +can be achieved by setting up a Java Workspace by running: + +``` +make eclipse-java-env +``` + +After the workspace has been generated you can import it in the same way as +you would with Eclipse CDT: + +Follow `File -> Import -> Projects from Folder or Archive` and select the +`ide\eclipse` directory in the build output folder to import the newly created +Java Workspace. + +If doing so results in an error, you can also import the JDK via +`File -> Import -> Existing Projects into Workspace` +as a last resort. + +Alternatively, if you want a Java Workspace inside the JDK's source directory, +you can instead run: + +``` +make eclipse-shared-java-env +``` + +As mentioned above for Eclipse CDT, you can create a combined Java and C/C++ +Workspace which can conveniently switch between Java and C/C++ natures during +development by running: + +``` +make eclipse-mixed-env +``` diff --git a/make/Main.gmk b/make/Main.gmk index fec5d268301..3c7c30caba7 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -257,6 +257,46 @@ $(eval $(call SetupTarget, hotspot-ide-project, \ ARGS := -I$(TOPDIR)/make/hotspot, \ )) +$(eval $(call SetupTarget, eclipse-java-env, \ + MAKEFILE := ide/eclipse/CreateWorkspace, \ + ARGS := --always-make WORKSPACE=java SHARED=false, \ +)) + +$(eval $(call SetupTarget, eclipse-hotspot-env, \ + MAKEFILE := ide/eclipse/CreateWorkspace, \ + ARGS := --always-make WORKSPACE=hotspot SHARED=false, \ +)) + +$(eval $(call SetupTarget, eclipse-native-env, \ + MAKEFILE := ide/eclipse/CreateWorkspace, \ + ARGS := --always-make WORKSPACE=native SHARED=false, \ +)) + +$(eval $(call SetupTarget, eclipse-mixed-env, \ + MAKEFILE := ide/eclipse/CreateWorkspace, \ + ARGS := --always-make SHARED=false, \ +)) + +$(eval $(call SetupTarget, eclipse-shared-java-env, \ + MAKEFILE := ide/eclipse/CreateWorkspace, \ + ARGS := --always-make WORKSPACE=java SHARED=true, \ +)) + +$(eval $(call SetupTarget, eclipse-shared-hotspot-env, \ + MAKEFILE := ide/eclipse/CreateWorkspace, \ + ARGS := --always-make WORKSPACE=hotspot SHARED=true, \ +)) + +$(eval $(call SetupTarget, eclipse-shared-native-env, \ + MAKEFILE := ide/eclipse/CreateWorkspace, \ + ARGS := --always-make WORKSPACE=native SHARED=true, \ +)) + +$(eval $(call SetupTarget, eclipse-shared-mixed-env, \ + MAKEFILE := ide/eclipse/CreateWorkspace, \ + ARGS := --always-make SHARED=true, \ +)) + ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \ $(HOTSPOT_VARIANT_LIBS_TARGETS) diff --git a/make/ide/eclipse/CreateWorkspace.gmk b/make/ide/eclipse/CreateWorkspace.gmk new file mode 100644 index 00000000000..51257d65ae2 --- /dev/null +++ b/make/ide/eclipse/CreateWorkspace.gmk @@ -0,0 +1,390 @@ +# +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +default: all + +include $(SPEC) +include MakeBase.gmk +include TextFileProcessing.gmk +include Utils.gmk +include Modules.gmk + +JVM_VARIANT := $(JVM_VARIANT_MAIN) +include hotspot/HotspotCommon.gmk +include hotspot/lib/JvmFeatures.gmk +include hotspot/lib/JvmOverrideFiles.gmk +include hotspot/lib/JvmFlags.gmk + +# Random number generation, with the amount of specified digits +# No need to check if the parameter passed is a valid number, the shell will +# be more than happy to complain if it isn't ;) +RandomDigits = \ + $(shell od -An -N8 -d /dev/urandom | sed -e 's| ||g' -e 's|\(.\{$(strip $1)\}\).*|\1|') + +# Modified version of utility from JdkNativeCompilation.gmk +# The full path could be omitted, but it was chosen not to so wildcard +# can work properly for existing directories. The pathsubst below that +# this necessitates is a relatively small price to pay. +FindModuleNativeDirs = \ + $(call uniq, $(wildcard \ + $(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native \ + $(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/native \ + $(TOPDIR)/src/$(strip $1)/share/native)) + +# Taken from JdkNativeCompilation.gmk +FindJavaHeaderDir = \ + $(if $(strip $1),$(wildcard $(SUPPORT_OUTPUTDIR)/headers/$(strip $1))) + +JAVA_DIRS := $(strip $(foreach module, $(call FindAllModules), \ + $(patsubst $(TOPDIR)/%,%,$(filter-out $(OUTPUTDIR)%, \ + $(call FindModuleSrcDirs, $(module)))))) + +NATIVE_DIRS := $(strip $(foreach module, $(call FindAllModules), \ + $(patsubst $(TOPDIR)/%,%,$(call FindModuleNativeDirs, $(module))))) + +# Emit the defines extracted from the list of options specified in the first parameter into +# the language settings file, in Eclipse format. +EmitExtractedDefines = \ + $(shell echo $(1) | grep -o "\-D\s\?") + +################################################################################ +# Create an Eclipse Workspace with the specified nature +# +# Parameter 1 is the name of the rule. This name is used as variable prefix, +# and the targets generated are listed in a variable by that name. +# +# Remaining parameter(s) are named arguments: +# NATURE - Which Eclipse Workspace nature to generate for the Workspace. Can +# be one of JAVA, HOTSPOT, NATIVE, or MIXED. +# SHARED - Workspace will share the same directory as the JDK if true. Can be +# either true or false. Defaults to false if not specified. +SetupEclipseWorkspace = $(NamedParamsMacroTemplate) +define SetupEclipseWorkspaceBody + + $1_NATURES := + $1_BUILD_MANAGERS := + $1_LINKED_RESOURCES := + + ifeq ($$($1_NATURE), ) + $$(error No nature specified for Eclipse Workspace, cannot continue) + endif + + ifeq ($$(findstring $$($1_NATURE), JAVA HOTSPOT NATIVE MIXED), ) + $$(error Unrecognised nature $$($1_NATURE) specified for Eclipse Workspace) + endif + + ifeq ($$($1_SHARED), ) + $$(info Workspace sharing option not given, assuming non-shared Eclipse Workspace) + $1_SHARED := false + else ifeq ($$(findstring $$($1_SHARED), true false), ) + $$(error $$($1_NATURE) is not a boolean word) + endif + + ifeq ($$($1_SHARED), true) + $1_CLASSPATH_FILE := $(TOPDIR)/.classpath + $1_WORKSPACE_FILE := $(TOPDIR)/.project + $1_NATIVE_FILE := $(TOPDIR)/.cproject + $1_SETTINGS_FILE := $(TOPDIR)/.settings/language.settings.xml + else + $1_IDE_OUTPUTDIR := $(OUTPUTDIR)/ide/eclipse + $1_CLASSPATH_FILE := $$($1_IDE_OUTPUTDIR)/.classpath + $1_WORKSPACE_FILE := $$($1_IDE_OUTPUTDIR)/.project + $1_NATIVE_FILE := $$($1_IDE_OUTPUTDIR)/.cproject + $1_SETTINGS_FILE := $$($1_IDE_OUTPUTDIR)/.settings/language.settings.xml + $$(call MakeDir, $$($1_IDE_OUTPUTDIR)) + endif + + ifneq ($$(findstring $$($1_NATURE), HOTSPOT NATIVE MIXED), ) + ifeq ($$(call isCompiler, microsoft), true) + $$(error Visual C++ is not yet supported as an indexer for Native Workspaces!) + endif + endif + + ifneq ($$(findstring $$($1_NATURE), JAVA MIXED), ) + + $1_CLASSPATH := + + # Eclipse crashes when processing multiple module-info.java files + # This is an annoying bug that has not been fixed for some time now + $1_CLASSPATH += $$(foreach src,$(JAVA_DIRS), \ + $$(NEWLINE)) + + $$(eval $$(call SetupTextFileProcessing, $1_CREATE_CLASSPATH_FILE, \ + SOURCE_FILES := $(TOPDIR)/make/ide/eclipse/classpath.template, \ + OUTPUT_FILE := $$($1_CLASSPATH_FILE), \ + REPLACEMENTS := \ + @@CLASSPATH@@ => $$($1_CLASSPATH), \ + )) + + TARGETS += $$($1_CREATE_CLASSPATH_FILE) + + $1_NATURES += org.eclipse.jdt.core.javanature$$(NEWLINE) + + endif + + ifneq ($$(findstring $$($1_NATURE), HOTSPOT NATIVE MIXED), ) + + $1_NATIVE_SRCS := + + $1_BUILD_MANAGERS += \ + \ + org.eclipse.cdt.managedbuilder.core.genmakebuilder \ + clean$$(COMMA)full$$(COMMA)incremental$$(COMMA) \ + \ + \ + \ + \ + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder \ + full$$(COMMA)incremental$$(COMMA) \ + \ + \ + $$(NEWLINE) + + $1_NATURES += \ + org.eclipse.cdt.core.cnature \ + org.eclipse.cdt.core.ccnature \ + org.eclipse.cdt.managedbuilder.core.managedBuildNature \ + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature$$(NEWLINE) + + # This is always emitted, no matter which of the 3 natures were selected + $1_NATIVE_SRCS += \ + $$(NEWLINE) + + ifneq ($$(findstring $$($1_NATURE), NATIVE MIXED), ) + $1_NATIVE_SRCS += $$(foreach src,$(NATIVE_DIRS), \ + $$(NEWLINE)) + endif + + $1_WORKSPACE_MAJOR := $$(call RandomDigits, 10) + $1_WORKSPACE_MINOR := $$(call RandomDigits, 9) + + # FixPath already removes $(FIXPATH) automatically, but if we rely on FixPath + # to do it for us dir won't be able to handle the converted path (if on Windows). + # Reversing the order causes dir to mangle the preceeding $(FIXPATH) which breaks + # the ability of FixPath to remove it, so it has to be manually removed here. + # + # Note that the workspace setup system currently does not support Visual C++ when + # extracting compiler and/or system headers vital to the build! + $1_ENV := $$(call FixPath, $$(dir $$(patsubst $(FIXPATH), , $(CC)))) + + # Sidestep annoying issue of WSL path conversion not working properly with true + # Unix paths. Eclipse can't run the WSL make by itself anyway, even if we could + # properly convert the path. + ifeq ($$(call isBuildOsEnv, windows.wsl1 windows.wsl2), true) + $1_MAKE := wsl.exe $(MAKE) + else + $1_MAKE := $$(call FixPath, $(MAKE)) + endif + + $1_MATCHING_MAKE_TARGETS := + $1_PLAIN_MAKE_TARGETS := update-build-docs docs gensrc gendata \ + copy java launchers libs hotspot jdk product-images all-images test-image clean + + # make reconfigure omitted since it is sensitive to which make was used + ifeq ($$($1_SHARED), true) + $1_PLAIN_MAKE_TARGETS += dist-clean + endif + + $1_MATCHING_MAKE_TARGETS += $$(foreach name,$$($1_PLAIN_MAKE_TARGETS), \ + \ + $$($1_MAKE) \ + -C $$(call FixPath, $(TOPDIR)) \ + $$(strip $$(name)) \ + true \ + false \ + true \ + $$(NEWLINE)) + + $$(eval $$(call SetupTextFileProcessing, $1_CREATE_NATIVE_FILE, \ + SOURCE_FILES := $(TOPDIR)/make/ide/eclipse/native.template, \ + OUTPUT_FILE := $$($1_NATIVE_FILE), \ + REPLACEMENTS := \ + @@DIR@@ => $$(call FixPath, $(TOPDIR)) ; \ + @@ENV@@ => $$($1_ENV) ; \ + @@WORKSPACE@@ => $$($1_WORKSPACE_MAJOR) ; \ + @@MINOR@@ => $$($1_WORKSPACE_MINOR) ; \ + @@MAKE@@ => $$($1_MAKE) ; \ + @@SRC@@ => $$($1_NATIVE_SRCS) ; \ + @@MAKE_TARGETS@@ => $$($1_MATCHING_MAKE_TARGETS), \ + )) + + TARGETS += $$($1_CREATE_NATIVE_FILE) + + ifeq ($$($1_SHARED), true) + $$(call MakeDir, $(TOPDIR)/.settings) + else + $$(call MakeDir, $$($1_IDE_OUTPUTDIR)/.settings) + endif + + $1_CSETTINGS := + $1_CXXSETTINGS := + + ifneq ($$(findstring $$($1_NATURE), NATIVE MIXED), ) + $1_CSETTINGS += $$(foreach module, $$(call FindAllModules), $$(if $$(call FindJavaHeaderDir, $$(module)), \ + $$(foreach dirs, $$(strip $$(patsubst $(TOPDIR)/%,%,$$(call FindModuleNativeDirs, $$(module)))), \ + \ + \ + $$(if $$(findstring jdk.sctp,$$(module)), ) \ + $$(NEWLINE)))) + + # main.c source file used for generic launchers + $1_CSETTINGS += \ + \ + \ + $$(NEWLINE) + endif + + # HotSpot first + $1_CXXSETTINGS += $$(NEWLINE) + + # If only the Java Virtual Machine sources were requested, headers from other parts of + # the native source that it needs will not be available. Add them as include paths here + # instead. + ifeq ($$($1_NATURE), HOTSPOT) + $1_CXXSETTINGS += $$(foreach src, $$(strip $$(patsubst %,%/include,$$(call FindModuleNativeDirs, java.base))), \ + $(X) $(X)$$(NEWLINE)) + $1_CXXSETTINGS += $(X) $(X)$$(NEWLINE) + endif + + $1_CXXSETTINGS += $(X) $(X)$$(NEWLINE) + + ifeq ($$(call check-jvm-feature, compiler2), true) + $1_CXXSETTINGS += $(X) $(X)$$(NEWLINE) + endif + + $1_CXXSETTINGS += $$(NEWLINE) + + $1_CXXSETTINGS += \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + $$(NEWLINE) + + # Now the rest of the C++ sources in the codebase + ifneq ($$(findstring $$($1_NATURE), NATIVE MIXED), ) + $1_CXXSETTINGS += $$(foreach module, $$(call FindAllModules), $$(if $$(call FindJavaHeaderDir, $$(module)), \ + $$(foreach dirs, $$(strip $$(patsubst $(TOPDIR)/%,%,$$(call FindModuleNativeDirs, $$(module)))), \ + \ + \ + $$(NEWLINE)))) + endif + + $$(eval $$(call SetupTextFileProcessing, $1_CREATE_SETTINGS_FILE, \ + SOURCE_FILES := $(TOPDIR)/make/ide/eclipse/settings.template, \ + OUTPUT_FILE := $$($1_SETTINGS_FILE), \ + REPLACEMENTS := \ + @@WORKSPACE@@ => $$($1_WORKSPACE_MAJOR) ; \ + @@CSETTINGS@@ => $$($1_CSETTINGS) ; \ + @@CXXSETTINGS@@ => $$($1_CXXSETTINGS), \ + )) + + TARGETS += $$($1_CREATE_SETTINGS_FILE) + + endif + + ifeq ($$($1_SHARED), false) + ifneq ($$(findstring $$($1_NATURE), JAVA MIXED), ) + $1_LINKED_RESOURCES += $$(foreach src,$(JAVA_DIRS), \ + \ + $$(strip $$(src)) \ + 2 \ + $$(subst \\,/,$$(call FixPath, $(TOPDIR)/$$(src))) \ + $$(NEWLINE)) + endif + + ifneq ($$(findstring $$($1_NATURE), HOTSPOT NATIVE MIXED), ) + # CDT includes a Makefile editor, so if CDT support was indicated there's no harm in + # including the make sources as well, since the cost of indexing them is miniscule + $1_LINKED_RESOURCES += \ + \ + make \ + 2 \ + $$(subst \\,/,$$(call FixPath, $(TOPDIR)/make)) \ + \ + \ + src/hotspot \ + 2 \ + $$(subst \\,/,$$(call FixPath, $(TOPDIR)/src/hotspot)) \ + $$(NEWLINE) + endif + + ifneq ($$(findstring $$($1_NATURE), NATIVE MIXED), ) + $1_LINKED_RESOURCES += $$(foreach src,$(NATIVE_DIRS), \ + \ + $$(strip $$(src)) \ + 2 \ + $$(subst \\,/,$$(call FixPath, $(TOPDIR)/$$(src))) \ + $$(NEWLINE)) + endif + endif + + $$(eval $$(call SetupTextFileProcessing, $1_CREATE_WORKSPACE_FILE, \ + SOURCE_FILES := $(TOPDIR)/make/ide/eclipse/workspace.template, \ + OUTPUT_FILE := $$($1_WORKSPACE_FILE), \ + REPLACEMENTS := \ + @@BUILD_MANAGERS@@ => $$($1_BUILD_MANAGERS) ; \ + @@NATURES@@ => $$($1_NATURES) ; \ + @@LINKED_RESOURCES@@ => $$($1_LINKED_RESOURCES), \ + )) + + TARGETS += $$($1_CREATE_WORKSPACE_FILE) + +endef + +ifeq ($(WORKSPACE), java) + $(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \ + NATURE := JAVA, \ + SHARED := $(SHARED), \ + )) +else ifeq ($(WORKSPACE), hotspot) + $(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \ + NATURE := HOTSPOT, \ + SHARED := $(SHARED), \ + )) +else ifeq ($(WORKSPACE), native) + $(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \ + NATURE := NATIVE, \ + SHARED := $(SHARED), \ + )) +else + $(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \ + NATURE := MIXED, \ + SHARED := $(SHARED), \ + )) +endif + +all: $(TARGETS) diff --git a/make/ide/eclipse/classpath.template b/make/ide/eclipse/classpath.template new file mode 100644 index 00000000000..6900cd74ffc --- /dev/null +++ b/make/ide/eclipse/classpath.template @@ -0,0 +1,4 @@ + + + @@CLASSPATH@@ + diff --git a/make/ide/eclipse/native.template b/make/ide/eclipse/native.template new file mode 100644 index 00000000000..37f0a7afd95 --- /dev/null +++ b/make/ide/eclipse/native.template @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@SRC@@ + + + + + + + + + @@MAKE_TARGETS@@ + + + diff --git a/make/ide/eclipse/settings.template b/make/ide/eclipse/settings.template new file mode 100644 index 00000000000..346c0f63d2d --- /dev/null +++ b/make/ide/eclipse/settings.template @@ -0,0 +1,22 @@ + + + + + + + + + + + + + @@CSETTINGS@@ + + + + @@CXXSETTINGS@@ + + + + + diff --git a/make/ide/eclipse/workspace.template b/make/ide/eclipse/workspace.template new file mode 100644 index 00000000000..328ee0c205d --- /dev/null +++ b/make/ide/eclipse/workspace.template @@ -0,0 +1,16 @@ + + + jdk + The HotSpot Virtual Machine, Runtime Environment, and Development Kit + + + + @@BUILD_MANAGERS@@ + + + @@NATURES@@ + + + @@LINKED_RESOURCES@@ + +