[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 20:58:48 -0400 |
User-agent: |
nail 10.8 6/28/04 |
> mc> alpha.o: %.o
> mc> cc -c $< -o $@ -DFOO
>
> mc> I didn't write this. Check my mail again.
>
> ???
>
> I quoted you exactly... I'm not in the habit of reworking peoples' email
> and then quoting it.
Ah, I see. I wrote an actual Makefile and tested it, but then I
misquoted it myself in the fragement. Here's another copy, just for
clarity.
===
C_FILES := $(wildcard *.c)
O_FILES := $(patsubst %.c,%.o,$(C_FILES))
dep_list_alpha := alpha.h
dep_list_beta := beta1.h beta2.h
dep_list_gamma := gamma.h
a.out: $(O_FILES)
cc $(O_FILES) -o $@
$(O_FILES): %.o: %.c $(wildcard %*.h) $(dep_list_%)
cc -c $< -o $@
alpha.o:
cc -c $< -o $@ -DFOO
===
> You can do this kind of thing in GNU make 3.80, with the $(eval ...)
> function.
That will be cool.
I haven't upgraded to 3.80 yet, because "build.sh" does not work.
I've been waiting for 3.80.1 or 3.81.
Michael
- Re: Preprocessing files with make, (continued)
- 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, 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 <=
- Re: Preprocessing files with make, Paul D. Smith, 2004/08/31
- Re: Preprocessing files with make, Michael Chastain, 2004/08/30