telepathy: include config.h in more modules
[siplcs.git] / git-build.sh
blobeaf82ae6971acb6662c8fdead2e939a6e181de69
1 #!/bin/sh
3 # Convenience to (re-)build pidgin-sipe from git repository.
5 # Example: add configure parameters
7 # $ ./git-build.sh --with-krb5
9 # Example: setup debug build, e.g. for valgrind ((ba)sh style)
11 # $ CFLAGS="-g -O0" ./git-build.sh
13 # Sanity check
14 if [ ! -x autogen.sh ]; then
15 echo 1>&2 "Your pidgin-sipe repository seems to be broken..."
16 exit 1
19 # Check for previous build artifacts
20 rm -f build.log
21 if [ -r Makefile ]; then
22 echo "Cleaning up previous build artifacts..."
23 echo >build.log "------ Cleanup ------"
24 make >>build.log 2>&1 -k maintainer-clean
27 # Rebuild
29 set -e
30 echo "Generating configure script..."
31 echo >>build.log "------ Generate Configure Script ------"
32 ./autogen.sh >>build.log 2>&1
33 echo -n "Configuring build with"
34 if [ $# -eq 0 ]; then
35 echo "out any options..."
36 else
37 echo " '$@'..."
39 echo >>build.log "------ Configure ------"
40 ./configure >>build.log 2>&1 "$@"
41 echo "Running build..."
42 echo >>build.log "------ Build ------"
43 make >>build.log 2>&1
45 if [ $? -eq 0 ]; then
46 echo >>build.log "------ SUCCESS ------"
47 echo "Congratulations: the build was successful!"
48 else
49 echo >>build.log "------ FAILED ------"
50 echo 1>&2 "Build FAILED!"
52 echo "Details can be found in 'build.log'."