diff mbox series

[v2,2/4] Makefile: Require GNU make 3.82+

Message ID 20200825202755.50626-3-r.bolshakov@yadro.com
State New
Headers show
Series Compatibility make fixes for meson | expand

Commit Message

Roman Bolshakov Aug. 25, 2020, 8:27 p.m. UTC
QEMU build fails with cryptic messages if make is too old:

  Makefile.ninja:2655: *** multiple target patterns.  Stop.

To avoid the confusion it's worth to fail the build right away and print
a friendly error message.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Huth Oct. 12, 2020, 9:47 a.m. UTC | #1
On 25/08/2020 22.27, Roman Bolshakov wrote:
> QEMU build fails with cryptic messages if make is too old:
> 
>   Makefile.ninja:2655: *** multiple target patterns.  Stop.
> 
> To avoid the confusion it's worth to fail the build right away and print
> a friendly error message.
> 
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
> ---
>  Makefile | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index 81794d5c34..b4ebf3e30f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -4,6 +4,11 @@ ifneq ($(words $(subst :, ,$(CURDIR))), 1)
>    $(error main directory cannot contain spaces nor colons)
>  endif
>  
> +ifeq ($(filter undefine,$(value .FEATURES)),)
> +$(error Unsupported Make version: $(MAKE_VERSION). \
> +        Please use GNU Make 3.82 or above)
> +endif
> +
>  # Always point to the root of the build tree (needs GNU make).
>  BUILD_DIR=$(CURDIR)

Reviewed-by: Thomas Huth <thuth@redhat.com>
Laurent Vivier Dec. 13, 2020, 5:21 p.m. UTC | #2
Le 12/10/2020 à 11:47, Thomas Huth a écrit :
> On 25/08/2020 22.27, Roman Bolshakov wrote:
>> QEMU build fails with cryptic messages if make is too old:
>>
>>   Makefile.ninja:2655: *** multiple target patterns.  Stop.
>>
>> To avoid the confusion it's worth to fail the build right away and print
>> a friendly error message.
>>
>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
>> ---
>>  Makefile | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/Makefile b/Makefile
>> index 81794d5c34..b4ebf3e30f 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -4,6 +4,11 @@ ifneq ($(words $(subst :, ,$(CURDIR))), 1)
>>    $(error main directory cannot contain spaces nor colons)
>>  endif
>>  
>> +ifeq ($(filter undefine,$(value .FEATURES)),)
>> +$(error Unsupported Make version: $(MAKE_VERSION). \
>> +        Please use GNU Make 3.82 or above)
>> +endif
>> +
>>  # Always point to the root of the build tree (needs GNU make).
>>  BUILD_DIR=$(CURDIR)
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 
> 

Applied to my trivial-patches branch.

Thanks,
Laurent
Peter Maydell Dec. 13, 2020, 7:04 p.m. UTC | #3
On Sun, 13 Dec 2020 at 17:22, Laurent Vivier <laurent@vivier.eu> wrote:
>
> Le 12/10/2020 à 11:47, Thomas Huth a écrit :
> > On 25/08/2020 22.27, Roman Bolshakov wrote:
> >> QEMU build fails with cryptic messages if make is too old:
> >>
> >>   Makefile.ninja:2655: *** multiple target patterns.  Stop.
> >>
> >> To avoid the confusion it's worth to fail the build right away and print
> >> a friendly error message.
> >>
> >> +ifeq ($(filter undefine,$(value .FEATURES)),)
> >> +$(error Unsupported Make version: $(MAKE_VERSION). \
> >> +        Please use GNU Make 3.82 or above)
> >> +endif
> >> +
> >>  # Always point to the root of the build tree (needs GNU make).
> >>  BUILD_DIR=$(CURDIR)
> >
> > Reviewed-by: Thomas Huth <thuth@redhat.com>
> >
> >
>
> Applied to my trivial-patches branch.

Commit 09e93326e448ab4 says that the switch to ninja from
ninjatool removed the requirement for Make 3.82. Is this
change still required?

