3 ## bootstrap.sh file for vlc, the VideoLAN Client
4 ## $Id: bootstrap.sh,v 1.10 2002/08/07 21:36:55 massiot Exp $
6 ## Authors: Samuel Hocevar <sam@zoy.org>
9 ### get a sane environment
17 while test $# -gt 0; do
23 echo "unknown option $1"
30 ## autoconf && autoheader
32 echo -n " + running the auto* tools: "
40 ## headers which need to be regenerated because of the VLC_EXPORT macro
42 file=src/misc/modules_plugin.h
43 echo -n " + creating headers: "
45 sed 's#.*\$[I][d]:.*# * Automatically generated from '$file'.in by bootstrap.sh#' < $file.in > $file
46 echo '#define STORE_SYMBOLS( p_symbols ) \' >> $file
47 cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
48 sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ (p_symbols)->\2_inner = \2; \\/' >> $file
52 file=include/vlc_symbols.h
53 rm -f $file && touch $file
54 echo '/* DO NOT EDIT THIS FILE ! It was generated by bootstrap.sh */' >> $file
56 echo 'struct module_symbols_t' >> $file
58 cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
59 sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ \1 (* \2_inner) \3;/' | sort >> $file
62 echo '#ifdef __PLUGIN__' >> $file
63 cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
64 sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/# define \2 p_symbols->\2_inner/' | sort >> $file
65 echo '#endif /* __PLUGIN__ */' >> $file
71 ## Glade sometimes sucks
73 echo -n " + fixing glade bugs: "
74 for file in gnome_interface.c gtk_interface.c
76 if grep "DO NOT EDIT THIS FILE" modules/gui/gtk/$file 2>&1 > /dev/null
78 rm -f /tmp/$$.$file.bak
79 cat > /tmp/$$.$file.bak << EOF
80 /* This file was created automatically by glade and fixed by bootstrap.sh */
84 tail +8 modules/gui/gtk/$file \
85 | sed 's#DISABLED!!!_("/dev/dvd")#config_GetPsz( "dvd" )#' \
86 | sed 's#DISABLED!!!11954#config_GetInt( "frequency" )#' \
87 | sed 's#DISABLED!!!27500#config_GetInt( "symbol-rate" )#' \
88 | sed 's#_("-:--:--")#"-:--:--"#' \
89 | sed 's#_("---")#"---"#' \
90 | sed 's#_("--")#"--"#' \
91 | sed 's#_("/dev/dvd")#"/dev/dvd"#' \
92 | sed 's#_(\("./."\))#\1#' \
94 mv -f /tmp/$$.$file.bak modules/gui/gtk/$file
100 if grep "DO NOT EDIT THIS FILE" modules/gui/gtk/$file 2>&1 > /dev/null
102 rm -f /tmp/$$.$file.bak
103 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 )/' < modules/gui/gtk/$file > /tmp/$$.$file.bak
104 mv -f /tmp/$$.$file.bak modules/gui/gtk/$file
110 ## Update the potfiles because no one ever does it
112 if test "$do_po" = "no"
114 echo "not updating potfiles. use --update-po to force doing it."
116 echo -n " + updating potfiles: "
118 make update-po 2>&1 | grep '^[^:]*:$' | cut -f1 -d: | tr '\n' ' ' | sed 's/ $//'