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