[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: complex Makefile for a bootstrapped self-hosting translator [GCC MEL
From: |
Michael Ludwig |
Subject: |
Re: complex Makefile for a bootstrapped self-hosting translator [GCC MELT] ? |
Date: |
Sat, 14 Jan 2012 23:09:39 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
Michael Ludwig schrieb am 14.01.2012 um 22:44 (+0100):
> Suffix rules are obsolete because pattern rules are more
> general and clearer. They are supported in GNU make for
> compatibility with old makefiles.
>
> 10.7 Old-Fashioned Suffix Rules
> http://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html
A two-suffix rule whose target and source suffixes are ‘.o’
and ‘.c’ is equivalent to the pattern rule ‘%.o : %.c’.
[…] For example, ‘.c’ and ‘.o’ are both on the default list of
known suffixes. Therefore, if you define a rule whose target
is ‘.c.o’, make takes it to be a double-suffix rule with source
suffix ‘.c’ and target suffix ‘.o’. Here is the old-fashioned
way to define the rule for compiling a C source file:
.c.o:
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
Hmm. This is what Microsoft NMake works like. Remove its .SUFFIXES
and it won't work. Guess these are two evolutionary stages of the
same concepts.
--
Michael Ludwig