Fix all include location, and drop versions of the library that were never shipped.
[awesomized/libmemcached] / bootstrap.sh
index 9c8731888fecbe3b402abb75162d361822fe9f1f..b6da38cdf62ec250d7ca90f8a45eb6c92138e675 100755 (executable)
@@ -76,8 +76,8 @@ configure_target_platform () {
 
 setup_gdb_command () {
   GDB_TMPFILE=$(mktemp /tmp/gdb.XXXXXXXXXX)
-  echo "set logging on" > $GDB_TMPFILE
-  echo "set logging overwrite on" >> $GDB_TMPFILE
+  echo "set logging overwrite on" > $GDB_TMPFILE
+  echo "set logging on" >> $GDB_TMPFILE
   echo "set environment LIBTEST_IN_GDB=1" >> $GDB_TMPFILE
   echo "run" >> $GDB_TMPFILE
   echo "thread apply all bt" >> $GDB_TMPFILE
@@ -246,7 +246,7 @@ make_target () {
   fi
 
   MAKE_TARGET=$1
-  run $MAKE $MAKE_J $MAKE_TARGET || die "Cannot execute $MAKE $MAKE_TARGET"
+  run $MAKE $MAKE_TARGET || die "Cannot execute $MAKE $MAKE_TARGET"
 
   if [ -n "$MAKE_TARGET" ]; then
     MAKE_TARGET=$OLD_MAKE_TARGET
@@ -265,6 +265,10 @@ make_distclean () {
   make_target distclean
 }
 
+make_maintainer_clean () {
+  make_target maintainer-clean
+}
+
 make_check () {
   make_target check
 }
@@ -309,24 +313,27 @@ bootstrap() {
   parse_command_line_options $@
   determine_target_platform
 
+  DEFAULT_DEV_AUTORECONF_FLAGS="--install --force --verbose -Wall -Werror"
+  DEFAULT_AUTORECONF_FLAGS="--install --force --verbose -Wall"
+
   if [ -d .git ]; then
-    AUTORECONF_FLAGS="--install --force --verbose -Wall -Werror"
+    AUTORECONF_FLAGS=$DEFAULT_DEV_AUTORECONF_FLAGS
     VCS_CHECKOUT=git
   elif [ -d .bzr ]; then
-    AUTORECONF_FLAGS="--install --force --verbose -Wall -Werror"
+    AUTORECONF_FLAGS=$DEFAULT_DEV_AUTORECONF_FLAGS
     VCS_CHECKOUT=bzr
   elif [ -d .svn ]; then
-    AUTORECONF_FLAGS="--install --force --verbose -Wall -Werror"
+    AUTORECONF_FLAGS=$DEFAULT_DEV_AUTORECONF_FLAGS
     VCS_CHECKOUT=svn
   elif [ -d .hg ]; then
-    AUTORECONF_FLAGS="--install --force --verbose -Wall -Werror"
+    AUTORECONF_FLAGS=$DEFAULT_DEV_AUTORECONF_FLAGS
     VCS_CHECKOUT=hg
   else
-    AUTORECONF_FLAGS="--install --force --verbose -Wall"
+    AUTORECONF_FLAGS=$DEFAULT_AUTORECONF_FLAGS
   fi
 
   if [ -z "$LIBTOOLIZE_FLAGS" ]; then
-    LIBTOOLIZE_FLAGS="--force --verbose"
+    LIBTOOLIZE_FLAGS="--force --verbose --install"
   fi
 
   if [ "$PLATFORM" = "darwin" ]; then
@@ -352,18 +359,15 @@ bootstrap() {
     MAKE="make"
   fi
 
-  # Set ENV MAKE_J in order to override "-j2"
-  if [ -z "$MAKE_J" ]; then
-    MAKE_J="-j2"
-  fi
-
   # Set ENV PREFIX in order to set --prefix for ./configure
   if [ -n "$PREFIX" ]; then 
     PREFIX_ARG="--prefix=$PREFIX"
   fi
 
   if [ -f Makefile ]; then
-    $MAKE $MAKE_J maintainer-clean
+    make_maintainer_clean
+    rm -f Makefile.in
+    rm -f aminclude.am
   fi
 
   run $LIBTOOLIZE $LIBTOOLIZE_FLAGS || die "Cannot execute $LIBTOOLIZE $LIBTOOLIZE_FLAGS"