joaerl
joaerl

Reputation: 1062

Is there a way to print a final message in gnu make

I have a gnu make target to build with profiling information. I would like to print instructions to the user how to generate the coverage report when make has finished, that is after the last line of output from make.

Example:

$ make coverage
/usr/bin/g++ --coverage ....
...
make[1]: Leaving directory
<I want to print instructions here!>
$

Is there a way to accomplish this? How?

Upvotes: 1

Views: 455

Answers (1)

taskinoor
taskinoor

Reputation: 46037

Just add an @echo statement at the end of your tasks. Like this:

coverage:
    # do your stuff
    @echo foo bar

$ make coverage
foo bar
$

Upvotes: 2

Related Questions