Just to be clean
[barry.git] / buildgen.sh
blob22e5aaf079fce6c20b07e1e768dc5e69425ca368
1 #!/bin/sh
3 doconf() {
4 aclocal -I $1 && \
5 libtoolize --force --copy && \
6 autoheader && \
7 automake --add-missing --copy --foreign && \
8 autoconf
12 # Generates the build system.
15 if [ "$1" = "cleanall" ] ; then
16 make distclean
17 (cd gui && make distclean)
18 (cd opensync-plugin && make distclean)
19 (cd opensync-plugin-0.4x && make distclean)
20 ./buildgen.sh clean
21 (cd gui && ./buildgen.sh clean)
22 (cd opensync-plugin && ./buildgen.sh clean)
23 (cd opensync-plugin-0.4x && ./buildgen.sh clean)
24 elif [ "$1" = "clean" ] ; then
25 rm -rf autom4te.cache
26 rm -f Makefile.in aclocal.m4 config.guess config.h.in config.sub \
27 configure depcomp install-sh ltmain.sh missing \
28 src/Makefile.in tools/Makefile.in examples/Makefile.in \
29 man/Makefile.in INSTALL config.h.in~
30 # clean up Debian build trails
31 rm -rf debian/barry
32 rm -f build-arch-stamp build-indep-stamp configure-stamp \
33 debian/barry.substvars debian/files \
34 tools/bcharge
35 # clean up ctags trails
36 rm -f src/tags tools/tags examples/tags \
37 gui/src/tags \
38 opensync-plugin/src/tags \
39 opensync-plugin-0.4x/src/tags
40 elif [ "$1" = "ctags" ] ; then
41 echo "Building ctags..."
42 (cd src && ctags -R)
43 (cd tools && ctags -R)
44 (cd examples && ctags -R)
45 (cd gui/src && ctags -R)
46 if [ "$2" = "0.22" ] ; then
47 (cd opensync-plugin/src && ctags -R)
49 if [ "$2" = "0.4x" ] ; then
50 (cd opensync-plugin-0.4x/src && ctags -R)
52 # and one with everything
53 ctags -R -f ~/tags-barry --tag-relative=yes
55 if [ "$2" = "0.22" ] ; then
56 # add opensync library as well (yes, I know this only works for my
57 # setup... sorry) :-)
58 #OS_DIR=~/software/opensync/svn
59 OS_DIR=~/software/opensync/0.22
60 if [ -d $OS_DIR ] ; then
61 echo "Detected opensync source tree, building ctags on it..."
62 (cd $OS_DIR && ctags -R -a -f ~/tags-barry --tag-relative=yes)
66 if [ "$2" = "0.4x" ] ; then
67 OS_DIR=~/software/opensync/git
68 if [ -d $OS_DIR ] ; then
69 echo "Detected opensync source tree, building ctags on it..."
70 (cd $OS_DIR && ctags -R -a -f ~/tags-barry --tag-relative=yes)
73 else
74 #autoreconf -if --include=config
75 #autoreconf -ifv --include=config
77 # autoreconf doesn't seem to support custom .m4 files in config/ (???)
78 # so... do it ourselves
79 doconf m4
80 (cd gui && doconf ../m4)
81 (cd opensync-plugin && doconf ../m4)
82 (cd opensync-plugin-0.4x && doconf ../m4)