3 ## bootstrap.sh file for vlc, the VideoLAN Client
4 ## $Id: bootstrap.sh,v 1.5 2002/06/08 14:08:46 sam Exp $
6 ## Authors: Samuel Hocevar <sam@zoy.org>
9 ## autoconf && autoheader
11 echo -n "running the auto* tools: "
19 ## headers which need to be regenerated because of the VLC_EXPORT macro
21 file=src/misc/modules_plugin.h
22 echo -n "creating headers: "
24 sed 's#.*\$[I][d]:.*# * Automatically generated from '$file'.in by bootstrap.sh#' < $file.in > $file
25 echo '#define STORE_SYMBOLS( p_symbols ) \' >> $file
26 cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
27 sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ (p_symbols)->\2_inner = \2; \\/' >> $file
31 file=include/vlc_symbols.h
32 rm -f $file && touch $file
33 echo '/* DO NOT EDIT THIS FILE ! It was generated by bootstrap.sh */' >> $file
35 echo 'struct module_symbols_s' >> $file
37 cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
38 sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ \1 (* \2_inner) \3;/' | sort >> $file
41 echo '#ifdef __PLUGIN__' >> $file
42 cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
43 sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/# define \2 p_symbols->\2_inner/' | sort >> $file
44 echo '#endif /* __PLUGIN__ */' >> $file
50 ## Glade sometimes sucks
52 echo -n "fixing glade bugs: "
53 for file in gnome_interface.c gtk_interface.c
55 if grep -q "DO NOT EDIT THIS FILE" plugins/gtk/$file
57 rm -f /tmp/$$.$file.bak
58 cat > /tmp/$$.$file.bak << EOF
59 /* This file was created automatically by glade and fixed by bootstrap.sh */
63 tail +8 plugins/gtk/$file \
64 | sed 's#DISABLED!!!_("/dev/dvd")#config_GetPsz( "dvd" )#' \
65 | sed 's#DISABLED!!!11954#config_GetInt( "frequency" )#' \
66 | sed 's#DISABLED!!!27500#config_GetInt( "symbol-rate" )#' \
67 | sed 's#_("-:--:--")#"-:--:--"#' \
68 | sed 's#_("---")#"---"#' \
69 | sed 's#_("--")#"--"#' \
70 | sed 's#_("/dev/dvd")#"/dev/dvd"#' \
71 | sed 's#_(\("./."\))#\1#' \
72 | sed 's/_GLADE_SUX_\([^,]*\), NULL/, "\1"/' \
74 mv -f /tmp/$$.$file.bak plugins/gtk/$file
80 if grep -q "DO NOT EDIT THIS FILE" plugins/gtk/$file
82 rm -f /tmp/$$.$file.bak
83 sed 's/DO NOT EDIT THIS FILE.*/This file was created automatically by glade and fixed by bootstrap.sh/ ; s/#if.*ENABLE_NLS.*/#if defined( ENABLE_NLS ) \&\& defined ( HAVE_GETTEXT )/' < plugins/gtk/$file > /tmp/$$.$file.bak
84 mv -f /tmp/$$.$file.bak plugins/gtk/$file
90 ## Update the potfiles because no one ever does it
92 echo -n "updating potfiles: "
94 make update-po 2>&1 | grep '^[^:]*:$' | cut -f1 -d: | tr '\n' ' ' | sed 's/ $//'