summaryrefslogtreecommitdiffstats
path: root/opengl/tools
diff options
context:
space:
mode:
authorJack Palevich <>2009-04-02 13:38:26 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-02 13:38:26 -0700
commitc005f8b8ba22c204f32fa032ab7211f51bf4d677 (patch)
treed744215c2f22a8d98841c772a8104b94a82d9f1f /opengl/tools
parente1ccba2113910acc95284abc1f1a0a477b8af36f (diff)
downloadframeworks_base-c005f8b8ba22c204f32fa032ab7211f51bf4d677.zip
frameworks_base-c005f8b8ba22c204f32fa032ab7211f51bf4d677.tar.gz
frameworks_base-c005f8b8ba22c204f32fa032ab7211f51bf4d677.tar.bz2
AI 144282: Tweak this tool to work with the current directory structure.
Also leave the "generated" directory around if it contains files that need to be checked in. Automated import of CL 144282
Diffstat (limited to 'opengl/tools')
-rwxr-xr-xopengl/tools/glgen/gen17
1 files changed, 14 insertions, 3 deletions
diff --git a/opengl/tools/glgen/gen b/opengl/tools/glgen/gen
index 1c49861..c060040 100755
--- a/opengl/tools/glgen/gen
+++ b/opengl/tools/glgen/gen
@@ -31,13 +31,15 @@ cp -r out/com generated
cp -r out/javax generated
rm -rf out
+KEEP_GENERATED=0
# com_google_android_gles_jni_GLImpl.cpp
-if cmp ../../../frameworks/base/core/jni/com_google_android_gles_jni_GLImpl.cpp generated/C/com_google_android_gles_jni_GLImpl.cpp ; then
+if cmp ../../../../../frameworks/base/core/jni/com_google_android_gles_jni_GLImpl.cpp generated/C/com_google_android_gles_jni_GLImpl.cpp ; then
echo com_google_android_gles_jni_GLImpl.cpp unchanged
else
-echo Please edit ../../../frameworks/base/core/jni/com_google_android_gles_jni_GLImpl.cpp
-echo Please cp generated/C/com_google_android_gles_jni_GLImpl.cpp ../../../frameworks/base/core/jni
+echo Please p4 edit ../../../../../frameworks/base/core/jni/com_google_android_gles_jni_GLImpl.cpp
+echo Please cp generated/C/com_google_android_gles_jni_GLImpl.cpp ../../../../../frameworks/base/core/jni
+KEEP_GENERATED=1
fi
# GLImpl.java
@@ -46,6 +48,7 @@ echo GLImpl.java unchanged
else
echo Please edit ../../java/com/google/android/gles_jni/GLImpl.java
echo Please cp generated/com/google/android/gles_jni/GLImpl.java ../../java/com/google/android/gles_jni
+KEEP_GENERATED=1
fi
# GL.java
@@ -54,6 +57,7 @@ echo GL.java unchanged
else
echo Please edit ../../java/javax/microedition/khronos/opengles/GL.java
echo Please cp generated/javax/microedition/khronos/opengles/GL.java ../../java/javax/microedition/khronos/opengles/GL.java
+KEEP_GENERATED=1
fi
# GL10.java
@@ -62,6 +66,7 @@ echo GL10.java unchanged
else
echo Please edit ../../java/javax/microedition/khronos/opengles/GL10.java
echo Please cp generated/javax/microedition/khronos/opengles/GL10.java ../../java/javax/microedition/khronos/opengles/GL10.java
+KEEP_GENERATED=1
fi
# GL10Ext.java
@@ -70,6 +75,7 @@ echo GL10Ext.java unchanged
else
echo Please edit ../../java/javax/microedition/khronos/opengles/GL10Ext.java
echo Please cp generated/javax/microedition/khronos/opengles/GL10Ext.java ../../java/javax/microedition/khronos/opengles/GL10Ext.java
+KEEP_GENERATED=1
fi
# GL11.java
@@ -78,6 +84,7 @@ echo GL11.java unchanged
else
echo Please edit ../../java/javax/microedition/khronos/opengles/GL11.java
echo Please cp generated/javax/microedition/khronos/opengles/GL11.java ../../java/javax/microedition/khronos/opengles/GL11.java
+KEEP_GENERATED=1
fi
# GL11Ext.java
@@ -86,6 +93,7 @@ echo GL11Ext.java unchanged
else
echo Please edit ../../java/javax/microedition/khronos/opengles/GL11Ext.java
echo Please cp generated/javax/microedition/khronos/opengles/GL11Ext.java ../../java/javax/microedition/khronos/opengles/GL11Ext.java
+KEEP_GENERATED=1
fi
# GL11ExtensionPack.java
@@ -94,6 +102,9 @@ echo GL11ExtensionPack.java unchanged
else
echo Please edit ../../java/javax/microedition/khronos/opengles/GL11ExtensionPack.java
echo Please cp generated/javax/microedition/khronos/opengles/GL11ExtensionPack.java ../../java/javax/microedition/khronos/opengles/GL11ExtensionPack.java
+KEEP_GENERATED=1
fi
+if [ $KEEP_GENERATED == "0" ] ; then
rm -rf generated
+fi