diff options
author | Sven Gothel <[email protected]> | 2015-03-24 03:44:24 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-24 03:44:24 +0100 |
commit | 88d51db39f3b00df1462eb0a18c1825ae1e86485 (patch) | |
tree | 6ba949ff85c1ff48cedfd866eb0622cafc583f40 /make | |
parent | b755b045fb7e3c8306f24dd645297992ab8db7f9 (diff) |
Bug 1149 - Replacing PCPP w/ JCPP, allowing complete macro handling (Part-2: JCPP submodule, build, test and doc)
Diffstat (limited to 'make')
-rw-r--r-- | make/build-test.xml | 10 | ||||
-rw-r--r-- | make/build.xml | 13 | ||||
-rwxr-xr-x | make/scripts/runtest.sh | 27 | ||||
-rw-r--r-- | make/stub_includes/gluegen/stdio.h | 7 |
4 files changed, 44 insertions, 13 deletions
diff --git a/make/build-test.xml b/make/build-test.xml index fe1aaec..68f674f 100644 --- a/make/build-test.xml +++ b/make/build-test.xml @@ -36,6 +36,8 @@ <property name="test.junit.generation.rel" value="${test.junit.rel}/gluegen/test/junit/generation" /> <property name="test.junit.generation.dir" value="${test.base.dir}/${test.junit.generation.rel}" /> + <property name="test.jcpp.base.dir" value="${project.root}/jcpp/src/test/java" /> + <property name="tempdir" value="${project.root}/build-temp" /> <property name="build" location="${project.root}/${rootrel.build}" /> <property name="test.dir" value="${gluegen.root}/${rootrel.build}/test"/> @@ -169,6 +171,7 @@ <classpath refid="junit.compile.classpath"/> <compilerarg value="-proc:none"/> <src path="${test.base.dir}"/> + <src path="${test.jcpp.base.dir}"/> <src path="${build_t.gen}" /> </javac> @@ -266,9 +269,10 @@ <target name="junit.compile.check" depends="init"> <uptodate property="junit.compile.skip"> - <srcfiles dir= "." includes="*.xml"/> - <srcfiles dir= "${test.base.dir}" includes="**"/> - <srcfiles file="${gluegen.jar}" /> + <srcfiles dir= "." includes="*.xml"/> + <srcfiles dir= "${test.base.dir}" includes="**"/> + <srcfiles dir= "${test.jcpp.base.dir}" includes="**"/> + <srcfiles file="${gluegen.jar}" /> <mapper type="merge" to="${gluegen-test.jar}"/> </uptodate> </target> diff --git a/make/build.xml b/make/build.xml index aa3282b..e92da5b 100644 --- a/make/build.xml +++ b/make/build.xml @@ -31,6 +31,7 @@ This requires the user-defined "antlr.jar" property. --> <path id="cc_gluegen.classpath"> <pathelement location="${antlr.jar}" /> + <pathelement location="${semver.jar}" /> </path> </target> @@ -59,6 +60,7 @@ <property name="project.root" value=".." /> <property name="src.java" value="${project.root}/src/java" /> <property name="src.antlr" value="${project.root}/src/antlr" /> + <property name="src.jcpp" value="${project.root}/jcpp/src/main/java" /> <property name="build" location="${project.root}/${rootrel.build}" /> <property name="javadoc.root.path" location="${build}/javadoc" /> @@ -142,6 +144,7 @@ <property name="java.part.nonjava" value="com/jogamp/common/util/bin/*" /> <property name="gluegen-rt.classes" value="com/jogamp/gluegen/runtime/**"/> <property name="jogamp.common.classes" value="com/jogamp/common/** jogamp/common/**"/> + <property name="java.part.jcpp" value="com/jogamp/gluegen/jcpp/**"/> <property name="gluegen.excludes.all" value="${gluegen.excludes.nsig} ${jogamp-android-launcher.classes}" /> </target> @@ -604,6 +607,7 @@ <uptodate property="gluegen.build.skip.java1"> <srcfiles dir= "." includes="*.xml"/> <srcfiles dir= "${src.java}" includes="**"/> + <srcfiles dir= "${src.jcpp}" includes="**"/> <srcfiles dir= "${c.grammar}" includes="*.g"/> <srcfiles dir= "${j.grammar}" includes="*.g"/> <mapper type="merge" to="${build}/gluegen.jar"/> @@ -611,6 +615,7 @@ <uptodate property="gluegen.build.skip.java2"> <srcfiles dir= "." includes="*.xml"/> <srcfiles dir= "${src.java}" includes="**"/> + <srcfiles dir= "${src.jcpp}" includes="**"/> <srcfiles dir= "${c.grammar}" includes="*.g"/> <srcfiles dir= "${j.grammar}" includes="*.g"/> <mapper type="merge" to="${build}/gluegen-rt.jar"/> @@ -739,10 +744,11 @@ excludes="${gluegen.excludes.all} ${gluegen-rt.classes} ${java.part.android}" memoryMaximumSize="${javac.memorymax}" encoding="UTF-8" - source="${target.sourcelevel}" + source="${target.sourcelevel}" target="${target.targetlevel}" bootclasspath="${host.rt.jar}" debug="${javacdebug}" debuglevel="${javacdebuglevel}"> + <src path="${src.jcpp}" /> <src path="${src.java}" /> <src path="${src.generated.java}" /> <classpath refid="cc_gluegen.classpath" /> @@ -822,6 +828,7 @@ <include name="jogamp/common/**" /> <exclude name="${jogamp-android-launcher.classes}" /> <exclude name="${java.part.android}" /> + <exclude name="${java.part.jcpp}" /> </fileset> <fileset dir="resources/assets"> <include name="**" /> @@ -836,6 +843,7 @@ <include name="jogamp/common/**" /> <exclude name="${jogamp-android-launcher.classes}" /> <exclude name="${java.part.android}" /> + <exclude name="${java.part.jcpp}" /> </fileset> <fileset dir="resources/assets"> <include name="**" /> @@ -1033,7 +1041,7 @@ <delete dir="${javadoc.gluegen.path}" includeEmptyDirs="true" quiet="true" failonerror="false" /> <mkdir dir="${javadoc.gluegen.path}" /> <javadoc packagenames="com.jogamp.*" - sourcepath="${src.java};${src.generated.java}" + sourcepath="${src.java};${src.jcpp};${src.generated.java}" destdir="${javadoc.gluegen.path}" windowtitle="GlueGen Runtime Documentation" overview="../src/java/com/jogamp/gluegen/package.html" encoding="UTF-8" @@ -1065,6 +1073,7 @@ <zip destfile="${build}/gluegen-java-src.zip" level="0"> <fileset dir="${src.java}"/> <fileset dir="${build}/gensrc/java"/> + <fileset dir="${src.jcpp}"/> </zip> </target> diff --git a/make/scripts/runtest.sh b/make/scripts/runtest.sh index 5d19e7f..0837c42 100755 --- a/make/scripts/runtest.sh +++ b/make/scripts/runtest.sh @@ -39,6 +39,10 @@ ANT_JARS=$ANT_PATH/lib/ant.jar:$ANT_PATH/lib/ant-junit.jar:$ANT_PATH/lib/ant-lau LOG=runtest.log rm -f $LOG +GLUEGEN_ROOT=`dirname $builddir` +ROOTREL_BUILD=`basename $builddir` + +X_ARGS="-Drootrel.build=$ROOTREL_BUILD -Dgluegen.root=$GLUEGEN_ROOT" #D_ARGS="-Djogamp.debug.ProcAddressHelper -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup" #D_ARGS="-Djogamp.debug.TraceLock" #D_ARGS="-Djogamp.debug.Platform -Djogamp.debug.NativeLibrary" @@ -58,7 +62,8 @@ rm -f $LOG #D_ARGS="-Djogamp.debug.IOUtil" #D_ARGS="-Djogamp.debug.ByteBufferInputStream" #D_ARGS="-Djogamp.debug.Bitstream" -D_ARGS="-Djogamp.debug=all" +#D_ARGS="-Djogamp.debug=all" +#D_ARGS="-Djogamp.debug.Logging" function onetest() { #USE_CLASSPATH=lib/junit.jar:$ANT_JARS:lib/semantic-versioning/semver.jar:"$builddir"/../make/lib/TestJarsInJar.jar:"$builddir"/gluegen-rt.jar:"$builddir"/gluegen.jar:"$builddir"/gluegen-test-util.jar:"$builddir"/test/build/gluegen-test.jar @@ -73,11 +78,11 @@ function onetest() { echo LD_LIBRARY_PATH $LD_LIBRARY_PATH echo USE_CLASSPATH $USE_CLASSPATH which java - #echo java -cp $USE_CLASSPATH $D_ARGS -Djava.library.path=$libspath $* - #java -cp $USE_CLASSPATH $D_ARGS -Djava.library.path="$libspath" $* - echo java -cp "$USE_CLASSPATH" $D_ARGS $* - java -cp "$USE_CLASSPATH" $D_ARGS $* - #j3 -cp "$USE_CLASSPATH" $D_ARGS $* + #echo java -cp $USE_CLASSPATH $X_ARGS $D_ARGS -Djava.library.path=$libspath $* + #java -cp $USE_CLASSPATH $X_ARGS $D_ARGS -Djava.library.path="$libspath" $* + echo java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $* + java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $* + #j3 -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $* echo } # @@ -128,9 +133,15 @@ function onetest() { #onetest com.jogamp.common.nio.TestByteBufferCopyStream 2>&1 | tee -a $LOG #onetest com.jogamp.common.os.TestElfReader01 $* 2>&1 | tee -a $LOG #onetest com.jogamp.gluegen.test.junit.internals.TestType 2>&1 | tee -a $LOG -#onetest com.jogamp.gluegen.PCPPTest 2>&1 | tee -a $LOG + +#onetest com.jogamp.gluegen.test.junit.generation.PCPPTest 2>&1 | tee -a $LOG +#onetest com.jogamp.gluegen.jcpp.IncludeAbsoluteTest 2>&1 | tee -a $LOG +#onetest com.jogamp.gluegen.jcpp.CppReaderTest 2>&1 | tee -a $LOG +#onetest com.jogamp.gluegen.jcpp.TokenPastingWhitespaceTest 2>&1 | tee -a $LOG +onetest com.jogamp.gluegen.jcpp.PreprocessorTest 2>&1 | tee -a $LOG + #onetest com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter 2>&1 | tee -a $LOG -onetest com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter 2>&1 | tee -a $LOG +#onetest com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter 2>&1 | tee -a $LOG #onetest com.jogamp.gluegen.test.junit.generation.Test1p2LoadJNIAndImplLib 2>&1 | tee -a $LOG #onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen01 2>&1 | tee -a $LOG #onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen02 2>&1 | tee -a $LOG diff --git a/make/stub_includes/gluegen/stdio.h b/make/stub_includes/gluegen/stdio.h new file mode 100644 index 0000000..13d941e --- /dev/null +++ b/make/stub_includes/gluegen/stdio.h @@ -0,0 +1,7 @@ +#ifndef __stdio_h +#define __stdio_h + +#include <gluegen_types.h> + +#endif /* __stdio_h */ + |