From: Jeremy Kerr Date: Tue, 12 Oct 2021 06:52:03 +0000 (+0800) Subject: configure: simplify config-host.h & config-host.mak generation X-Git-Tag: v1.0-rc0~86^2~3 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3a84d900;p=users%2Fsagi%2Flibnvme.git configure: simplify config-host.h & config-host.mak generation Create the configuration files using a here-string, rather than separate commands. While we're at it, fix the configure-command-line formatting in the .h header. Signed-off-by: Jeremy Kerr --- diff --git a/configure b/configure index 91a56d05..feb39caa 100755 --- a/configure +++ b/configure @@ -98,18 +98,21 @@ print_config() { CFLAGS="-D_GNU_SOURCE -include config-host.h" BUILD_CFLAGS="" +cmdstr=$(printf " '%s'" "$0" "$@") # Print configure header at the top of $config_host_h -echo "/*" > $config_host_h -echo " * Automatically generated by configure - do not modify" >> $config_host_h -printf " * Configured with:" >> $config_host_h -printf " * '%s'" "$0" "$@" >> $config_host_h -echo "" >> $config_host_h -echo " */" >> $config_host_h - -echo "# Automatically generated by configure - do not modify" > $config_host_mak -printf "# Configured with:" >> $config_host_mak -printf " '%s'" "$0" "$@" >> $config_host_mak -echo >> $config_host_mak +cat > $config_host_h < $config_host_mak <