lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240926-bold-tuscan-marmoset-cfa610@lindesnes>
Date: Thu, 26 Sep 2024 09:54:57 +0200
From: Nicolas Schier <nicolas@...sle.eu>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-kbuild@...r.kernel.org, Miguel Ojeda <ojeda@...nel.org>,
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
	Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH 16/23] kbuild: use 'output' variable to create the output
 directory

On Tue, Sep 17, 2024 at 11:16:44PM +0900, Masahiro Yamada wrote:
> $(KBUILD_OUTPUT) specifies the output directory of kernel builds.
> 
> Use a more generic name, 'output', to better reflect this code hunk in
> the context of external module builds.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
> 
>  Makefile | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 254f05a1cc0f..7a76452049ea 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -176,18 +176,20 @@ export KBUILD_EXTRA_WARN
>  # The O= assignment takes precedence over the KBUILD_OUTPUT environment
>  # variable.
>  
> -# Do we want to change the working directory?
>  ifeq ("$(origin O)", "command line")
>    KBUILD_OUTPUT := $(O)
>  endif
>  
> -ifneq ($(KBUILD_OUTPUT),)
> +output := $(KBUILD_OUTPUT)
> +
> +# Do we want to change the working directory?
> +ifneq ($(output),)
>  # $(realpath ...) gets empty if the path does not exist. Run 'mkdir -p' first.
> -$(shell mkdir -p "$(KBUILD_OUTPUT)")
> +$(shell mkdir -p "$(output)")
>  # $(realpath ...) resolves symlinks
> -abs_output := $(realpath $(KBUILD_OUTPUT))
> -$(if $(abs_output),,$(error failed to create output directory "$(KBUILD_OUTPUT)"))
> -endif # ifneq ($(KBUILD_OUTPUT),)
> +abs_output := $(realpath $(output))
> +$(if $(abs_output),,$(error failed to create output directory "$(output)"))
> +endif
>  
>  ifneq ($(words $(subst :, ,$(abs_srctree))), 1)
>  $(error source directory cannot contain spaces or colons)
> -- 
> 2.43.0
> 
> 

Reviewed-by: Nicolas Schier <nicolas@...sle.eu>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