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: Michael Chastain
Subject: Re: Preprocessing files with make
Date: Sun, 29 Aug 2004 18:54:29 -0400
User-agent: nail 10.8 6/28/04

"Paul D. Smith" <psmith@gnu.org> wrote:
> Whoa, wait, now you've switched topics from pattern rules to STATIC
> pattern rules!  Although the names are similar they are very different
> things.  In your posts until you have always been showing pattern rules,
> not static pattern rules.

Yes, static pattern rules are different from pattern rules.
You're right; I've been conflating them.

>   mc>   alpha.o: %.o
>   mc>         cc -c $< -o $@ -DFOO

I didn't write this.  Check my mail again.

> Yes, but that's true of _ALL_ types of rules.  This is a simple
> order-of-evaluation misunderstanding: when make runs it performs its
> work in two distinct phases: the first phase reads in all the makefiles
> and constructs an internal dependency graph.
>
> The second phase walks that graph, running commands to update targets.

Yes, I don't remember whether that two-phase process is
explicitly spelled out in the documentation.  If not, it should be.
I figured it after I used gnu make for a while.

The first phase lacks a "for" construct that can generate rules.
That would be a really good feature enhancement for gnu make.

  for file in $(O_FILES)
    base := $(basename $file)
    $(base).o: $(base).c $(dep_list_$(base))
  end

Michael




reply via email to

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