thanks
-- PMM
Laurent Vivier Dec. 13, 2020, 10:56 p.m. UTC | #4
Le 13/12/2020 à 20:04, Peter Maydell a écrit :
> On Sun, 13 Dec 2020 at 17:22, Laurent Vivier <laurent@vivier.eu> wrote:
>>
>> Le 12/10/2020 à 11:47, Thomas Huth a écrit :
>>> On 25/08/2020 22.27, Roman Bolshakov wrote:
>>>> QEMU build fails with cryptic messages if make is too old:
>>>>
>>>>   Makefile.ninja:2655: *** multiple target patterns.  Stop.
>>>>
>>>> To avoid the confusion it's worth to fail the build right away and print
>>>> a friendly error message.
>>>>
>>>> +ifeq ($(filter undefine,$(value .FEATURES)),)
>>>> +$(error Unsupported Make version: $(MAKE_VERSION). \
>>>> +        Please use GNU Make 3.82 or above)
>>>> +endif
>>>> +
>>>>  # Always point to the root of the build tree (needs GNU make).
>>>>  BUILD_DIR=$(CURDIR)
>>>
>>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>>>
>>>
>>
>> Applied to my trivial-patches branch.
> 
> Commit 09e93326e448ab4 says that the switch to ninja from
> ninjatool removed the requirement for Make 3.82. Is this
> change still required?
>

It seems 09e93326e448ab4 has been committed on 17th of October, so after Thomas' review.
I remove it from my queue.

Thanks,
Laurent
Roman Bolshakov Dec. 14, 2020, 1:46 p.m. UTC | #5
On Sun, Dec 13, 2020 at 11:56:22PM +0100, Laurent Vivier wrote:
> Le 13/12/2020 à 20:04, Peter Maydell a écrit :
> > On Sun, 13 Dec 2020 at 17:22, Laurent Vivier <laurent@vivier.eu> wrote:
> >>
> >> Le 12/10/2020 à 11:47, Thomas Huth a écrit :
> >>> On 25/08/2020 22.27, Roman Bolshakov wrote:
> >>>> QEMU build fails with cryptic messages if make is too old:
> >>>>
> >>>>   Makefile.ninja:2655: *** multiple target patterns.  Stop.
> >>>>
> >>>> To avoid the confusion it's worth to fail the build right away and print
> >>>> a friendly error message.
> >>>>
> >>>> +ifeq ($(filter undefine,$(value .FEATURES)),)
> >>>> +$(error Unsupported Make version: $(MAKE_VERSION). \
> >>>> +        Please use GNU Make 3.82 or above)
> >>>> +endif
> >>>> +
> >>>>  # Always point to the root of the build tree (needs GNU make).
> >>>>  BUILD_DIR=$(CURDIR)
> >>>
> >>> Reviewed-by: Thomas Huth <thuth@redhat.com>
> >>>
> >>>
> >>
> >> Applied to my trivial-patches branch.
> > 
> > Commit 09e93326e448ab4 says that the switch to ninja from
> > ninjatool removed the requirement for Make 3.82. Is this
> > change still required?
> >
> 
> It seems 09e93326e448ab4 has been committed on 17th of October, so after Thomas' review.
> I remove it from my queue.
> 

I can confirm:

./configure --target-list=x86_64-softmmu --enable-trace-backends=dtrace && make -j$(nproc)

Works fine on macOS with the latest qemu HEAD. The patch can be
discarded.

Regards,
Roman
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 81794d5c34..b4ebf3e30f 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,11 @@  ifneq ($(words $(subst :, ,$(CURDIR))), 1)
   $(error main directory cannot contain spaces nor colons)
 endif
 
+ifeq ($(filter undefine,$(value .FEATURES)),)
+$(error Unsupported Make version: $(MAKE_VERSION). \
+        Please use GNU Make 3.82 or above)
+endif
+
 # Always point to the root of the build tree (needs GNU make).
 BUILD_DIR=$(CURDIR)