diff options
author | Emmanuel Bouthenot <kolter@openics.org> | 2006-10-29 12:29:01 +0000 |
---|---|---|
committer | Emmanuel Bouthenot <kolter@openics.org> | 2006-10-29 12:29:01 +0000 |
commit | 9d96e3ad33a334065e8127323daeff79475de563 (patch) | |
tree | 4c9e199f1707030c955f78076aa0979524373fb8 /autogen.sh | |
parent | Added "pyexec" script (diff) | |
download | weechat-9d96e3ad33a334065e8127323daeff79475de563.tar.xz weechat-9d96e3ad33a334065e8127323daeff79475de563.zip |
improve autogen.sh script (fancy output, better gettext usage)
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 79 |
1 files changed, 61 insertions, 18 deletions
diff --git a/autogen.sh b/autogen.sh index a298045d3..031f07e7f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,20 +1,63 @@ #!/bin/sh -# gettextize updates Makefile.am, configure.in -cp configure.in configure.in.old -cp Makefile.am Makefile.am.old -if test "$1" = "--auto" ; then - grep -v 'read dummy < /dev/tty' $(which gettextize) | /bin/sh -s -- --copy --force --intl --no-changelog -else - gettextize --copy --force --intl --no-changelog -fi -mv Makefile.am.old Makefile.am -mv configure.in.old configure.in -libtoolize --automake --force --copy -aclocal -# autoheader creates config.h.in needed by autoconf -autoheader -# autoconf creates configure -autoconf -# automake creates Makefile.in -automake --add-missing --copy --gnu +### +### common stuff +### +OK="\\033[70G[\\033[1;32mOK\\033[1;00m]" +FAIL="\\033[70G[\\033[1;31mFAILED\\033[1;00m]" + +AUTOGEN_LOG=autogen.log + +err () +{ + echo "-------" + echo "Error :" + echo "---8<-----------------------------------" + cat $AUTOGEN_LOG + echo "----------------------------------->8---" + exit 1 +} + +run () +{ + echo -n "Running \"$@\"" + eval $@ >$AUTOGEN_LOG 2>&1 + if [ $? = 0 ] ; then + echo -e $OK + else + echo -e $FAIL + err + fi +} + +### +### cleanning part +### +# remove autotools stuff +run "rm -rf config" +run "rm -f config.h.in" +run "rm -f aclocal.m4 configure config.log config.status" +run "rm -rf autom4te*.cache" +# remove libtool stuff +run "rm -f libtool" +# remove gettext stuff +run "rm -f ABOUT-NLS" +run "rm -rf intl" + +### +### configuration part +### +# create the config directory +run "mkdir -p config/m4" +run "mkdir intl" + +# execute autotools cmds +run "autopoint -f" +run "libtoolize --automake --force --copy" +run "aclocal --force -I config/m4" +run "autoheader" +run "autoconf" +run "automake --add-missing --copy --gnu" + +# ending +rm -f $AUTOGEN_LOG |