X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=toolbox;h=15260fe5e440aa60f77c504d6e3157342a823c57;hb=22c5fe4ae5640b1f2e7358dccbc720faa84616a2;hp=b0865fb71a4c41ebfe3570db1861f79c89d540b2;hpb=dc130e1e244b5be9a46ad031825f8fba02d3a8ad;p=vlc diff --git a/toolbox b/toolbox index b0865fb71a..15260fe5e4 100755 --- a/toolbox +++ b/toolbox @@ -31,7 +31,6 @@ recognized flags are: --update-po update translation files --update-includes generate various include files --update-version generate src/misc/version.c - --update-glade generate and fix Glade code --update-glade2 generate and fix Glade 2 code --update-flexml generate and fix flexml and flex code --distclean "make distclean" on steroids @@ -82,9 +81,6 @@ case "$1" in --update-flexml) action=flexml ;; - --update-glade|--fix-glade) - action=glade - ;; --update-glade2|--update-glade-2|--fix-glade2) action=glade2 ;; @@ -182,7 +178,7 @@ then cat >> ${target} << EOF # Begin Source File${M} SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M} -# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M} +# ADD CPP /D "__LIBVLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M} # End Source File${M} EOF done @@ -199,7 +195,7 @@ EOF cat >> ${target} << EOF # Begin Source File${M} SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M} -# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M} +# ADD CPP /D "__LIBVLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M} !IF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Release"${M} # PROP Output_Dir "MIPSRel\\${subdir}"${M} # PROP Intermediate_Dir "MIPSRel\\${subdir}"${M} @@ -255,7 +251,7 @@ EOF cat >> ${target} << EOF # Begin Source File${M} SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M} -# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M} +# ADD CPP /D "__LIBVLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M} !IF "\$(CFG)" == "libvlc - Win32 Release"${M} # PROP Output_Dir "Release\\${subdir}"${M} # PROP Intermediate_Dir "Release\\${subdir}"${M} @@ -322,7 +318,7 @@ EOF cat >> ${target} << EOF # Begin Source File${M} SOURCE="..\\modules\\`echo ${dir}/${cfile} | sed 's,/,\\\\,g'`"${M} -# ADD CPP /D "__VLC__" /D "__PLUGIN__" /D "MODULE_NAME=${mod}" /D "MODULE_NAME_IS_${mod}" ${M} +# ADD CPP /D "__LIBVLC__" /D "__PLUGIN__" /D "MODULE_NAME=${mod}" /D "MODULE_NAME_IS_${mod}" ${M} !IF "\$(CFG)" == "plugin_${mod} - Win32 Release"${M} # PROP Output_Dir "Release\\modules\\`echo ${dir} | sed 's,/,\\\\,g'`"${M} # PROP Intermediate_Dir "Release\\modules\\`echo ${dir} | sed 's,/,\\\\,g'`"${M} @@ -631,91 +627,35 @@ EOF exit 0 fi -## -## Fix glade-generated files -## -if test "${action}" = "glade" -then - for file in modules/gui/gtk/gnome.glade modules/gui/gtk/gtk.glade modules/gui/familiar/familiar.glade - do - echo "generating code from $file" - glade -w $file || exit 1 - done - - for file in modules/gui/gtk/gnome_interface.c modules/gui/gtk/gtk_interface.c modules/gui/familiar/interface.c - do - echo "fixing $file" - if grep "DO NOT EDIT THIS FILE" $file >/dev/null 2>&1 - then - rm -f $file.$$.bak - cat > $file.$$.bak << EOF -/* This file was created automatically by glade and fixed by bootstrap */ - -#include -EOF - sed -e 1,7d \ - -e 's#_(\(".:..:.."\))#\1#' \ - -e 's#_(\("[a-z0-9]*://[^"]*"\))#\1#' \ - -e 's#_("---")#"---"#' \ - -e 's#_("--")#"--"#' \ - -e 's#_(\("/dev/[^"]*"\))#"\1"#' \ - -e 's#_(\("./."\))#\1#' \ - < $file >> $file.$$.bak - mv -f $file.$$.bak $file - fi - done - - for file in modules/gui/gtk/gtk_support.h modules/gui/familiar/support.h - do - echo "fixing $file" - if grep "DO NOT EDIT THIS FILE" $file >/dev/null 2>&1 - then - rm -f $file.$$.bak - sed -e 's/DO NOT EDIT.*/Created by glade, fixed by bootstrap/' \ - -e 's,,,' \ - -e 's,#if.*ENABLE_NLS.*,#if 0 /* Disabled by bootstrap */,' \ - -e 's,#else,/* & */,' \ - < $file > $file.$$.bak - mv -f $file.$$.bak $file - fi - done - - exit 0 -fi - ## ## Fix glade2-generated files ## if test "${action}" = "glade2" then - for file in modules/gui/gtk2/gnome2.glade modules/gui/gtk2/gtk2.glade modules/gui/pda/pda.glade - do - echo "generating code from $file" - glade-2 -w $file || exit 1 - done + file="modules/gui/pda/pda.glade" + echo "generating code from $file" + glade-2 -w "$file" || exit 1 - for file in modules/gui/pda/pda_interface.c - do - echo "fixing $file" - if grep "DO NOT EDIT THIS FILE" $file >/dev/null 2>&1 - then - rm -f $file.$$.bak - cat > $file.$$.bak << EOF + file="modules/gui/pda/pda_interface.c" + echo "fixing $file" + if grep "DO NOT EDIT THIS FILE" "$file" >/dev/null 2>&1 + then + rm -f -- "$file.$$.bak" + cat > "$file.$$.bak" << EOF /* This file was created automatically by glade2 and fixed by bootstrap */ #include EOF - sed -e 1,7d \ - -e 's#_(\(".:..:.."\))#\1#' \ - -e 's#_(\("[a-z0-9]*://[^"]*"\))#\1#' \ - -e 's#_("---")#"---"#' \ - -e 's#_("--")#"--"#' \ - -e 's#_(\("/dev/[^"]*"\))#\1#' \ - -e 's#_(\("./."\))#\1#' \ - < $file >> $file.$$.bak - mv -f $file.$$.bak $file - fi - done + sed -e 1,7d \ + -e 's#_(\(".:..:.."\))#\1#' \ + -e 's#_(\("[a-z0-9]*://[^"]*"\))#\1#' \ + -e 's#_("---")#"---"#' \ + -e 's#_("--")#"--"#' \ + -e 's#_(\("/dev/[^"]*"\))#\1#' \ + -e 's#_(\("./."\))#\1#' \ + < "$file" >> "$file.$$.bak" + mv -f "$file.$$.bak" "$file" + fi exit 0 fi @@ -727,10 +667,10 @@ if test "${action}" = "distclean" then set -x # a naive sanity check to make sure we are in a VLC tree - test -f vlc.spec.mdk -a -f vlc.win32.nsi.in || exit 1 + test -f vlc.mandriva.spec -a -f vlc.win32.nsi.in || exit 1 # let's rock! - find . -type f '(' -name '*.[oa]' -o name '*.l[oa]' -o -name '*.so' -o -name '*.sl' -o -name '*.dylib' -o -name '*.dll' -o -name .dirstamp -o '(' '(' ! -path '\./doc/developer/Makefile\.in' ')' -a -name Makefile.in ')' -o -name 'stamp-h*' -o -name '*~' -o -name '*.bak' -o -name '*.moc.cpp' ')' -exec rm -f '{}' ';' - (cd autotools && find . -name '[a-z]*' -maxdepth 1 -exec rm -f '{}' ';') + find . -false -path './extras/contrib/*' -type f '(' -name '*.[oa]' -o -name '*.l[oa]' -o -name '*.so' -o -name '*.sl' -o -name '*.dylib' -o -name '*.dll' -o -name .dirstamp -o '(' '(' ! -path '\./doc/developer/Makefile\.in' ')' -a -name Makefile.in ')' -o -name 'stamp-h*' -o -name '*~' -o -name '*.bak' -o -name '*.moc.cpp' ')' -exec rm -f '{}' ';' + (cd autotools && find . -maxdepth 1 -name '[a-z]*' -exec rm -f '{}' ';') find msvc -type f -name '*.dsp' -exec rm -f '{}' ';' find evc -type f -name '*.vcp' -exec rm -f '{}' ';' find . -type d -name '.deps' -exec rm -Rf '{}' ';' @@ -740,6 +680,9 @@ then rm -f vlc vlc-config Makefile Modules.am rm -Rf autom4te.cache rm -f mozilla/vlcintf.h mozilla/vlcintf.xpt + echo "\`toolbox --distclean\' is known to be broken." + echo "Don't complain if it does not work, or better yet, don't use it." + echo "You were warned." # FIXME: a lot of Makefiles are still there fi