]> git.sesse.net Git - vlc/blobdiff - toolbox
* vlc-config.in.in: Used printf instead of a sed construct, just in case
[vlc] / toolbox
diff --git a/toolbox b/toolbox
index 26e2db7f7d73bef80f1f9e6d260ecb892ebf2235..691a011cc03380813f8e41d20f21cb253ddaab3c 100755 (executable)
--- a/toolbox
+++ b/toolbox
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 ##  toolbox for the VLC media player
-##  $Id: toolbox,v 1.30 2003/06/28 13:04:52 sam Exp $
+##  $Id: toolbox,v 1.35 2003/07/01 12:01:22 sam Exp $
 ##
 ##  Authors: Samuel Hocevar <sam@zoy.org>
 
@@ -37,7 +37,7 @@ EOF
 ##
 getfiles()
 {
-  awk 'BEGIN{a=0}{if(!a&&/^'"$1"'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < "${srcdir}/Makefile.am" | \
+  awk 'BEGIN{a=0}{if(!a&&$0~/^'"$1"'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' < "${srcdir}/Makefile.am" | \
     tr '\\ ' '\n\n' | \
     sed -ne 's/[^-$()_a-zA-Z0-9][^-$()_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p' | \
     sed -e "s,^,${srcdir}/,"
@@ -116,7 +116,7 @@ if test "${action}" = "vc"
 then
   echo "generating Visual Studio files..."
 
-  srcdir="`sed -ne 's/^srcdir *= *//p;T;q' < Makefile`"
+  srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
 
   #  The evil ^M
   M="`printf '\r'`"
@@ -263,7 +263,7 @@ EOF
     # this is an attempt at getting a list of plugin sources... we take the
     # production and remove everything that does not contain "module", which
     # means you miss $(NULL), but other variables too.
-    cfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${makefile} | awk 'BEGIN{a=0}{if(!a&&/^SOURCES_'${plugin}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | sed -ne 's,/,\\\\,g; s/.*modules/modules/p'`
+    cfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${makefile} | awk 'BEGIN{a=0}{if(!a&&$0~/^SOURCES_'${plugin}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | sed -ne 's,/,\\\\,g; s/.*modules/modules/p'`
     hfiles=`for i in ${cfiles} ; do echo $i ; done | grep '\.h$'`
     cfiles=`for i in ${cfiles} ; do echo $i ; done | grep -v '\.h$'`
     for dir in evc msvc
@@ -367,7 +367,7 @@ if test "${action}" = "includes"
 then
   #set -x
 
-  srcdir="`sed -ne 's/^srcdir *= *//p;T;q' < Makefile`"
+  srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
   LIBVLC_HEADERS=`getfiles HEADERS_include`
   BUILTINS=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' vlc-config`