diff options
Diffstat (limited to 'make/scripts')
-rw-r--r-- | make/scripts/cmpOld2New.sh | 22 | ||||
-rwxr-xr-x | make/scripts/lsGL23_commons.sh | 6 | ||||
-rwxr-xr-x | make/scripts/lsGL2_GL3_commons.sh | 18 | ||||
-rwxr-xr-x | make/scripts/lstjars.sh | 4 | ||||
-rwxr-xr-x | make/scripts/strip-c-comments.awk | 59 |
5 files changed, 104 insertions, 5 deletions
diff --git a/make/scripts/cmpOld2New.sh b/make/scripts/cmpOld2New.sh new file mode 100644 index 000000000..4394fe7b5 --- /dev/null +++ b/make/scripts/cmpOld2New.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +dirscript=`dirname $0` + +dirold=../build-x86_64-old/jogl/gensrc/classes/javax/media/opengl/ +dirnew=../build-x86_64/jogl/gensrc/classes/javax/media/opengl/ +dircmp=cmp-old2new + +rm -rf $dircmp +mkdir -p $dircmp + +for i in GL GL2ES1 GL2ES2 GLES1 GLES2 GL2GL3 GL2 GL3 GL3bc GL4 GL4bc ; do + echo + echo processing $i + awk -f $dirscript/strip-c-comments.awk $dirold/$i.java | sort -u > $dircmp/$i-old.java + echo created $dircmp/$i-old.java + awk -f $dirscript/strip-c-comments.awk $dirnew/$i.java | sort -u > $dircmp/$i-new.java + echo created $dircmp/$i-new.java + diff -Nurdw $dircmp/$i-old.java $dircmp/$i-new.java > $dircmp/$i-diff.txt + echo created $dircmp/$i-diff.txt +done + diff --git a/make/scripts/lsGL23_commons.sh b/make/scripts/lsGL23_commons.sh index 7c7161717..cab55639b 100755 --- a/make/scripts/lsGL23_commons.sh +++ b/make/scripts/lsGL23_commons.sh @@ -9,10 +9,10 @@ fi idir=$BUILDDIR/jogl/gensrc/classes/javax/media/opengl -SOURCE="$idir/GL.java $idir/GL2ES1.java $idir/GL2ES2.java $idir/GLES1.java $idir/GLES2.java $idir/GL2GL3.java $idir/GL2.java $idir/GL3.java" +SOURCE="$idir/GL.java $idir/GL2ES2.java $idir/GL2GL3.java $idir/GL3.java" -echo GL GL2ES1 GL2ES2 GLES1 GLES2 GL2GL3 GL2 GL3 defines +echo GL GL2ES2 GL2GL3 GL3 defines sort $SOURCE | uniq -d | grep GL_ | grep -v "Part of <code>" -echo GL GL2ES1 GL2ES2 GLES1 GLES2 GL2GL3 GL2 GL3 functions +echo GL GL2ES2 GL2GL3 GL3 functions sort $SOURCE | uniq -d | grep "public [a-z0-9_]* gl" diff --git a/make/scripts/lsGL2_GL3_commons.sh b/make/scripts/lsGL2_GL3_commons.sh new file mode 100755 index 000000000..722ba850d --- /dev/null +++ b/make/scripts/lsGL2_GL3_commons.sh @@ -0,0 +1,18 @@ +#! /bin/sh + +BUILDDIR=$1 +shift +if [ -z "$BUILDDIR" ] ; then + echo "usage $0 <BUILDDIR>" + exit 1 +fi + +idir=$BUILDDIR/jogl/gensrc/classes/javax/media/opengl + +SOURCE="$idir/GL.java $idir/GL2ES2.java $idir/GL2GL3.java $idir/GL2.java $idir/GL3.java" + +echo GL GL2ES2 GL2GL3 GL2 GL3 defines +sort $SOURCE | uniq -d | grep GL_ | grep -v "Part of <code>" + +echo GL GL2ES2 GL2GL3 GL2 GL3 functions +sort $SOURCE | uniq -d | grep "public [a-z0-9_]* gl" diff --git a/make/scripts/lstjars.sh b/make/scripts/lstjars.sh index 3837be5e3..2a2f67bf2 100755 --- a/make/scripts/lstjars.sh +++ b/make/scripts/lstjars.sh @@ -123,7 +123,7 @@ done rm -rf nope mkdir -p nope -mv *.cdc.lst *.all*.lst nope/ +mv jogl.test.lst *-noawt.lst *.cdc.lst *.all*.lst nope/ mv jogl.gl2es12.*.lst jogl.gldesktop.*.lst nope/ echo duplicates - w/o gl2es12.* gldesktop.* @@ -131,7 +131,7 @@ echo sort jogl*.lst | uniq -d mv nope/* . -mv *.cdc.lst *.all*.lst nope/ +mv jogl.test.lst *.cdc.lst *.all*.lst nope/ cat *.lst | sort -u > allparts.lst mv nope/* . cat *.all.lst gluegen-rt.lst | sort -u > allall.lst diff --git a/make/scripts/strip-c-comments.awk b/make/scripts/strip-c-comments.awk new file mode 100755 index 000000000..4f35452b2 --- /dev/null +++ b/make/scripts/strip-c-comments.awk @@ -0,0 +1,59 @@ +#!/usr/bin/awk + +BEGIN { ORS = "" ; C99=1 } + +{ code = code $0 "\n" } + +END { + while ( length(code) ) + code = process( code ) +} + +function process( text ) +{ + if ( C99 ) { + if ( match( text, /"|'|\/\*|\/\// ) ) { + return span( text ) + } + } else if ( match( text, /"|'|\/\*/ ) ) { + return span( text ) + } + print text + return "" +} + +function span( text , starter ) +{ + print substr( text, 1, RSTART - 1 ) + starter = substr( text, RSTART, RLENGTH ) + text = substr( text, RSTART + RLENGTH ) + + if ( "\"" == starter || "'" == starter ) { + return quoted( text, starter ) + } + if ( "//" == starter ) { + return remove( text, "\n", "\n" ) + } + ## Allow for + ## /* foo *\ + ## / + return remove( text, "\\*(\\\\\n)?/", " " ) +} + +function remove( text, ender, replacement ) +{ + print replacement + return substr( text, match(text, ender) + RLENGTH ) +} + +function quoted( text, starter ) +{ + if ( "'" == starter ) { + match( text, /^(\\.|[^'])*'/ ) + } else { + match( text, /^(\\.|\?\?\/.|[^"])*"/ ) + } + print starter substr( text, 1, RLENGTH ) + return substr( text, RSTART + RLENGTH ) +} + |