help-make
[Top][All Lists]
Advanced

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

Re: GMAKE 3.81 vs GMAKE 4.2


From: Kaz Kylheku
Subject: Re: GMAKE 3.81 vs GMAKE 4.2
Date: Thu, 05 May 2022 12:38:31 -0700
User-agent: Roundcube Webmail/1.4.13

On 2022-05-05 11:07, nikhil jain wrote:
> Thanks Paul and Brian.
> I understand Now it's not possible to find out if it was an incremental
> build or a full build.
> 
> What about the second question ?
> 
> Before exiting make, I want to display the status of the build if it failed
> or passed.. how do I do that ?
> Does make store the exit code somewhere.

Make certainly has a failed termination status for a failed build.
Find the places where it is either returning from main or calling
exit, and work backwards.

You could just wrap make with a script:

  #!/bin/sh
  make "$@" && printf "build failed\n"


> Re-Iterating - I want to display the status of the build before make exits.

Why is that important; is something else going to happen between that
diagnostic and the actual termination of make, such that the diagnostic
must precede that event?

> I do not want the shell which called make to fetch the status. This is a
> requirement in which I need to tell the user that your build was completed
> successfully or had issues.

But another program, such as a script, obtaining the termination status of
make is quite reliable. CI systems all over the world rely on it daily.

I've seen entire toolchains wrapped in scripts (i.e. /path/to/gcc being
a shell script which figures out sysroot parameters and calls the real compiler)
and it made no difference to the build.



reply via email to

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