From bf931905ff5e65faee529622bcbe5144296d130f Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 12 Sep 2021 16:14:56 +0000 Subject: [PATCH] rebuild codes with configure --enable-regen-codes (new option) add --enable-regen-codes configure option which is used to control invocations of `make codes` Previously these were controlled by --enable-developer, but having it as a separate option is useful too. The default is 'yes' when --enable-developer is given too. --- builds/posix/Makefile.in | 2 +- builds/posix/make.defaults | 5 +++++ configure.ac | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/builds/posix/Makefile.in b/builds/posix/Makefile.in index c7d3336266b..94f8d09443d 100644 --- a/builds/posix/Makefile.in +++ b/builds/posix/Makefile.in @@ -286,7 +286,7 @@ master_process: # even if gpre itself was not rebuilt -$(RM) $(GPRE_CURRENT) (cd $(BIN); $(LN) $(notdir $(GPRE)) $(notdir $(GPRE_CURRENT))) -ifeq ($(IsDeveloper), Y) +ifeq ($(RegenCodes),Y) # In developer mode we must regenerate various files in include/gen $(MAKE) codes endif diff --git a/builds/posix/make.defaults b/builds/posix/make.defaults index 1ba56ccbad9..07e69d9a645 100755 --- a/builds/posix/make.defaults +++ b/builds/posix/make.defaults @@ -108,6 +108,11 @@ PLUSPLUS_FLAGS:= -fno-rtti -std=c++17 # If this is defined then we use special rules useful for developers only IsDeveloper = @DEVEL_FLG@ +RegenCodes = @REGEN_CODES_FLG@ +ifeq ($(IsDeveloper),Y) +RegenCodes := Y +endif + CpuType=@CPU_TYPE@ PLATFORM=@PLATFORM@ SFIO_EXAMPLES=@SFIO_EXAMPLES@ diff --git a/configure.ac b/configure.ac index 928bd909980..bc25ea26c53 100644 --- a/configure.ac +++ b/configure.ac @@ -529,6 +529,16 @@ AC_ARG_ENABLE(developer, esac]) AC_SUBST(DEVEL_FLG) +REGEN_CODES_FLG=$DEVEL_FLG +AC_ARG_ENABLE(regen-codes, + [ --enable-regen-codes re-generate codes (default same as --enable developer)], + [case "$enableval" in + yes) REGEN_CODES_FLG=Y;; + no) REGEN_CODES_FLG=N;; + *) AC_MSG_ERROR(bad value '${enableval}' for --enable-regen-codes);; + esac]) +AC_SUBST(REGEN_CODES_FLG) + CROSS= IS_CROSS=N AC_ARG_WITH(cross-build,