4 ## toolbox for the VLC media player
7 ## Copyright (C) 2002-2006 the VideoLAN team
9 ## Authors: Samuel Hocevar <sam@zoy.org>
10 ## RĂ©mi Denis-Courmont <rem # videolan.org>
13 ### Get a sane environment, just in case
29 --update-vc update Microsoft Visual Studio files
30 --update-vc7 update Microsoft Visual .NET files
31 --update-po update translation files
32 --update-includes generate various include files
33 --update-glade2 generate and fix Glade 2 code
34 --update-flexml generate and fix flexml and flex code
35 --distclean "make distclean" on steroids
36 --dist-contrib add the contrib dir to MAKE_DIST
42 ## Extract stuff from Makefile.am
46 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" | \
48 sed -ne 's/[^-$()_a-zA-Z0-9][^-$()_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p' | \
49 sed -e "s,^,${srcdir}/,"
62 --changelog|
--update-changelog)
80 --update-glade2|
--update-glade-2|
--fix-glade2)
96 echo "$0: unknown option $1"
103 ## Add includes to help doxygen
105 if test "${action}" = "include"
108 */vlc_common.h|
*/include
/vlc
/*);;
109 */include
/*.h
) echo "#include <vlc_common.h>" ;;
116 ## Update the CVS changelog
118 if test "${action}" = "changelog"
121 echo "toolbox --changelog no longer required. use this instead:"
122 echo " LANG=C svn log -v -r '{$YEAR-12-31}:{$YEAR-01-01}' > ChangeLog"
127 ## Update the MSVC project files
129 if test "${action}" = "vc"
131 echo "generating Visual Studio files"
133 if test -z "${srcdir}"; then
134 srcdir
="`sed -ne 's/^srcdir *= *//p' < Makefile`"
137 # The evil ^M. printf '\r' does not work in Cygwin.
140 # Variables we get from configure.ac
141 LIBVLC_VERSION
=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac`
142 LIBVLC_CODENAME
=`sed -ne '/CODENAME=/s/.*"\(.*\)"/\1/p' < configure.ac`
143 LIBVLC_SYMBOL
=`echo $LIBVLC_VERSION | sed -e 'y/.-/__/'`
145 # Sources that get built under Win32 - FIXME: anyone wanna deuglify this? :)
146 LIBVLC_SOURCES
=`getfiles SOURCES_libvlc_common; getfiles SOURCES_libvlc_win32; getfiles SOURCES_libvlc_dirent; getfiles SOURCES_libvlc_getopt; getfiles SOURCES_libvlc_libc`
148 LIBVLC_HEADERS
=`getfiles HEADERS_include; getfiles HEADERS_include_built`
150 LIBVLC_PKG_HEADERS
=`getfiles dist_pkginclude_HEADERS`
153 rm -f evc
/*.vcp msvc
/*.dsp msvc
/*.vcproj msvc
/*.sln msvc
/*.ncb
156 for target
in evc
/config.h msvc
/config.h
160 sed -e "s/@CODENAME@/${LIBVLC_CODENAME}/" \
161 -e "s/@VERSION@/${LIBVLC_VERSION}/" \
162 -e "s/@SYMBOL@/${LIBVLC_SYMBOL}/" < ${target}.in > ${target}
166 for target in evc/libvlc.vcp msvc/libvlc.dsp
169 # Top of the project file
170 perl -pe 'if(/ZSOURCESZ/){last;}' < ${target}.in > ${target}
172 for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep -v "/.
*/"`
174 cat >> ${target} << EOF
175 # Begin Source File${M}
176 SOURCE="..
\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
177 # ADD CPP /D "__LIBVLC__
" /D PLUGIN_PATH=\\".
\\" /D DATA_PATH=\\"share
\\"${M}
178 # End Source File${M}
181 for subdir in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/.
*/" | cut -f2 -d/ | sort | uniq`
183 cat >> ${target} << EOF
184 # Begin Group "${subdir}"${M}
186 for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/${subdir}/"`
188 subdir="`echo ${file} | sed -e 's%/[^/]*$%/%' | sed -e 's%/%\\\\%g'`"
189 if test "${target}" = "evc
/libvlc.vcp
"
191 cat >> ${target} << EOF
192 # Begin Source File${M}
193 SOURCE="..
\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
194 # ADD CPP /D "__LIBVLC__
" /D PLUGIN_PATH=\\".
\\" /D DATA_PATH=\\"share
\\"${M}
195 !IF "\$
(CFG
)" == "libvlc
- Win32
(WCE MIPS
) Release
"${M}
196 # PROP Output_Dir "MIPSRel
\\${subdir}"${M}
197 # PROP Intermediate_Dir "MIPSRel
\\${subdir}"${M}
198 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE MIPS
) Debug
"${M}
199 # PROP Output_Dir "MIPSDbg
\\${subdir}"${M}
200 # PROP Intermediate_Dir "MIPSDbg
\\${subdir}"${M}
201 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE SH4
) Release
"${M}
202 # PROP Output_Dir "SH4Rel
\\${subdir}"${M}
203 # PROP Intermediate_Dir "SH4Rel
\\${subdir}"${M}
204 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE SH4
) Debug
"${M}
205 # PROP Output_Dir "SH4Dbg
\\${subdir}"${M}
206 # PROP Intermediate_Dir "SH4Dbg
\\${subdir}"${M}
207 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE SH3
) Release
"${M}
208 # PROP Output_Dir "SH3Rel
\\${subdir}"${M}
209 # PROP Intermediate_Dir "SH3Rel
\\${subdir}"${M}
210 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE SH3
) Debug
"${M}
211 # PROP Output_Dir "SH3Dbg
\\${subdir}"${M}
212 # PROP Intermediate_Dir "SH3Dbg
\\${subdir}"${M}
213 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE ARM
) Release
"${M}
214 # PROP Output_Dir "ARMRel
\\${subdir}"${M}
215 # PROP Intermediate_Dir "ARMRel
\\${subdir}"${M}
216 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE ARM
) Debug
"${M}
217 # PROP Output_Dir "ARMDbg
\\${subdir}"${M}
218 # PROP Intermediate_Dir "ARMDbg
\\${subdir}"${M}
219 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE ARMV4
) Release
"${M}
220 # PROP Output_Dir "ARMV4Rel
\\${subdir}"${M}
221 # PROP Intermediate_Dir "ARMV4Rel
\\${subdir}"${M}
222 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE ARMV4
) Debug
"${M}
223 # PROP Output_Dir "ARMV4Dbg
\\${subdir}"${M}
224 # PROP Intermediate_Dir "ARMV4Dbg
\\${subdir}"${M}
225 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE x86em
) Release
"${M}
226 # PROP Output_Dir "X86EMRel
\\${subdir}"${M}
227 # PROP Intermediate_Dir "X86EMRel
\\${subdir}"${M}
228 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE x86em
) Debug
"${M}
229 # PROP Output_Dir "X86EMDbg
\\${subdir}"${M}
230 # PROP Intermediate_Dir "X86EMDbg
\\${subdir}"${M}
231 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE emulator
) Debug
"${M}
232 # PROP Output_Dir "emulatorDbg
\\${subdir}"${M}
233 # PROP Intermediate_Dir "emulatorDbg
\\${subdir}"${M}
234 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE emulator
) Release
"${M}
235 # PROP Output_Dir "emulatorRel
\\${subdir}"${M}
236 # PROP Intermediate_Dir "emulatorRel
\\${subdir}"${M}
237 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE x86
) Debug
"${M}
238 # PROP Output_Dir "X86Dbg
\\${subdir}"${M}
239 # PROP Intermediate_Dir "X86Dbg
\\${subdir}"${M}
240 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32
(WCE x86
) Release
"${M}
241 # PROP Output_Dir "X86Rel
\\${subdir}"${M}
242 # PROP Intermediate_Dir "X86Rel
\\${subdir}"${M}
244 # End Source File${M}
247 cat >> ${target} << EOF
248 # Begin Source File${M}
249 SOURCE="..
\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
250 # ADD CPP /D "__LIBVLC__
" /D PLUGIN_PATH=\\".
\\" /D DATA_PATH=\\"share
\\"${M}
251 !IF "\$
(CFG
)" == "libvlc
- Win32 Release
"${M}
252 # PROP Output_Dir "Release
\\${subdir}"${M}
253 # PROP Intermediate_Dir "Release
\\${subdir}"${M}
254 !ELSEIF "\$
(CFG
)" == "libvlc
- Win32 Debug
"${M}
255 # PROP Output_Dir "Debug
\\${subdir}"${M}
256 # PROP Intermediate_Dir "Debug
\\${subdir}"${M}
258 # End Source File${M}
262 cat >> ${target} << EOF
267 perl -e 'while(<>){if(/ZSOURCESZ/){last;}}while(<>){if(/ZHEADERSZ/){last;}print $_}' < ${target}.in >> ${target}
268 for file in ${LIBVLC_HEADERS}
270 cat >> ${target} << EOF
271 # Begin Source File${M}
272 SOURCE="..
\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
273 # End Source File${M}
276 cat >> ${target} << EOF
277 # Begin Group "vlc
"${M}
279 for file in ${LIBVLC_PKG_HEADERS}
281 cat >> ${target} << EOF
282 # Begin Source File${M}
283 SOURCE="..
\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
284 # End Source File${M}
287 cat >> ${target} << EOF
290 perl -e 'while(<>){if(/ZHEADERSZ/){last;}}while(<>){print $_}' < ${target}.in >> ${target}
294 for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' ${srcdir}/configure.ac`
296 mf="${srcdir}/modules
/${dir}/Modules.am
"
297 for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}`
299 # this is an attempt at getting a list of plugin sources... we take the
300 # production and remove everything that does not contain "module
", which
301 # means you miss $(NULL), but other variables too.
302 allfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${mf} | awk 'BEGIN{a=0}{if(!a&&$0~/^SOURCES_'${mod}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | grep '\.'`
303 hfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep '\.h$'`
304 cfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep -v '\.h$'`
305 for msdir in evc msvc
307 test "${msdir}" = "evc
" && suf="vcp
" || suf="dsp
"
308 source="${msdir}/plugins.
${suf}.
in"
309 target="${msdir}/plugin_${mod}.${suf}"
311 perl -pe 'if(/ZSOURCESZ/){last;} s/ZPLUGINZ/'${mod}'/g' < ${source} > ${target}
312 for cfile in ${cfiles}
314 cat >> ${target} << EOF
315 # Begin Source File${M}
316 SOURCE="..
\\modules
\\`echo ${dir}/${cfile} | sed 's,/,\\\\,g'`"${M}
317 # ADD CPP /D "__LIBVLC__" /D "__PLUGIN__" /D "MODULE_NAME=${mod}" /D "MODULE_NAME_IS_${mod}" ${M}
318 !IF "\$(CFG)" == "plugin_${mod} - Win32 Release"${M}
319 # PROP Output_Dir "Release\\modules\\`echo ${dir} |
sed 's,/,\\\\,g'`"${M}
320 # PROP Intermediate_Dir "Release\\modules\\`echo ${dir} |
sed 's,/,\\\\,g'`"${M}
321 !ELSEIF "\$(CFG)" == "plugin_${mod} - Win32 Debug"${M}
322 # PROP Output_Dir "Debug\\modules\\`echo ${dir} |
sed 's,/,\\\\,g'`"${M}
323 # PROP Intermediate_Dir "Debug\\modules\\`echo ${dir} |
sed 's,/,\\\\,g'`"${M}
324 # End Source File${M}
327 # sed is really nicer for this... unfortunately it's broken under cygwin
328 # sed -ne '1,/ZSOURCESZ/d; /ZHEADERSZ/,$d; p' < ${source} >> ${target}
329 perl -e 'while(<>){if(/ZSOURCESZ/){last;}}while(<>){if(/ZHEADERSZ/){last;}print $_}' < ${source} >> ${target}
330 for hfile in ${hfiles}
332 cat >> ${target} << EOF
333 # Begin Source File${M}
334 SOURCE="..\\modules\\`echo ${dir}/${hfile} | sed 's,/,\\\\,g'`"${M}
335 # End Source File${M}
338 # sed -ne '1,/ZHEADERSZ/d; p' < ${source} >> ${target}
339 perl
-e 'while(<>){if(/ZHEADERSZ/){last;}}while(<>){print $_}' < ${source} >> ${target}
345 for target
in evc
/vlc.vcp msvc
/vlc.dsp
348 # Top of the project file
349 perl
-pe 'if(/ZSOURCESZ/){last;}' < ${target}.
in > ${target}
351 cat >> ${target} << EOF
352 # Begin Source File${M}
353 SOURCE="..\\src\\vlc.c"${M}
354 # End Source File${M}
356 # Bottom of the project file - handles resource files too
357 perl
-e 'while(<>){if(/ZSOURCESZ/){last;}}while(<>){print $_}' < ${target}.
in >> ${target}
365 ## Update the MSVC (.NET) project files
367 if test "${action}" = "vc7"
369 echo "generating Visual .NET files"
373 # The evil ^M. printf '\r' does not work in Cygwin.
377 # Variables we get from configure.ac
378 LIBVLC_VERSION
=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac`
379 LIBVLC_CODENAME
=`sed -ne '/CODENAME=/s/.*"\(.*\)"/\1/p' < configure.ac`
380 LIBVLC_SYMBOL
=`echo $LIBVLC_VERSION | sed -e 'y/.-/__/'`
382 # Sources that get built under Win32 - FIXME: anyone wanna deuglify this? :)
383 LIBVLC_SOURCES
=`getfiles SOURCES_libvlc_common; getfiles SOURCES_libvlc_win32; getfiles SOURCES_libvlc_dirent; getfiles SOURCES_libvlc_getopt; getfiles SOURCES_libvlc_libc`
385 LIBVLC_HEADERS
=`getfiles HEADERS_include; getfiles HEADERS_include_built`
387 LIBVLC_PKG_HEADERS
=`getfiles dist_pkginclude_HEADERS`
393 for target
in msvc
/config.h
397 sed -e "s/@CODENAME@/${LIBVLC_CODENAME}/" \
398 -e "s/@VERSION@/${LIBVLC_VERSION}/" \
399 -e "s/@SYMBOL@/${LIBVLC_SYMBOL}/" < ${target}.in > ${target}
403 target="msvc
/vlc.vcproj
"
405 # Top of the project file
406 guid=`perl -e 'sub r {return sprintf("%X
", int rand(65536))} print r.r."-".r."-".r."-".r."-".r.r.r'`
407 perl -pe 'if(/ZSOURCESZ/){last;} s/ZGUIDZ/'${guid}'/g' < ${target}.in > ${target}
409 cat >> ${target} << EOF
410 <File RelativePath="..
\\src
\\vlc.c
"></File>${M}
412 # Bottom of the project file - handles resource files too
413 perl -e 'while(<>){if(/ZSOURCESZ/){last;}}while(<>){print $_}' < ${target}.in >> ${target}
416 target=msvc/libvlc.vcproj
418 # Top of the project file
419 guid=`perl -e 'sub r {return sprintf("%X
", int rand(65536))} print r.r."-".r."-".r."-".r."-".r.r.r'`
420 perl -pe 'if(/ZSOURCESZ/){last;} s/ZGUIDZ/'${guid}'/g' < ${target}.in > ${target}
422 for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep -v "/.
*/"`
424 cat >> ${target} << EOF
425 <File RelativePath="..
\\`echo ${dir}/${file} | sed 's,/,\\\\,g'`"></File>${M}
428 for subdir in `for i
in ${LIBVLC_SOURCES} ; do echo $i ; done |
grep "/.*/" | cut
-f2 -d/ |
sort |
uniq`
430 cat >> ${target} << EOF
431 <Filter Name="`echo ${subdir} |
sed s
,/,_
,g
`" Filter="c;cpp">${M}
433 for file in `for i
in ${LIBVLC_SOURCES} ; do echo $i ; done |
grep "/${subdir}/"`
435 cat >> ${target} << EOF
436 <File RelativePath="..\\`echo ${file} |
sed 's,/,\\\\,g'`">${M}
438 if echo ${file} | grep -q '.c$'
440 cat >> ${target} << EOF
441 <FileConfiguration Name="Debug|Win32">${M}
442 <Tool Name="VCCLCompilerTool" ObjectFile="\$(IntDir)/\$(ProjectName)/`echo ${file} |
sed -e s
/\.c$
/.obj
/`"/>${M}
443 </FileConfiguration>${M}
446 cat >> ${target} << EOF
450 cat >> ${target} << EOF
455 perl -e 'while(<>){if(/ZSOURCESZ/){last;}}while(<>){if(/ZHEADERSZ/){last;}print $_}' < ${target}.in >> ${target}
456 for file in ${LIBVLC_HEADERS}
458 cat >> ${target} << EOF
459 <File RelativePath="..\\`echo ${file} |
sed 's,/,\\\\,g'`"></File>${M}
462 cat >> ${target} << EOF
463 <Filter Name="vlc" Filter="h;hpp">${M}
465 for file in ${LIBVLC_PKG_HEADERS}
467 cat >> ${target} << EOF
468 <File RelativePath="..\\`echo ${file} |
sed 's,/,\\\\,g'`"></File>${M}
471 cat >> ${target} << EOF
474 perl -e 'while(<>){if(/ZHEADERSZ/){last;}}while(<>){print $_}' < ${target}.in >> ${target}
477 for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' ${srcdir}/configure.ac
`
479 mf="${srcdir}/modules/${dir}/Modules.am"
480 for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}`
482 # this is an attempt at getting a list of plugin sources... we take the
483 # production and remove everything that does not contain "module", which
484 # means you miss $(NULL), but other variables too.
485 allfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${mf} | awk 'BEGIN{a=0}{if(!a&&$0~/^SOURCES_'${mod}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a
){if($0~
/^
[a-zA-Z
]/){exit;}print
$0}}' | tr '\\ ' '\n\n' | grep '\.
'`
486 hfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep '\.h$
'`
487 cfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep -v '\.h$
'`
490 source="${msdir}/plugins.vcproj.in"
491 target="${msdir}/plugin_${mod}.vcproj"
493 guid=`perl -e 'sub r
{return sprintf
("%X", int rand
(65536))} print r.r.
"-".r.
"-".r.
"-".r.
"-".r.r.r
'`
494 perl -pe 'if(/ZSOURCESZ
/){last
;} s
/ZPLUGINZ
/'${mod}'/g' < ${source} | sed 's,ZGUIDZ,'${guid}',' > ${target}
495 for cfile in ${cfiles}
497 cat >> ${target} << EOF
498 <File RelativePath="..\\modules\\`echo ${dir}/${cfile} | sed 's,/,\\\\,g'`"></File>${M}
501 # sed is really nicer for this... unfortunately it's broken under cygwin
502 # sed -ne '1,/ZSOURCESZ/d; /ZHEADERSZ/,$d; p' < ${source} >> ${target}
503 perl
-e 'while(<>){if(/ZSOURCESZ/){last;}}while(<>){if(/ZHEADERSZ/){last;}print $_}' < ${source} >> ${target}
504 for hfile
in ${hfiles}
506 cat >> ${target} << EOF
507 <File RelativePath="..\\modules\\`echo ${dir}/${hfile} | sed 's,/,\\\\,g'`"></File>${M}
510 # sed -ne '1,/ZHEADERSZ/d; p' < ${source} >> ${target}
511 perl
-e 'while(<>){if(/ZHEADERSZ/){last;}}while(<>){print $_}' < ${source} >> ${target}
521 ## Update the potfiles because no one ever does it
523 if test "${action}" = "po"
525 # find out the source files
526 echo "WARNING: you should run \"make update-po\" instead!" >&2
532 ## Create include files
534 if test "${action}" = "includes"
538 if test -z "${srcdir}"; then
539 srcdir
="`sed -ne 's/^srcdir *= *//p' < Makefile`"
541 if test -z "${builddir}"; then
542 builddir
="`sed -ne 's/^top_builddir *= *//p' < Makefile`"
544 BUILTINS
=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' ${builddir}/vlc-config`
546 file="${builddir}/src/modules/builtin.h"
549 mkdir
-p -- "${builddir}/src/modules"
550 cat "${srcdir}/src/modules/builtin.h.in" > "${file}.tmp" ||
exit 1
551 if test -n "${BUILTINS}"
553 for i
in `echo ${BUILTINS}`
555 echo "int vlc_entry__`echo $i | sed -e 'y@/@_@' -e 's@\..*@@'`( module_t* );" >> "${file}.tmp"
557 echo "" >> "${file}.tmp"
559 echo "#define ALLOCATE_ALL_BUILTINS() \\" >> ${file}.tmp
560 echo " do \\" >> "${file}.tmp"
561 echo " { \\" >> "${file}.tmp"
562 if test -n "${BUILTINS}"
564 for i
in `echo ${BUILTINS}`
566 echo " ALLOCATE_BUILTIN(`echo $i | sed -e 'y@/@_@' -e 's@\..*@@'`); \\" >> "${file}.tmp"
569 echo " } while( 0 );" >> "${file}.tmp"
570 echo "" >> "${file}.tmp" ||
exit 1
571 if diff >/dev
/null
2>&1 "${file}" "${file}.tmp"
575 echo "creating new ${file}"
576 mv -f "${file}.tmp" "${file}"
583 ## Fix glade2-generated files
585 if test "${action}" = "glade2"
587 file="modules/gui/pda/pda.glade"
588 echo "generating code from $file"
589 glade-2
-w "$file" ||
exit 1
591 file="modules/gui/pda/pda_interface.c"
593 if grep "DO NOT EDIT THIS FILE" "$file" >/dev
/null
2>&1
595 rm -f -- "$file.$$.bak"
596 cat > "$file.$$.bak" << EOF
597 /* This file was created automatically by glade2 and fixed by bootstrap */
602 -e 's#_(\(".:..:.."\))#\1#' \
603 -e 's#_(\("[a-z0-9]*://[^"]*"\))#\1#' \
604 -e 's#_("---")#"---"#' \
605 -e 's#_("--")#"--"#' \
606 -e 's#_(\("/dev/[^"]*"\))#\1#' \
607 -e 's#_(\("./."\))#\1#' \
608 < "$file" >> "$file.$$.bak"
609 mv -f "$file.$$.bak" "$file"
618 if test "${action}" = "distclean"
621 # a naive sanity check to make sure we are in a VLC tree
622 test -f vlc.mandriva.spec
-a -f vlc.win32.nsi.
in ||
exit 1
624 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 '{}' ';'
625 (cd autotools
&& find .
-maxdepth 1 -name '[a-z]*' -exec rm -f '{}' ';')
626 find msvc
-type f
-name '*.dsp' -exec rm -f '{}' ';'
627 find evc
-type f
-name '*.vcp' -exec rm -f '{}' ';'
628 find .
-type d
-name '.deps' -exec rm -Rf '{}' ';'
629 find .
-type d
-name '.libs' -exec rm -Rf '{}' ';'
630 # there's some more cruft all around
631 rm -f config.h config.log config.status
632 rm -f vlc vlc-config Makefile Modules.am
633 rm -Rf autom4te.cache
634 echo "\`toolbox --distclean\' is known to be broken."
635 echo "Don't complain if it does not work, or better yet, don't use it."
636 echo "You were warned."
637 # FIXME: a lot of Makefiles are still there
641 ## Add the extras/contrib dir to the distribution
643 if test "${action}" = "contrib"
646 if test ! -d "${distdir}/extras"
648 mkdir
"${distdir}/extras"
650 if test ! -d "${distdir}/extras/contrib"
652 mkdir
"${distdir}/extras/contrib"
654 cp "${srcdir}/extras/contrib/Makefile" "${distdir}/extras/contrib/Makefile"
655 cp "${srcdir}/extras/contrib/README" "${distdir}/extras/contrib/README"
656 cp "${srcdir}/extras/contrib/bootstrap" "${distdir}/extras/contrib/bootstrap"
657 cp "${srcdir}/extras/contrib/change_prefix.sh" "${distdir}/extras/contrib/change_prefix.sh"
658 if test ! -d "${distdir}/extras/contrib/src"
660 mkdir
"${distdir}/extras/contrib/src"
662 cp "${srcdir}/extras/contrib/src/Makefile" "${distdir}/extras/contrib/src/Makefile"
663 cp "${srcdir}/extras/contrib/src/packages.mak" "${distdir}/extras/contrib/src/packages.mak"
664 if test ! -d "${distdir}/extras/contrib/src/Patches"
666 mkdir
"${distdir}/extras/contrib/src/Patches"
668 cp ${srcdir}/extras
/contrib
/src
/Patches
/* "${distdir}/extras/contrib/src/Patches/"