Added pkgconfig files for libbarrydp and libbarryjdwp
[barry.git] / buildgen.sh
blob6c1f11c51455203897983b39cec41da9de05db0a
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
15 # Generates the build system.
18 if [ "$1" = "cleanall" ] ; then
19 make distclean
20 (cd gui && make distclean)
21 (cd opensync-plugin && make distclean)
22 (cd opensync-plugin-0.4x && make distclean)
23 ./buildgen.sh clean
24 (cd gui && ./buildgen.sh clean)
25 (cd opensync-plugin && ./buildgen.sh clean)
26 (cd opensync-plugin-0.4x && ./buildgen.sh clean)
27 elif [ "$1" = "clean" ] ; then
28 rm -rf autom4te.cache
29 rm -f Makefile.in aclocal.m4 config.guess config.h.in config.sub \
30 configure depcomp install-sh ltmain.sh missing \
31 src/Makefile.in tools/Makefile.in examples/Makefile.in \
32 man/Makefile.in INSTALL config.h.in~
33 # clean up Debian build trails
34 rm -rf debian/barry
35 rm -f build-arch-stamp build-indep-stamp configure-stamp \
36 debian/barry.substvars debian/files \
37 tools/bcharge
38 # clean up ctags trails
39 rm -f src/tags tools/tags examples/tags \
40 gui/src/tags \
41 opensync-plugin/src/tags \
42 opensync-plugin-0.4x/src/tags
43 elif [ "$1" = "ctags" ] ; then
44 echo "Building ctags..."
45 (cd src && ctags -R)
46 (cd tools && ctags -R)
47 (cd examples && ctags -R)
48 (cd gui/src && ctags -R)
49 if [ "$2" = "0.22" ] ; then
50 (cd opensync-plugin/src && ctags -R)
52 if [ "$2" = "0.4x" ] ; then
53 (cd opensync-plugin-0.4x/src && ctags -R)
55 # and one with everything
56 ctags -R -f ~/tags-barry --tag-relative=yes
58 if [ "$2" = "0.22" ] ; then
59 # add opensync library as well (yes, I know this only works for my
60 # setup... sorry) :-)
61 #OS_DIR=~/software/opensync/svn
62 OS_DIR=~/software/opensync/0.22
63 if [ -d $OS_DIR ] ; then
64 echo "Detected 0.22 opensync source tree, building ctags on it..."
65 (cd $OS_DIR && ctags -R -a -f ~/tags-barry --tag-relative=yes)
69 if [ "$2" = "0.4x" ] ; then
70 OS_DIR=~/software/opensync/git
71 if [ -d $OS_DIR ] ; then
72 echo "Detected 0.4x opensync source tree, building ctags on it..."
73 (cd $OS_DIR && ctags -R -a -f ~/tags-barry --tag-relative=yes)
76 else
77 #autoreconf -if --include=config
78 #autoreconf -ifv --include=config
80 # If we let autoreconf do this, it will run libtoolize after
81 # creating some or all of the configure files. For example,
82 # it might copy files into ../m4 again while processing the
83 # opensync-plugin/ directory, making those files newer than
84 # the gui/configure file. This will cause configure to
85 # be regenerated (incorrectly) during the make step on some
86 # systems (Fedora 11).
88 # So... we do the libtool stuff all at once at the beginning,
89 # then the rest.
90 libtoolit m4
91 (cd gui && libtoolit ../m4)
92 (cd opensync-plugin && libtoolit ../m4)
93 (cd opensync-plugin-0.4x && libtoolit ../m4)
95 # Now for aclocal, autoheader, automake, and autoconf
96 doconf m4
97 (cd gui && doconf ../m4)
98 (cd opensync-plugin && doconf ../m4)
99 (cd opensync-plugin-0.4x && doconf ../m4)