qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] configure: Use discovered make for in-source build


From: Roman Bolshakov
Subject: Re: [PATCH 1/4] configure: Use discovered make for in-source build
Date: Tue, 25 Aug 2020 13:16:49 +0300

On Tue, Aug 25, 2020 at 01:07:55AM +0300, Roman Bolshakov wrote:
> On Mon, Aug 24, 2020 at 09:37:07AM -0500, Eric Blake wrote:
> > On 8/22/20 4:21 PM, Roman Bolshakov wrote:
> > > @@ -38,6 +38,8 @@ then
> > >   # This file is auto-generated by configure to support in-source tree
> > >   # 'make' command invocation
> > > +include build/config-host.mak
> > 
> > Should this use '-include' (also spelled 'sinclude'), to avoid halting the
> > build if build/config-host.mak doesn't exist for whatever reason?
> > 
> 
> Sure I can do (and thanks for the noticed typos) but I tested that if
> the build is interrupted too early (before Makefile is symlinked to
> build directory but after GNUmakefile is created) it would fail even if
> -include is used:
> 
> $ make
> changing dir to build for /Library/Developer/CommandLineTools/usr/bin/make 
> ""...
> make[1]: Makefile: No such file or directory
> make[1]: *** No rule to make target `Makefile'.  Stop.
> changing dir to build for /Library/Developer/CommandLineTools/usr/bin/make 
> ""...
> make[1]: Makefile: No such file or directory
> make[1]: *** No rule to make target `Makefile'.  Stop.
> make: *** [all] Error 2
> 
> I'm also curious why the switch happens twice... According to the debug
> trace, it tries to remake build/config-host.mak using the implicit force
> rule:
> 
> GNUmakefile:12: update target 'build/config-host.mak' due to: force
> 
> Then there should be an explicit empty rule for build/config-host.mak. I
> will send a fix for that in v2. Then it would fail like this:
> 
> $ make
> changing dir to build for /Library/Developer/CommandLineTools/usr/bin/make 
> ""...
> make[1]: Makefile: No such file or directory
> make[1]: *** No rule to make target `Makefile'.  Stop.
> make: *** [all] Error 2
> 
> > > +
> > >   ifeq ($(MAKECMDGOALS),)
> > >   recurse: all
> > >   endif
> > > 
> > 

Hi Eric,

What if we just print an error if build/config-host.mak can't be found?

ifeq ($(wildcard build/config-host.mak),)
$(error "Incomplete configuration. Please run ./configure")
endif

IMO this is more sane approach than proceeding with partially-configured
not working build without a Makefile in proper place.

Regards,
Roman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]