From 506d45b0208d8d6074d77dfc3f56bb464dccf7bb Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Wed, 29 Dec 2021 17:20:09 +0000 Subject: [PATCH] Configure: added --build-dir option. --- auto/help | 2 ++ auto/init | 16 ---------------- auto/make | 2 +- auto/options | 2 ++ configure | 20 +++++++++++++++++++- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/auto/help b/auto/help index 091802e8..21c52ca4 100644 --- a/auto/help +++ b/auto/help @@ -14,6 +14,8 @@ default: "$NJS_CC_OPT" default: "$NJS_LD_OPT" --ar=FILE set static linking program, default: "$AR" + --build-dir=DIR set build directory, default: "$NJS_BUILD_DIR" + --no-pcre disables PCRE/PCRE2 discovery for RegExp backend. This flag allows to build PCRE/PCRE2 outside of libnjs.a. When this option is enabled diff --git a/auto/init b/auto/init index 4edea8b9..3c928591 100644 --- a/auto/init +++ b/auto/init @@ -15,23 +15,7 @@ NJS_CFLAGS=${NJS_CFLAGS=} NJS_BUILD_DIR=${NJS_BUILD_DIR:-build} -NJS_AUTOTEST=$NJS_BUILD_DIR/autotest -NJS_AUTOCONF_ERR=$NJS_BUILD_DIR/autoconf.err -NJS_AUTO_CONFIG_H=$NJS_BUILD_DIR/njs_auto_config.h -NJS_MAKEFILE=$NJS_BUILD_DIR/Makefile - NJS_LIB_MODULES= -NJS_LIB_INCS="src $NJS_BUILD_DIR" - -test -d $NJS_BUILD_DIR || mkdir $NJS_BUILD_DIR - -> $NJS_AUTOCONF_ERR - -cat << END > $NJS_AUTO_CONFIG_H - -/* This file is auto-generated by configure */ - -END NJS_LIBRT= diff --git a/auto/make b/auto/make index a3c6fca1..6fa45404 100644 --- a/auto/make +++ b/auto/make @@ -242,7 +242,7 @@ lib_test: $NJS_BUILD_DIR/njs_auto_config.h \\ test262: njs - test/test262 + test/test262 --binary=$NJS_BUILD_DIR/njs unit_test: $NJS_BUILD_DIR/njs_auto_config.h \\ $NJS_BUILD_DIR/njs_unit_test diff --git a/auto/options b/auto/options index 5aab0845..3590d22f 100644 --- a/auto/options +++ b/auto/options @@ -31,6 +31,8 @@ do --ld-opt=*) NJS_LD_OPT="$value" ;; --ar=*) AR="$value" ;; + --build-dir=*) NJS_BUILD_DIR="$value" ;; + --address-sanitizer=*) NJS_ADDRESS_SANITIZER="$value" ;; --debug=*) NJS_DEBUG="$value" ;; --debug-memory=*) NJS_DEBUG_MEMORY="$value" ;; diff --git a/configure b/configure index 5fb5af00..b80fed4b 100755 --- a/configure +++ b/configure @@ -14,8 +14,26 @@ set -e set -u . auto/init -. auto/os . auto/options + +NJS_AUTOTEST=$NJS_BUILD_DIR/autotest +NJS_AUTOCONF_ERR=$NJS_BUILD_DIR/autoconf.err +NJS_AUTO_CONFIG_H=$NJS_BUILD_DIR/njs_auto_config.h +NJS_MAKEFILE=$NJS_BUILD_DIR/Makefile + +NJS_LIB_INCS="src $NJS_BUILD_DIR" + +test -d $NJS_BUILD_DIR || mkdir $NJS_BUILD_DIR + +> $NJS_AUTOCONF_ERR + +cat << END > $NJS_AUTO_CONFIG_H + +/* This file is auto-generated by configure */ + +END + +. auto/os . auto/cc . auto/types . auto/endianness -- 2.47.3