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