Author: Philip Hazel Date: To: danielg CC: pcre-dev Subject: Re: [pcre-dev] [PATCH] Generating config.h.generic
On Sun, 19 Aug 2012, Daniel Richard G. wrote:
> The code is invoked when you do "make dist" or "make distcheck" (after having
> run ./configure, of course) to generate a distribution tarball.
But when "make distcheck" is run, it uses non-default arguments to
configure. These lines are from configure.ac:
# When we run 'make distcheck', use these arguments. Turning off compiler
# optimization makes it run faster.
DISTCHECK_CONFIGURE_FLAGS="CFLAGS='' CXXFLAGS='' --enable-pcre16 --enable-jit --enable-cpp --enable-unicode-properties"
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
Note that it enables 16-bit and JIT and other things. However,
config.h.generic should be a copy of config.h created with default (i.e.
no) arguments for ./configure, so that using config.h.generic gives you
the same result as just running the command "./configure".
> (Given that config.h.generic is a generated file, and its contents depend on
> what's in configure.ac, it makes sense for this file to be produced by a
> makefile rule. So you can do "make config.h.generic".)
I appreciate that argument. Presumably one could make "make
config.h.generic" run "./configure". However, like "make distcheck" it
would destroy any specific configuration you happened to have set up. At
least after "make distcheck" everything is set back to a "make clean"
state.