]> git.sesse.net Git - vlc/blobdiff - toolbox
* modules/audio_output/directx.c: backport of 11335.
[vlc] / toolbox
diff --git a/toolbox b/toolbox
index 62558b87c565a84d4eaeff34f6a0b8b4d4f5734f..9adb9a83e32121bc281aed6295592667d948c86f 100755 (executable)
--- a/toolbox
+++ b/toolbox
@@ -400,10 +400,15 @@ then
   if test -z "${srcdir}"; then
     srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
   fi
+  if test -z "${builddir}"; then
+    builddir="`sed -ne 's/^top_builddir *= *//p' < Makefile`"
+  fi
+  mkdir -p "${builddir}/include"
+
   LIBVLC_HEADERS=`getfiles HEADERS_include`
   BUILTINS=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' vlc-config`
 
-  file="${srcdir}/include/vlc_symbols.h"
+  file="${builddir}/include/vlc_symbols.h"
 
   rm -f ${file}.in
   echo '/* DO NOT EDIT THIS FILE! See Makefile.am */' >> ${file}.in
@@ -421,10 +426,10 @@ then
     mv -f ${file}.in ${file}
   fi
 
-  file="${srcdir}/src/misc/modules_plugin.h"
+  file="${builddir}/src/misc/modules_plugin.h"
 
-  rm -f ${file}.tmp && cp ${file}.in ${file}.tmp
-  sed -e 's#.*\$[I][d]:.*# * Automatically generated from '${file}'.in by bootstrap#' < ${file}.in > ${file}.tmp
+  rm -f ${file}.tmp
+  sed -e 's#.*\$[I][d]:.*# * Automatically generated from '${file}'.in by bootstrap#' < ${srcdir}/src/misc/modules_plugin.h.in > ${file}.tmp
   echo '#define STORE_SYMBOLS( p_symbols ) \' >> ${file}.tmp
   cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/    (p_symbols)->\2_inner = \2; \\/' >> ${file}.tmp
   echo '' >> ${file}.tmp
@@ -436,9 +441,9 @@ then
     mv -f ${file}.tmp ${file}
   fi
 
-  file="${srcdir}/src/misc/modules_builtin.h"
+  file="${builddir}/src/misc/modules_builtin.h"
 
-  rm -f ${file}.tmp && cp ${file}.in ${file}.tmp
+  rm -f ${file}.tmp && cp ${srcdir}/src/misc/modules_builtin.h.in ${file}.tmp
   if test -n "${BUILTINS}"
   then
     for i in `echo ${BUILTINS}`