diff mbox series

build/prereq: requie make 4.1 or later

Message ID 20201213071702.154612-1-mail@aparcar.org
State Superseded
Delegated to: Paul Spooren
Headers show
Series build/prereq: requie make 4.1 or later | expand

Commit Message

Paul Spooren Dec. 13, 2020, 7:17 a.m. UTC
FS#2086 "IS_TTY in the makefile is broken" reports flawed detection of
stdout piping to a file. The issue describes how e.g. terminal color
codes and up in log files if running make like `make > log.txt`.

The proposed solution uses the make variable "MAKE_TERMOUT", which was
introduced in make 4.1. All major distributions seem to updated to 4.1
or later, so this ideally dosn't break anything.

Signed-off-by: Paul Spooren <mail@aparcar.org>
---
 include/prereq-build.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Hauke Mehrtens Dec. 13, 2020, 11:35 a.m. UTC | #1
On 12/13/20 8:17 AM, Paul Spooren wrote:
> FS#2086 "IS_TTY in the makefile is broken" reports flawed detection of
> stdout piping to a file. The issue describes how e.g. terminal color
> codes and up in log files if running make like `make > log.txt`.
> 
> The proposed solution uses the make variable "MAKE_TERMOUT", which was
> introduced in make 4.1. All major distributions seem to updated to 4.1
> or later, so this ideally dosn't break anything.

Ubuntu uses make >= 4.1 since 16.04 LTS. (all supported versions)
https://distrowatch.com/table.php?distribution=ubuntu

RedHat 8 uses make 4.2.1, RedHat 7 uses 3.82 which would be too old.
https://distrowatch.com/table.php?distribution=redhat

Debian uses make >= 4.1 since 9 stretch (oldstable)
https://distrowatch.com/table.php?distribution=debian

Please check what is used on MacOS with Felix or Kevin.

> Signed-off-by: Paul Spooren <mail@aparcar.org>
> ---
>   include/prereq-build.mk | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/prereq-build.mk b/include/prereq-build.mk
> index 5045fabdfb..ad204e95e8 100644
> --- a/include/prereq-build.mk
> +++ b/include/prereq-build.mk
> @@ -14,8 +14,8 @@ PKG_NAME:=Build dependency
>   
>   # Required for the toolchain
>   $(eval $(call TestHostCommand,working-make, \
> -	Please install GNU make v3.82 or later. (This version has bugs), \
> -	$(MAKE) -v | grep -E 'Make (3\.8[2-9]|3\.9[0-9]|[4-9]\.)'))
> +	Please install GNU make v4.1 or later., \
> +	$(MAKE) -v | grep -E 'Make (4\.[1-9]|[5-9]\.)'))
>   
>   $(eval $(call TestHostCommand,case-sensitive-fs, \
>   	OpenWrt can only be built on a case-sensitive filesystem, \
>
Adrian Schmutzler Dec. 13, 2020, 12:34 p.m. UTC | #2
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Paul Spooren
> Sent: Sonntag, 13. Dezember 2020 08:17
> To: openwrt-devel@lists.openwrt.org
> Cc: Paul Spooren <mail@aparcar.org>
> Subject: [PATCH] build/prereq: requie make 4.1 or later

there is a typo in the title.

Best

Adrian

> 
> FS#2086 "IS_TTY in the makefile is broken" reports flawed detection of
> stdout piping to a file. The issue describes how e.g. terminal color codes and
> up in log files if running make like `make > log.txt`.
> 
> The proposed solution uses the make variable "MAKE_TERMOUT", which
> was introduced in make 4.1. All major distributions seem to updated to 4.1 or
> later, so this ideally dosn't break anything.
> 
> Signed-off-by: Paul Spooren <mail@aparcar.org>
> ---
>  include/prereq-build.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/prereq-build.mk b/include/prereq-build.mk index
> 5045fabdfb..ad204e95e8 100644
> --- a/include/prereq-build.mk
> +++ b/include/prereq-build.mk
> @@ -14,8 +14,8 @@ PKG_NAME:=Build dependency
> 
>  # Required for the toolchain
>  $(eval $(call TestHostCommand,working-make, \
> -	Please install GNU make v3.82 or later. (This version has bugs), \
> -	$(MAKE) -v | grep -E 'Make (3\.8[2-9]|3\.9[0-9]|[4-9]\.)'))
> +	Please install GNU make v4.1 or later., \
> +	$(MAKE) -v | grep -E 'Make (4\.[1-9]|[5-9]\.)'))
> 
>  $(eval $(call TestHostCommand,case-sensitive-fs, \
>  	OpenWrt can only be built on a case-sensitive filesystem, \
> --
> 2.29.2
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Felix Fietkau Dec. 13, 2020, 3:48 p.m. UTC | #3
On 2020-12-13 12:35, Hauke Mehrtens wrote:
> On 12/13/20 8:17 AM, Paul Spooren wrote:
>> FS#2086 "IS_TTY in the makefile is broken" reports flawed detection of
>> stdout piping to a file. The issue describes how e.g. terminal color
>> codes and up in log files if running make like `make > log.txt`.
>> 
>> The proposed solution uses the make variable "MAKE_TERMOUT", which was
>> introduced in make 4.1. All major distributions seem to updated to 4.1
>> or later, so this ideally dosn't break anything.
> 
> Ubuntu uses make >= 4.1 since 16.04 LTS. (all supported versions)
> https://distrowatch.com/table.php?distribution=ubuntu
> 
> RedHat 8 uses make 4.2.1, RedHat 7 uses 3.82 which would be too old.
> https://distrowatch.com/table.php?distribution=redhat
> 
> Debian uses make >= 4.1 since 9 stretch (oldstable)
> https://distrowatch.com/table.php?distribution=debian
> 
> Please check what is used on MacOS with Felix or Kevin.
macOS still ships an ancient and broken GNU make 3.81 version, which
forces you to install a newer version via homebrew, even without this
patch. No objection from me on raising the minimum version.

- Felix
Petr Štetiar Dec. 14, 2020, 7:38 a.m. UTC | #4
Paul Spooren <mail@aparcar.org> [2020-12-12 21:17:02]:

Hi,

> FS#2086 "IS_TTY in the makefile is broken" reports flawed detection of
> stdout piping to a file. The issue describes how e.g. terminal color
> codes and up in log files if running make like `make > log.txt`.
> 
> The proposed solution uses the make variable "MAKE_TERMOUT", which was
> introduced in make 4.1. All major distributions seem to updated to 4.1
> or later, so this ideally dosn't break anything.

BTW it would be nice to update the README as well.  I think, that it would
make sense to postpone this by a few days, right after the 20.12 is branched.
I'm holding the gcc6+ patch[1] for the similar reasons.

1. https://patchwork.ozlabs.org/project/openwrt/patch/20191112200129.19396-1-ynezz@true.cz/

Cheers,

Petr
diff mbox series

Patch

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 5045fabdfb..ad204e95e8 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -14,8 +14,8 @@  PKG_NAME:=Build dependency
 
 # Required for the toolchain
 $(eval $(call TestHostCommand,working-make, \
-	Please install GNU make v3.82 or later. (This version has bugs), \
-	$(MAKE) -v | grep -E 'Make (3\.8[2-9]|3\.9[0-9]|[4-9]\.)'))
+	Please install GNU make v4.1 or later., \
+	$(MAKE) -v | grep -E 'Make (4\.[1-9]|[5-9]\.)'))
 
 $(eval $(call TestHostCommand,case-sensitive-fs, \
 	OpenWrt can only be built on a case-sensitive filesystem, \