Adds a gwt-compiler subproject and build rules.

This subproject ensures that a compiler core is buildable without including hosted mode infrastructure.  This could be useful in the future for things like embedding the GWT compiler into a server or other tools.

Review by: bobv


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5875 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/build.xml b/dev/core/build.xml
index e868ed4..8fb6703 100755
--- a/dev/core/build.xml
+++ b/dev/core/build.xml
@@ -110,7 +110,33 @@
     <touch file="${filter.sentinel}" />
   </target>
 
-  <target name="build" depends="build.alldeps.jar" description="Compiles this project">
+  <target name="compiler.standalone" description="Validates that the standalone gwt-compiler project can build.">
+    <mkdir dir="${javac.out}" />
+    <gwt.javac srcdir="super" excludes="com/google/gwt/dev/jjs/intrinsic/"/>
+    <gwt.javac srcdir="src">
+      <include name="com/google/gwt/core/ext/**"/>
+      <include name="com/google/gwt/core/linker/**"/>
+      <include name="com/google/gwt/dev/About.java"/>
+      <include name="com/google/gwt/dev/asm/**"/>
+      <include name="com/google/gwt/dev/cfg/**"/>
+      <include name="com/google/gwt/dev/javac/**"/>
+      <include name="com/google/gwt/dev/jdt/**"/>
+      <include name="com/google/gwt/dev/jjs/**"/>
+      <include name="com/google/gwt/dev/js/**"/>
+      <include name="com/google/gwt/dev/resource/**"/>
+      <include name="com/google/gwt/dev/util/**"/>
+      <include name="com/google/gwt/util/tools/**"/>
+      <classpath>
+          <pathelement location="${gwt.tools.lib}/apache/ant-1.6.5.jar" />
+          <pathelement location="${gwt.tools.lib}/eclipse/jdt-3.4.2.jar" />
+          <pathelement location="${gwt.tools.lib}/tomcat/commons-collections-3.1.jar" />
+          <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
+      </classpath>
+    </gwt.javac>
+
+  </target>
+  
+  <target name="build" depends="compiler.standalone, build.alldeps.jar" description="Compiles this project">
     <!--
     There are classes missing from dev/core that are necessary
     to compile the rest of dev/core (e.g. BootStrapPlatform); these are
@@ -121,8 +147,6 @@
     <mkdir dir="${javac.out-dummy}" />
     <gwt.javac srcdir="src-dummy" destdir="${javac.out-dummy}" />
 
-    <mkdir dir="${javac.out}" />
-    <gwt.javac srcdir="super" excludes="com/google/gwt/dev/jjs/intrinsic/"/>
     <gwt.javac srcdir="src" excludes="${filter.pattern}">
       <classpath>
         <pathelement location="${javac.out-dummy}" />
diff --git a/eclipse/dev/compiler/.checkstyle b/eclipse/dev/compiler/.checkstyle
new file mode 100644
index 0000000..7699b83
--- /dev/null
+++ b/eclipse/dev/compiler/.checkstyle
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fileset-config file-format-version="1.2.0" simple-config="false">
+    <fileset name="all" enabled="true" check-config-name="GWT Checks" local="false">
+        <file-match-pattern match-pattern="core[\\/]src[\\/]com[\\/]google[\\/]gwt[\\/].*\.java$" include-pattern="true"/>
+        <file-match-pattern match-pattern="core[\\/]src[\\/]com[\\/]google[\\/]gwt[\\/]dev[\\/]asm[\\/]" include-pattern="false"/>
+        <file-match-pattern match-pattern="core[\\/]src[\\/]com[\\/]google[\\/]gwt[\\/]dev[\\/]js[\\/]rhino[\\/]" include-pattern="false"/>
+        <file-match-pattern match-pattern="windows[\\/]src[\\/]com[\\/]google[\\/]gwt[\\/].*\.java$" include-pattern="true"/>
+    </fileset>
+    <filter name="NonSrcDirs" enabled="true"/>
+</fileset-config>
diff --git a/eclipse/dev/compiler/.classpath b/eclipse/dev/compiler/.classpath
new file mode 100644
index 0000000..58e6dca
--- /dev/null
+++ b/eclipse/dev/compiler/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry including="com/google/gwt/core/ext/|com/google/gwt/core/linker/|com/google/gwt/dev/About.java|com/google/gwt/dev/asm/|com/google/gwt/dev/cfg/|com/google/gwt/dev/javac/|com/google/gwt/dev/jdt/|com/google/gwt/dev/jjs/|com/google/gwt/dev/js/|com/google/gwt/dev/resource/|com/google/gwt/dev/util/|com/google/gwt/util/tools/" kind="src" path="core/src"/>
+	<classpathentry excluding="com/google/gwt/dev/jjs/intrinsic/" kind="src" path="core/super"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="var" path="GWT_TOOLS/lib/apache/ant-1.6.5.jar" sourcepath="/GWT_TOOLS/lib/apache/ant-1.6.5-src.zip"/>
+	<classpathentry kind="var" path="GWT_TOOLS/lib/eclipse/jdt-3.4.2.jar" sourcepath="/GWT_TOOLS/lib/eclipse/jdt-3.4.2-src.zip"/>
+	<classpathentry kind="var" path="GWT_TOOLS/lib/junit/junit-3.8.1.jar" sourcepath="/GWT_TOOLS/lib/junit/junit-3.8.1-src.zip"/>
+	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/commons-collections-3.1.jar" sourcepath="/GWT_TOOLS/lib/tomcat/commons-collections-3.1-src.zip"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/eclipse/dev/compiler/.project b/eclipse/dev/compiler/.project
new file mode 100644
index 0000000..167b955
--- /dev/null
+++ b/eclipse/dev/compiler/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>gwt-compiler</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
+	</natures>
+	<linkedResources>
+		<link>
+			<name>core</name>
+			<type>2</type>
+			<locationURI>GWT_ROOT/dev/core</locationURI>
+		</link>
+	</linkedResources>
+</projectDescription>