configure: emit command line options to mk/config.mk

This can be useful to know which command line parameters
were passed to configure to generate the current
build environment.

Fixes issue #2758.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia662c73072101abfc5f59c463f4a1c821c3fa0e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15249
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Jim Harris 2022-11-03 07:28:06 +00:00 committed by Tomasz Zawadzki
parent 3d2a3ee4df
commit 51ab849bdf
2 changed files with 4 additions and 0 deletions

2
CONFIG
View File

@ -4,6 +4,8 @@
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# configure options: __CONFIGURE_OPTIONS__
# Installation prefix
CONFIG_PREFIX="/usr/local"

2
configure vendored
View File

@ -1196,6 +1196,8 @@ fi
echo -n "Creating mk/config.mk..."
cp -f $rootdir/CONFIG $rootdir/mk/config.mk
ARGS=$(echo "$@" | sed 's/ /\\ /g')
sed -i.bak -r "s#__CONFIGURE_OPTIONS__#${ARGS}#g" $rootdir/mk/config.mk
for key in "${!CONFIG[@]}"; do
sed -i.bak -r "s#[[:space:]]*CONFIG_${key}=.*#CONFIG_${key}\?=${CONFIG[$key]}#g" $rootdir/mk/config.mk
done