Commit 51ab849b authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

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: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Ia662c73072101abfc5f59c463f4a1c821c3fa0e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15249


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarwanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKrzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
parent 3d2a3ee4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
#  Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#

# configure options: __CONFIGURE_OPTIONS__

# Installation prefix
CONFIG_PREFIX="/usr/local"

+2 −0
Original line number Diff line number Diff line
@@ -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