Stefan
Stefan

Reputation: 9329

Print variable value from automake file

I am trying to debug a problem with a build system which uses Automake. Some of the files are not being compiled, which I suspect is a problem with one of the variables being incorrect. Is there something I can put in the Makefile.am to cause it to print out the value of the variable:

E.g.

foo = some_file.c another_file.c

print_out_something_helpful($(foo))

How would I integrate the print_out_something_helpful function with the rules?

Sample output desired would be something like:

 >> Files to compile are "some_file.c another_file.c"

Upvotes: 2

Views: 1936

Answers (1)

Sagar Sakre
Sagar Sakre

Reputation: 2426

You can use echo $(foo) to print the variable value,

foo = some_file.c another_file.c

all:
     echo $(foo))

Upvotes: 1

Related Questions