From ff870d1a03befde09b6f6d1d89c0a085f8b061af Mon Sep 17 00:00:00 2001 From: Reuben Hawkins Date: Wed, 5 Mar 2014 15:52:32 -0600 Subject: [PATCH 1/3] configure.ac: use silent rules if available Using silent rules gives a cleaner output from the build. This makes it trivially easy to spot warnings. The original, verbose, output can still be seen by doing one of these... $ ./configure --disable-silent-rules && make ...or... $ ./configure && make V=1 ...otherwise the build output looks like this... $ ./configure && make CC thirdparty/libtap_a-tap.o AR libtap.a CC watchman-argv.o CC watchman-opt.o CC watchman-cfg.o CC watchman-log.o CC watchman-json.o CC watchman-bser.o CC watchman-hash.o CC watchman-ht.o --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index f41ca4eba91b..6f8b9e497139 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,7 @@ AC_INIT([watchman], [2.9.5], [], [watchman]) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)]) CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" case $target_os in From 1dfae2e4d8479c1a704b42ccff6b20b5c5aaccac Mon Sep 17 00:00:00 2001 From: Reuben Hawkins Date: Wed, 5 Mar 2014 15:56:34 -0600 Subject: [PATCH 2/3] configure.ac: output extra build config summery to console It's sometimes useful, and always harmless, to output some extra config summery at the end of the configure script. It'll save some debugging time if your eye catches the -O2 in the CFLAGS before you set out to debug. When that happened, you'd reconfigure with CFLAGS=-g and continue. The output looks like this... ... config.status: creating Makefile config.status: creating thirdparty/jansson/jansson_config.h config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands Your build configuration: CPPFLAGS = -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE CFLAGS = -g -O2 -I/usr/local/Cellar/pcre/8.33/include -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer LDFLAGS = prefix: /usr/local version: 2.9.5 $ --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index 6f8b9e497139..13234792c631 100644 --- a/configure.ac +++ b/configure.ac @@ -190,5 +190,17 @@ AC_CONFIG_HEADER([config.h]) AC_CONFIG_FILES([Makefile thirdparty/jansson/jansson_config.h]) AC_OUTPUT +cat << EOF + +Your build configuration: + + CPPFLAGS = $CPPFLAGS + CFLAGS = $CFLAGS + LDFLAGS = $LDFLAGS + prefix: $prefix + version: $VERSION + +EOF + dnl vim:ts=2:sw=2: From d43d6a6dc152bb7988c169990f71bf46a2c61818 Mon Sep 17 00:00:00 2001 From: Reuben Hawkins Date: Wed, 5 Mar 2014 16:04:15 -0600 Subject: [PATCH 3/3] move foreign option from autogen.sh to Makefile.am $ ./autogen.sh ...generates the build system just fine, but... $ autoreconv -i ...should also work. Both work if the foreign option is specified in Makefile.am instead of on the command line to automake in autogen.sh. The reason to ensure autoreconf works is to reduce the dependency on having the extra autogen.sh script to get the build system going. With this change, ./autogen.sh and autoreconf -i are the same... $ autoreconf -i configure.ac:16: installing './compile' configure.ac:2: installing './config.guess' configure.ac:2: installing './config.sub' configure.ac:3: installing './install-sh' configure.ac:3: installing './missing' Makefile.am: installing './depcomp' parallel-tests: installing './test-driver' $ ./autogen.sh configure.ac:16: installing './compile' configure.ac:2: installing './config.guess' configure.ac:2: installing './config.sub' configure.ac:3: installing './install-sh' configure.ac:3: installing './missing' Makefile.am: installing './depcomp' parallel-tests: installing './test-driver' --- Makefile.am | 2 ++ autogen.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 77b1f3a19781..ad93097d1ded 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = watchman doc_DATA = README.markdown diff --git a/autogen.sh b/autogen.sh index f095e671388e..97e3261a9065 100755 --- a/autogen.sh +++ b/autogen.sh @@ -8,5 +8,5 @@ if test -d config.status ; then fi aclocal autoheader -automake --add-missing --foreign +automake --add-missing autoconf