aboutsummaryrefslogtreecommitdiffstats
path: root/make/newtversion
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-29 15:10:48 +0200
committerSven Gothel <[email protected]>2011-10-29 15:10:48 +0200
commit6a770d1ec80a656db62feb8100e3fe58800e79af (patch)
treeb20ea684417f6945b30426782e1442382ec1afb8 /make/newtversion
parentbc826eb2e216ce82a5e6bc61403e4eff2f338380 (diff)
MacOsX/JAWT_SurfaceLayers/CALayers: Kick off / JAWT_getAWT() CALAYER version support.
Diffstat (limited to 'make/newtversion')
0 files changed, 0 insertions, 0 deletions
id='n110' href='#n110'>110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
<?xml version="1.0" encoding="UTF-8"?>
<!--
   - Ant build for JOGL's GlueGen and corresponding ANT task.  This build 
   - should not be called directly.  It is invoked from the main "build.xml"
   - file and relies on the properties set therein.
   -
   - The optional.jar that contains the optional ANT tasks must be in the ANT
   - classpath (typically the ant/lib directory).
   -
   - This build has been tested with ANT 1.5.3 and JOGL 1.1.1.1.
   -
   - Public targets:
   -   all:  clean and build GlueGen and GlueGen Ant task
   -   clean:  clean all built
  -->
<project name="JOGL.GlueGen" default="all">
    <!-- ================================================================== -->
    <!-- 
       - Declare all paths and user defined variables.
      -->
    <target name="declare" description="Declare properties">

        <!-- Create the classpath for ANTLR.  This requires the user-defined
           - "antlr.jar" property. -->
        <path id="antlr.classpath">
            <pathelement location="${antlr.jar}" />
        </path>
    
        <!-- The location of the GlueGen source and the C grammar files. -->
        <property name="gluegen" value="${src.java}/com/sun/gluegen" />
        <property name="c.grammar" value="${gluegen}/cgram" />
        
        <!-- The resulting location of the generated Java files from the
           - C grammar via ANTLR. -->
        <property name="gluegen.build" value="${src.generated.java}/com/sun/gluegen" />
        <property name="generated.java.from.grammar" value="${gluegen.build}/cgram" />

    </target>

    <!-- ================================================================== -->
    <!--
       - Build GlueGen.
      -->
    <target name="build.gluegen" depends="declare">

        <!-- Because ANTLR looks for importVocab files in the current
             working directory, it likes to have all of its files,
             including supergrammars, in one place, so copy all of the
             grammars to the output directory up front so we don't put
             temporary files into the source tree -->
        <mkdir dir="${generated.java.from.grammar}" />
	<copy todir="${generated.java.from.grammar}">
	    <fileset dir="${c.grammar}">
	        <include name="*.g" />
            </fileset>
	</copy>

        <!-- Generate the Java files from the C grammar using ANTLR. -->
        <antcall target="generate.c.grammar">
	    <param name="output.dir" value="${generated.java.from.grammar}" />
            <param name="target" value="StdCParser.g" />
        </antcall>
        <antcall target="generate.c.grammar.glib">
	    <param name="output.dir" value="${generated.java.from.grammar}" />
            <param name="target" value="GnuCParser.g" />
            <param name="glib" value="StdCParser.g" />
        </antcall>
        <antcall target="generate.c.grammar">
	    <param name="output.dir" value="${generated.java.from.grammar}" />
            <param name="target" value="GnuCTreeParser.g" />
        </antcall>
        <antcall target="generate.c.grammar.glib">
	    <param name="output.dir" value="${generated.java.from.grammar}" />
            <param name="target" value="GnuCEmitter.g" />
            <param name="glib" value="GnuCTreeParser.g" />
        </antcall>
        <antcall target="generate.c.grammar.glib">
	    <param name="output.dir" value="${generated.java.from.grammar}" />
            <param name="target" value="HeaderParser.g" />
            <param name="glib" value="GnuCTreeParser.g" />
        </antcall>
    
        <!-- Ensure that the output classes directory exists. -->
        <mkdir dir="${classes}" />
            
        <!-- Build GlueGen using the generated Java files along with the
           - original source. 
           - NOTE:  GlueGenTask is NOT built at this time.  It is done in
           -        a separate task.  -->
        <javac destdir="${classes}" includes="**/gluegen/**" excludes="**/GlueGenTask.java"
               source="1.4" debug="true" debuglevel="source,lines">
            <src path="${src.java}" />
            <src path="${src.generated.java}" />
            <classpath refid="antlr.classpath" />
        </javac>
        
        <!-- Inform the user that GlueGen has been successfully built. -->
        <echo message="" />
        <echo message="GlueGen has been built successfully." />
    </target>      
    
    <!--
       - Using ANTLR generate the specified Java files.
       -
       - @param target the grammar file to process
       - @param output.dir the directory to write the generated files to.  If
       -        the directory does not exist, it will be created.
      -->
    <target name="generate.c.grammar" depends="declare">
        <!-- Generate the Java files -->
        <antlr target="${output.dir}/${target}" outputdirectory="${output.dir}">
            <classpath refid="antlr.classpath" />
        </antlr>
    </target>
    
    <!--
       - Using ANTLR generate the specified Java files with an overridden
       - grammar file.
       -
       - @param target the grammar file to process
       - @param glib the overridding grammar file
       - @param output.dir the directory to write the generated files to.  If
       -        the directory does not exist, it will be created.
      -->
    <target name="generate.c.grammar.glib" depends="declare">
        <!-- Generate the Java files -->
        <antlr target="${output.dir}/${target}" glib="${output.dir}/${glib}" outputdirectory="${output.dir}">
            <classpath refid="antlr.classpath" />
        </antlr>
    </target>
    
    <!-- ================================================================== -->
    <!--
       - Build the GlueGen ANT task.
      -->
    <target name="build.gluegen.task" depends="declare">
        <!-- Ensure that the output classes directory exists. -->
        <mkdir dir="${classes}" />
            
        <!-- Build the GlueGen ANT task.
           - NOTE:  ONLY the GlueGenTask is built at this time.  GlueGen 
           -        itself is built in a separate task.  -->
        <javac destdir="${classes}" includes="**/GlueGenTask.java" source="1.4" debug="true" debuglevel="source,lines">
            <src path="${src.java}" />
            <classpath refid="antlr.classpath" />
        </javac>
        
        <!-- Inform the user that the GlueGen ANT task has been successfully 
             built. -->
        <echo message="" />
        <echo message="GlueGen ANT task has been built successfully." />
    </target>

    <!-- ================================================================== -->
    <!--
       - Clean up all that is built.  
       - NOTE:  this is a bit heavy-handed as it may delete more than just
       -        what is built with this build.
      -->
    <target name="clean" depends="declare">
        <delete includeEmptyDirs="true" quiet="true">
            <fileset dir="${src.generated.java}" />
            <fileset dir="${classes}" />
        </delete>
    </target>