All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kris Van Hees <kris.van.hees@oracle.com>
To: Nick Alcock <nick.alcock@oracle.com>
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com,
	kris.van.hees@oracle.com
Subject: Re: [PATCH v2 3/9] build: track configured vars
Date: Fri, 2 Aug 2024 01:28:30 -0400	[thread overview]
Message-ID: <ZqxufoUKrt+Mn1lP@oracle.com> (raw)
In-Reply-To: <20240801132156.286780-4-nick.alcock@oracle.com>

On Thu, Aug 01, 2024 at 02:21:50PM +0100, Nick Alcock wrote:
> This lets the build system determine whether a variable was
> explicitly set via ./configure (the assumption being that
> if you set something explicitly, you knew what you were doing,
> so e.g. if you set the --systemd-unit-dir to /foo/bar, you
> have also arranged for systemd to look there for unit files,
> so the build system can install the systemd unit files there
> on the assumption that they will work).
> 
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>

Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>

> ---
>  configure | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/configure b/configure
> index 462548bcc69c..fb9a45cda1b7 100755
> --- a/configure
> +++ b/configure
> @@ -17,13 +17,12 @@ write_make_var()
>  {
>      local val="$(printf "%s" "$2" | sed 's,^.*=,,')"
>  
> -    [[ ! -d build ]] && mkdir -p build
> -
>      if [[ ! -f build/.config-vars.mk.new ]]; then
>          echo '# This file is automatically generated.' > build/.config-vars.mk.new
>      fi
>  
>      printf '%s=%s\n' $1 "$val" >> build/.config-vars.mk.new
> +    printf "override CONFIGURED_VARS+=%s\n" $1 >> build/.config-vars.mk.new
>  }
>  
>  # Write out build/.config/*.mk and build/.config/*.h, which are the same
> @@ -115,7 +114,9 @@ above stick for future make invocations until "make clean".
>  EOF
>  }
>  
> +[[ ! -d build ]] && mkdir -p build
>  rm -rf build/.config.new build/.config-vars.mk.new
> +echo 'override CONFIGURED_VARS=' > build/.config-vars.mk.new
>  trap 'rm -rf build/.config.new build/.config-vars.mk.new' ERR
>  
>  for option in "$@"; do
> @@ -173,8 +174,6 @@ done
>  
>  echo 'Writing build/config-vars.mk'
>  rm -f build/config-vars.mk
> -[[ ! -f build/.config-vars.mk.new ]] && \
> -  touch build/config-vars.mk
>  mv -f build/.config-vars.mk.new build/config-vars.mk
>  
>  rm -rf build/.config
> -- 
> 2.46.0.277.ge12b8151ed

  reply	other threads:[~2024-08-02  5:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 13:21 [PATCH v2 0/9] relocatable DTrace Nick Alcock
2024-08-01 13:21 ` [PATCH v2 1/9] spec: install sdt*.h in /usr/lib64/dtrace/include/sys Nick Alcock
2024-08-02  5:23   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 2/9] build: initial pkg-config support Nick Alcock
2024-08-02  5:24   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 3/9] build: track configured vars Nick Alcock
2024-08-02  5:28   ` Kris Van Hees [this message]
2024-08-01 13:21 ` [PATCH v2 4/9] build: --bindir is supposed to be equivalent to --sbindir Nick Alcock
2024-08-02  5:28   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 5/9] build: the TESTDIR is relative to the LIBDIR by default Nick Alcock
2024-08-02  5:29   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 6/9] build: add a pkg-config file for dtrace consumers: use it Nick Alcock
2024-08-02  5:30   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 7/9] runtest: remove obsolete kernel coverage data collection Nick Alcock
2024-08-02  5:31   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 8/9] build: make dtrace and dtprobed relocatable Nick Alcock
2024-08-02  5:31   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 9/9] test: work when relocated Nick Alcock
2024-08-02  5:32   ` Kris Van Hees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZqxufoUKrt+Mn1lP@oracle.com \
    --to=kris.van.hees@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=nick.alcock@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.