help-gnu-utils
[Top][All Lists]
Advanced

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

Re: Preprocessing files with make


From: Gisle Vanem
Subject: Re: Preprocessing files with make
Date: Wed, 18 Aug 2004 14:00:10 +0200

"Erik Cato" wrote:

> Im trying to preprocess a group o files with the help of make but
> I have no luck. I think I may have overlooked some very important
> issue.
> 
> What i have is a group of souce files (.c and .h) organizied somewhat
> like this:
> 
> +-Source -+- Dir1
>           +- Dir2
>           +- Dir3
> 
> What I want to do is to search the directorys for C files and
> preprocess them to get a new set of files in a new directory
> "proprocessed" or similar.

Have a look at the powerful builtin functions in GNU make.
E.g.
  SRC = $(wildcard Source/Dir1/*.c) \
           $(wildcard Source/Dir2/*.c) \
           $(wildcard Source/Dir3/*.c)

gets you the files. To make a list of preprocessed files (whatever 
that means in your case):
  PP_SRC = $(addprefix preprocessed/, $(notdir $(SRC)))

--gv



reply via email to

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