build: Allow disabling maintainer mode
authorAnders Olofsson <anders.olofsson@axis.com>
Mon, 11 Nov 2013 01:41:25 +0000 (23:41 -0200)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 11 Nov 2013 01:41:32 +0000 (23:41 -0200)
This allows make rules for generated build files (i.e.  configure,
Makefile.in, ... ) to be skipped.  This is useful when
the source is stored without timestamps (for example in CVS or GIT).

When the build rules trigger to regenerate the build files, it tries to
use the same autotools version (currently 1.14) as was originally used
for the release.  Since many of our build machines run Debian Squeeze,
they only have autotools 1.11 available and the build fails.

Currently, we have to work around this by touching all the generated
files before building to avoid triggering the make rule. With this
patch, we would be able to just run configure with
--disable-maintainer-mode instead.  The patch sets the default to enable
to not change the default behavior.

configure.ac

index 38187a1..5b484d6 100644 (file)
@@ -17,6 +17,7 @@ m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
 AM_SILENT_RULES([yes])
 LT_INIT([disable-static pic-only])
 AC_PREFIX_DEFAULT([/usr])
+AM_MAINTAINER_MODE([enable])
 
 AS_IF([test "x$enable_static" = "xyes"],
       [AC_MSG_ERROR([--enable-static is not supported by kmod])])