On 01.04.2011 14:42, Ajay Jain wrote:
Hi,
I would like to print a banner string whenever user does any operation
in my makefile. The banner echoes some information on the shell. Since
there are many many targets in the makefile, I do not know what the
user will run and therefore I cannot assign the banner target as one
of my rules' dependencies.
Could you suggest something? What I want is :
When I do:
make x Or make y OR ....
The Makefile always prints the following as the first operation:
echo "logname, hostname, date, time etc etc"
Use $(info TEXT) func. Like:
uname_s := $(shell uname -s)
$(info Hello to GNU Make build!)
$(info You run at $(uname_s) OS)
Note that $(info) function is in introduced in GNU Make version 3.79 or
3.80
(if I am not wrong).