[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preprocessing files with make
From: |
Erik Cato |
Subject: |
Re: Preprocessing files with make |
Date: |
28 Aug 2004 06:36:11 -0700 |
Michael Chastain <mec.gnu@mindspring.com> wrote in message
news:<mailman.1963.1092932135.2011.help-gnu-utils@gnu.org>...
> 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
Yes, you have the quesion right! Now does anyone have a solution?
/Erik
- 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, 2004/08/19
- Message not available
- Re: Preprocessing files with make,
Erik Cato <=
- 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