[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preprocessing files with make
From: |
Michael Chastain |
Subject: |
Re: Preprocessing files with make |
Date: |
Thu, 19 Aug 2004 12:11:18 -0400 |
User-agent: |
nail 10.8 6/28/04 |
erik.cato@japro.se (Erik Cato) wrote:
> #------------------------------------------------------
> VPATH = $(COMMON_SRC_DIRS)
> SRCS = $(foreach dir,$(VPATH),$(wildcard $(dir)/*.c))
> PREPROCS = $(notdir $(patsubst %.c,%.d,$(SRCS)))
So far so good.
Now you have a list of SRCS, such as "alpha.c beta.c gamma.c"
and a list of PREPROCS, such as "alpha.d beta.d gamma.d".
And you want "make" to behave as if you had these dependencies:
alpha.d: alpha.c
beta.d: beta.c
gamma.d: gamma.c
I don't know how to do that either. If anybody does know,
I'd like to know, too!
Gnu Make supports pattern rules with '%' in them:
%.d: %.c
However this is not as flexible, and pattern rules interact poorly
if you have another dependency rules for the same files.
Michael
- Preprocessing files with make, Erik Cato, 2004/08/18
- Re: Preprocessing files with make, Gisle Vanem, 2004/08/18
- Re: Preprocessing files with make, Erik Cato, 2004/08/19
- Re: Preprocessing files with make, Gisle Vanem, 2004/08/19
- Re: Preprocessing files with make, Colin S. Miller, 2004/08/19
- Re: Preprocessing files with make, Erik Cato, 2004/08/19
- Re: Preprocessing files with make,
Michael Chastain <=
- Message not available
- Re: Preprocessing files with make, Erik Cato, 2004/08/28
- Re: Preprocessing files with make, Paul D. Smith, 2004/08/28
- Re: Preprocessing files with make, Michael Chastain, 2004/08/28
- Message not available
- Re: Preprocessing files with make, Paul D. Smith, 2004/08/29
- Re: Preprocessing files with make, Michael Chastain, 2004/08/29
- Message not available
- Re: Preprocessing files with make, Paul D. Smith, 2004/08/29
- Re: Preprocessing files with make, Michael Chastain, 2004/08/29
- Re: Preprocessing files with make, Paul D. Smith, 2004/08/31
- Re: Preprocessing files with make, Michael Chastain, 2004/08/30