From db6e8598a32b44d69bfa5fade6daddf0fa35f37c Mon Sep 17 00:00:00 2001 From: ikits Date: Tue, 6 Jan 2004 21:17:05 +0000 Subject: [PATCH] fixed sed problems git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@189 783a27ee-832a-0410-bc00-9f386506c6dd --- auto/Makefile | 6 ++++-- auto/bin/fix_OML_sync_control.sh | 6 ++++-- auto/bin/update_ext.sh | 26 ++++++++++++++++---------- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/auto/Makefile b/auto/Makefile index fa3fb3c..eb4037b 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -38,7 +38,8 @@ ext: $(EXT)/.dummy $(REGISTRY)/.dummy: $(BIN)/update_registry.sh $(BIN)/update_registry.sh $(REGISTRY) $(REGISTRY_URL) - sed -i -e '7s/\ tmp + mv tmp $(REGISTRY)/ATI/texture_env_combine3.txt touch $@ $(EXT)/.dummy: $(REGISTRY)/.dummy @@ -99,7 +100,8 @@ $(S.DEST)/glew.c: $(EXT)/.dummy $(BIN)/make_list.pl $(EXT)/GLX_* >> $@ cat $(SRC)/glew_post.c >> $@ $(BIN)/fix_OML_sync_control.sh $@ - sed -i -e "s/GLEW_VERSION_STRING/$(GLEW_MAJOR)\.$(GLEW_MINOR)\.$(GLEW_MICRO)/g" $@ + sed -e "s/GLEW_VERSION_STRING/$(GLEW_MAJOR)\.$(GLEW_MINOR)\.$(GLEW_MICRO)/g" $@ > tmp + mv tmp $@ $(S.DEST)/glewinfo.c: $(EXT)/.dummy cp -f $(SRC)/glewinfo_pre.c $@ diff --git a/auto/bin/fix_OML_sync_control.sh b/auto/bin/fix_OML_sync_control.sh index 91bed8a..da70bee 100755 --- a/auto/bin/fix_OML_sync_control.sh +++ b/auto/bin/fix_OML_sync_control.sh @@ -6,5 +6,7 @@ # General Public License Version 2 as published by the Free Software # Foundation or, at your option, any later version. -sed -i -e 's/#ifndef GLX_OML_sync_control/#if !defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /' $1 -sed -i -e 's/#ifdef GLX_OML_sync_control/#if defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /' $1 +sed -e 's/#ifndef GLX_OML_sync_control/#if !defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /' $1 > tmp +mv tmp $1 +sed -e 's/#ifdef GLX_OML_sync_control/#if defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /' $1 > tmp +mv tmp $1 diff --git a/auto/bin/update_ext.sh b/auto/bin/update_ext.sh index 91f31df..7ab8dd9 100755 --- a/auto/bin/update_ext.sh +++ b/auto/bin/update_ext.sh @@ -37,11 +37,12 @@ if [ ! -d $1 ] ; then # fix GL_NV_occlusion_query and GL_HP_occlusion_test grep -v '_HP' $1/GL_NV_occlusion_query > tmp mv tmp $1/GL_NV_occlusion_query - - sed -i -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' \ - $1/GL_HP_occlusion_test - sed -i -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' \ - $1/GL_HP_occlusion_test + sed -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' \ + $1/GL_HP_occlusion_test > tmp + mv tmp $1/GL_HP_occlusion_test + sed -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' \ + $1/GL_HP_occlusion_test > tmp + mv tmp $1/GL_HP_occlusion_test # fix WGL_ATI_pixel_format_float cat >> $1/WGL_ATI_pixel_format_float < tmp + mv tmp $1/GL_ARB_vertex_shader + sed -e 's/v1/y/g' $1/GL_ARB_vertex_shader > tmp + mv tmp $1/GL_ARB_vertex_shader + sed -e 's/v2/z/g' $1/GL_ARB_vertex_shader > tmp + mv tmp $1/GL_ARB_vertex_shader + sed -e 's/v3/w/g' $1/GL_ARB_vertex_shader > tmp + mv tmp $1/GL_ARB_vertex_shader # remove triplicates in GL_ARB_shader_objects, GL_ARB_fragment_shader, # and GL_ARB_vertex_shader @@ -131,7 +136,8 @@ EOT # fix bugs in GL_ARB_vertex_shader grep -v "GL_FLOAT" $1/GL_ARB_vertex_shader > tmp mv tmp $1/GL_ARB_vertex_shader - sed -i -e 's/handle /GLhandleARB /g' $1/GL_ARB_vertex_shader + sed -e 's/handle /GLhandleARB /g' $1/GL_ARB_vertex_shader > tmp + mv tmp $1/GL_ARB_vertex_shader # fix bugs in GL_ARB_shader_objects grep -v "GL_FLOAT" $1/GL_ARB_shader_objects > tmp