Re: Source file list

Paul Smith <[email protected]>
Newsgroups gmane.comp.gnu.make.windows
Organization GNU's Not Unix!
Message-ID <1269440597.10690.245.camel@homebase>
On Wed, 2010-03-24 at 05:04 -0700, nature wrote:
> Hi ,
> 
> I have a list of src files along with the path in a file. Is it possible to
> include this file ( like SRC = listfiles.txt )instead of listing them as SRC
> = file1.c file2.c ....?

If the file (listfiles.txt) has a syntax like "SRC = file1.c
file2.c ..." then you can include it with:

include listfiles.txt

If not, then you'll have to use $(shell ...).  Since you appear to be on
Windows I'm not sure how exactly to do it; on UNIX you'd say:

SRC := $(shell cat listfiles.txt)

Maybe on Windows you'd use "type" instead of "cat"?  I haven't used
Windows in many years.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email protected]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.