debian: adds a version limit on each part to relate to the others
[barry.git] / buildgen.sh
blobf6a023f49c01f94f66ac1432a01692e3821fa87a
1 #!/bin/sh
3 libtoolit() {
4 libtoolize --force --copy
7 doconf() {
8 aclocal -I $1 && \
9 autoheader && \
10 automake --add-missing --copy --foreign && \
11 autoconf
14 cleangettext() {
15 rm -f ABOUT-NLS \
16 gui/ABOUT-NLS \
17 gui/po/Makefile.in.in \
18 gui/po/Makevars.template \
19 gui/po/fr.gmo \
20 gui/po/stamp-po \
21 m4/codeset.m4 \
22 m4/gettext.m4 \
23 m4/glibc2.m4 \
24 m4/glibc21.m4 \
25 m4/iconv.m4 \
26 m4/intdiv0.m4 \
27 m4/intl.m4 \
28 m4/intldir.m4 \
29 m4/intlmacosx.m4 \
30 m4/intmax.m4 \
31 m4/inttypes-pri.m4 \
32 m4/inttypes_h.m4 \
33 m4/lcmessage.m4 \
34 m4/lib-ld.m4 \
35 m4/lib-link.m4 \
36 m4/lib-prefix.m4 \
37 m4/lock.m4 \
38 m4/longlong.m4 \
39 m4/nls.m4 \
40 m4/po.m4 \
41 m4/printf-posix.m4 \
42 m4/progtest.m4 \
43 m4/size_max.m4 \
44 m4/stdint_h.m4 \
45 m4/uintmax_t.m4 \
46 m4/visibility.m4 \
47 m4/wchar_t.m4 \
48 m4/wint_t.m4 \
49 m4/xsize.m4 \
50 po/Makefile.in.in \
51 po/Makevars.template \
52 po/fr.gmo \
53 po/stamp-po
57 # Generates the build system.
60 if [ "$1" = "cleanall" ] ; then
61 make distclean
62 (cd gui && make distclean)
63 (cd opensync-plugin && make distclean)
64 (cd opensync-plugin-0.4x && make distclean)
65 ./buildgen.sh clean
66 (cd gui && ./buildgen.sh clean)
67 (cd opensync-plugin && ./buildgen.sh clean)
68 (cd opensync-plugin-0.4x && ./buildgen.sh clean)
69 cleangettext
70 elif [ "$1" = "clean" ] ; then
71 rm -rf autom4te.cache
72 rm -f Makefile.in aclocal.m4 config.guess config.h.in config.sub \
73 configure depcomp install-sh ltmain.sh missing \
74 src/Makefile.in tools/Makefile.in examples/Makefile.in \
75 man/Makefile.in INSTALL config.h.in~ compile
76 # clean up Debian build trails
77 rm -rf debian/barry
78 rm -f build-arch-stamp build-indep-stamp configure-stamp \
79 debian/barry.substvars debian/files \
80 tools/bcharge
81 # clean up ctags trails
82 rm -f src/tags tools/tags examples/tags \
83 gui/src/tags \
84 opensync-plugin/src/tags \
85 opensync-plugin-0.4x/src/tags
86 elif [ "$1" = "ctags" ] ; then
87 echo "Building ctags..."
88 (cd src && ctags -R)
89 (cd tools && ctags -R)
90 (cd examples && ctags -R)
91 (cd gui/src && ctags -R)
92 if [ "$2" = "0.22" ] ; then
93 (cd opensync-plugin/src && ctags -R)
95 if [ "$2" = "0.4x" ] ; then
96 (cd opensync-plugin-0.4x/src && ctags -R)
98 # and one with everything
99 ctags -R -f ~/tags-barry --tag-relative=yes
101 if [ "$2" = "0.22" ] ; then
102 # add opensync library as well (yes, I know this only works for my
103 # setup... sorry) :-)
104 #OS_DIR=~/software/opensync/svn
105 OS_DIR=~/software/opensync/0.22
106 if [ -d $OS_DIR ] ; then
107 echo "Detected 0.22 opensync source tree, building ctags on it..."
108 (cd $OS_DIR && ctags -R -a -f ~/tags-barry --tag-relative=yes)
112 if [ "$2" = "0.4x" ] ; then
113 OS_DIR=~/software/opensync/git
114 if [ -d $OS_DIR ] ; then
115 echo "Detected 0.4x opensync source tree, building ctags on it..."
116 (cd $OS_DIR && ctags -R -a -f ~/tags-barry --tag-relative=yes)
119 else
120 #autoreconf -if --include=config
121 #autoreconf -ifv --include=config
123 # Autogenerate the gettext PO support files
124 # Do this for ./ and gui/ and then zap the gui/m4 directory
125 autopoint
126 (cd gui && autopoint)
127 rm -rf gui/m4
129 # If we let autoreconf do this, it will run libtoolize after
130 # creating some or all of the configure files. For example,
131 # it might copy files into ../m4 again while processing the
132 # opensync-plugin/ directory, making those files newer than
133 # the gui/configure file. This will cause configure to
134 # be regenerated (incorrectly) during the make step on some
135 # systems (Fedora 11).
137 # So... we do the libtool stuff all at once at the beginning,
138 # then the rest.
139 libtoolit m4
140 (cd gui && libtoolit ../m4)
141 (cd opensync-plugin && libtoolit ../m4)
142 (cd opensync-plugin-0.4x && libtoolit ../m4)
144 # Now for aclocal, autoheader, automake, and autoconf
145 doconf m4
146 (cd gui && doconf ../m4)
147 (cd opensync-plugin && doconf ../m4)
148 (cd opensync-plugin-0.4x && doconf ../m4)