help-make
[Top][All Lists]
Advanced

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

Re: How to print at the start of Makefile


From: Oleksandr Gavenko
Subject: Re: How to print at the start of Makefile
Date: Fri, 01 Apr 2011 15:38:47 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9

On 01.04.2011 15:09, Oleksandr Gavenko wrote:
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).
From http://cvs.savannah.gnu.org/viewvc/make/ChangeLog?root=make&view=markup

2005-02-27  Paul D. Smith  <address@hidden>
        * function.c (func_error): Create a new function $(info ...) that
        simply prints the message to stdout with no extras.

So this func missing in 3.80 (which I have in old Cygwin 1.5 ??):

2002-10-03  Paul D. Smith  <address@hidden>
        * Version 3.80 released.

--
С уважением, Александр Гавенко.



reply via email to

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