diff options
author | Sven Gothel <[email protected]> | 2010-04-10 01:21:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-04-10 01:21:45 +0200 |
commit | 4aa39b922872a8dac0d49505536a7b058ef40f7a (patch) | |
tree | 47da5b4be0e51b13e097787c65c5b40434b98f3f /make/build.xml | |
parent | 5d2fd3da2541e9ddfdad6cdbba9d251fd305bfd7 (diff) | |
parent | 1968a05de1e1c734865b045b257714abd52c7e56 (diff) |
Merge branch 'master' of github.com:mbien/gluegen
Diffstat (limited to 'make/build.xml')
-rwxr-xr-x | make/build.xml | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/make/build.xml b/make/build.xml index 4c0481f..f90cd81 100755 --- a/make/build.xml +++ b/make/build.xml @@ -34,14 +34,6 @@ <property name="gluegen.excludes" value="com/jogamp/gluegen/runtime/BufferFactoryInternal.java,com/sun/gluegen/nativesig/**" /> </target> - <target name="setup.javase"> - <!-- not needed anymore --> - </target> - - <target name="setup.javacdc"> - <!-- not needed anymore --> - </target> - <target name="init" depends="gluegen.properties.load.user,setup-excludes-1,setup-excludes-2"> <!-- Declare all paths and user defined variables. --> @@ -72,10 +64,6 @@ <mkdir dir="${classes}" /> <mkdir dir="${classes-cdc}" /> - <!-- Set up Java SE and Java CDC files --> - <antcall target="setup.javase" inheritRefs="true" /> - <antcall target="setup.javacdc" inheritRefs="true" /> - <!-- Create the classpath for ANTLR. This requires the user-defined - "antlr.jar" property. --> <path id="antlr.classpath"> @@ -435,7 +423,41 @@ <!-- - Build GlueGen. --> - <target name="gluegen.build" depends="init"> + <target name="pre-build"> + + <antcall target="create-map" inheritrefs="true"> + <param name="map.name" value="IntObjectHashMap"/> + <param name="map.value" value="Object"/> + <param name="map.null" value="null"/> + </antcall> + + <antcall target="create-map" inheritrefs="true"> + <param name="map.name" value="IntLongHashMap"/> + <param name="map.value" value="long"/> + <param name="map.null" value="0"/> + </antcall> + + </target> + + <target name="create-map"> + <!-- substitutes certain token in IntIntHashmap to create new primitive HasmMap--> + <copy file="${src.java}/com/jogamp/common/util/IntIntHashMap.java" + tofile="${src.generated.java}/com/jogamp/common/util/${map.name}.java" overwrite="true"> + <filterchain> + <replaceregex pattern="IntIntHashMap" replace="${map.name}"/> + <replaceregex pattern="@see ${map.name}" replace="@see IntIntHashMap"/> + <replaceregex pattern="/\*value\*/int/\*value\*/" replace="${map.value}"/> + <replaceregex pattern="/\*null\*/0/\*null\*/" replace="${map.null}"/> + </filterchain> + <!-- no clue why we have to do this twice... otherwise it will only replace one token per line --> + <filterchain> + <replaceregex pattern="/\*value\*/int/\*value\*/" replace="${map.value}"/> + </filterchain> + </copy> + </target> + + + <target name="gluegen.build" depends="init, pre-build"> <!-- 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 |