public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] Makefile: Use sort shortopts
@ 2023-07-20 12:50 Marek Vasut
  2023-07-20 13:45 ` Mark Kettenis
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marek Vasut @ 2023-07-20 12:50 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, Milan P . Stanić, Christoph Niedermaier,
	Marek Behún, Simon Glass, Stefano Babic, u-boot

POSIX does not defined longopts for sort, use shortops
for even more compatibility.

Fixes: cc5a490cf465 ("Makefile: Sort u-boot-initial-env output")
Reported-by: Milan P. Stanić <mps@arvanta.net>
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: Marek Behún <marek.behun@nic.cz>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: u-boot@dh-electronics.com
Cc: u-boot@lists.denx.de
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 87f9fc786e8..5fc16b3b1f1 100644
--- a/Makefile
+++ b/Makefile
@@ -2444,7 +2444,7 @@ quiet_cmd_genenv = GENENV  $@
 cmd_genenv = \
 	$(objtree)/tools/printinitialenv | \
 	sed -e '/^\s*$$/d' | \
-	sort --field-separator='=' -k1,1 --stable -o $@
+	sort -t '=' -k 1,1 -s -o $@
 
 u-boot-initial-env: $(env_h) FORCE
 	$(Q)$(MAKE) $(build)=tools $(objtree)/tools/printinitialenv
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makefile: Use sort shortopts
  2023-07-20 12:50 [PATCH] Makefile: Use sort shortopts Marek Vasut
@ 2023-07-20 13:45 ` Mark Kettenis
  2023-07-20 16:28 ` Milan P. Stanić
  2023-07-25 21:14 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Kettenis @ 2023-07-20 13:45 UTC (permalink / raw)
  To: Marek Vasut
  Cc: u-boot, marex, mps, cniedermaier, marek.behun, sjg, sbabic,
	u-boot

> From: Marek Vasut <marex@denx.de>
> Date: Thu, 20 Jul 2023 14:50:42 +0200
> 
> POSIX does not defined longopts for sort, use shortops
> for even more compatibility.

Even though OpenBSD's sort does implement the long options this is
still good to have!

Reviewed-by: Mark Kettenis <kettenis@openbsd.org>

> Fixes: cc5a490cf465 ("Makefile: Sort u-boot-initial-env output")
> Reported-by: Milan P. Stanić <mps@arvanta.net>
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> Cc: Marek Behún <marek.behun@nic.cz>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: u-boot@dh-electronics.com
> Cc: u-boot@lists.denx.de
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 87f9fc786e8..5fc16b3b1f1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2444,7 +2444,7 @@ quiet_cmd_genenv = GENENV  $@
>  cmd_genenv = \
>  	$(objtree)/tools/printinitialenv | \
>  	sed -e '/^\s*$$/d' | \
> -	sort --field-separator='=' -k1,1 --stable -o $@
> +	sort -t '=' -k 1,1 -s -o $@
>  
>  u-boot-initial-env: $(env_h) FORCE
>  	$(Q)$(MAKE) $(build)=tools $(objtree)/tools/printinitialenv
> -- 
> 2.40.1
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makefile: Use sort shortopts
  2023-07-20 12:50 [PATCH] Makefile: Use sort shortopts Marek Vasut
  2023-07-20 13:45 ` Mark Kettenis
@ 2023-07-20 16:28 ` Milan P. Stanić
  2023-07-25 21:14 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Milan P. Stanić @ 2023-07-20 16:28 UTC (permalink / raw)
  To: Marek Vasut
  Cc: u-boot, Christoph Niedermaier, Marek Behún, Simon Glass,
	Stefano Babic, u-boot

On Thu, 2023-07-20 at 14:50, Marek Vasut wrote:
> POSIX does not defined longopts for sort, use shortops
> for even more compatibility.
> 
> Fixes: cc5a490cf465 ("Makefile: Sort u-boot-initial-env output")
> Reported-by: Milan P. Stanić <mps@arvanta.net>
> Signed-off-by: Marek Vasut <marex@denx.de>

Tested-by: Milan P. Stanić <mps@arvanta.net>

small note: single quotes are not needed aroud = (equal sign)

> ---
> Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> Cc: Marek Behún <marek.behun@nic.cz>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: u-boot@dh-electronics.com
> Cc: u-boot@lists.denx.de
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 87f9fc786e8..5fc16b3b1f1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2444,7 +2444,7 @@ quiet_cmd_genenv = GENENV  $@
>  cmd_genenv = \
>  	$(objtree)/tools/printinitialenv | \
>  	sed -e '/^\s*$$/d' | \
> -	sort --field-separator='=' -k1,1 --stable -o $@
> +	sort -t '=' -k 1,1 -s -o $@
>  
>  u-boot-initial-env: $(env_h) FORCE
>  	$(Q)$(MAKE) $(build)=tools $(objtree)/tools/printinitialenv
> -- 
> 2.40.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makefile: Use sort shortopts
  2023-07-20 12:50 [PATCH] Makefile: Use sort shortopts Marek Vasut
  2023-07-20 13:45 ` Mark Kettenis
  2023-07-20 16:28 ` Milan P. Stanić
@ 2023-07-25 21:14 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2023-07-25 21:14 UTC (permalink / raw)
  To: Marek Vasut
  Cc: u-boot, Milan P . Stanić, Christoph Niedermaier,
	Marek Behún, Simon Glass, Stefano Babic, u-boot

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

On Thu, Jul 20, 2023 at 02:50:42PM +0200, Marek Vasut wrote:

> POSIX does not defined longopts for sort, use shortops
> for even more compatibility.
> 
> Fixes: cc5a490cf465 ("Makefile: Sort u-boot-initial-env output")
> Reported-by: Milan P. Stanić <mps@arvanta.net>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
> Tested-by: Milan P. Stanić <mps@arvanta.net>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-25 21:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-20 12:50 [PATCH] Makefile: Use sort shortopts Marek Vasut
2023-07-20 13:45 ` Mark Kettenis
2023-07-20 16:28 ` Milan P. Stanić
2023-07-25 21:14 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox