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
14 if [ ! -x autogen.sh
]; then
15 echo 1>&2 "Your pidgin-sipe repository seems to be broken..."
19 # Check for previous build artifacts
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
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"
35 echo "out any options..."
39 echo >>build.log
"------ Configure ------"
40 .
/configure
>>build.log
2>&1 "$@"
41 echo "Running build..."
42 echo >>build.log
"------ Build ------"
46 echo >>build.log
"------ SUCCESS ------"
47 echo "Congratulations: the build was successful!"
49 echo >>build.log
"------ FAILED ------"
50 echo 1>&2 "Build FAILED!"
52 echo "Details can be found in 'build.log'."