help-make
[Top][All Lists]
Advanced

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

Echoing a list of variables


From: EricDeb
Subject: Echoing a list of variables
Date: Mon, 7 Jul 2008 12:36:33 -0700 (PDT)

I'm working on a way for make to return some information from the makefile
given a particular target. I'll just get right into an example:

Makefile1 (for project A):
VERSIONNAMES = VERSIONA VERSIONB
VERSIONA = foo
VERSIONB = bar
make Makefile2

Makefile1 (for project B):
VERSIONNAMES = VERSIONA
VERSIONA = ugh
make Makefile2

Makefile2:
reportversions :
        ???? Help!

The goal would be for the user to type:
   make reportversions

And have some text spit out to stdout (for project A):

   VERSIONA = foo
   VERSIONB = bar

Or for project B:

   VERSIONA = ugh

Makefile1 is different for various projects but Makefile2 is common to all
of them. I figure there's some sort of for loop involved but I can't see how
this would be done from the make documentation. Any help is appreciated.
-- 
View this message in context: 
http://www.nabble.com/Echoing-a-list-of-variables-tp18324889p18324889.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.





reply via email to

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