Re: GMAKE 3.81 vs GMAKE 4.2

Kaz Kylheku <[email protected]>
Newsgroups gmane.comp.gnu.make.general
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.