This is the mail archive of the
mailing list for the GCC project.
RE: Beginner GCC projects question
- From: Michael Veksler <VEKSLER at il dot ibm dot com>
- To: "Dave Korn" <dk at artimi dot com>
- Cc: "'Paolo Bonzini'" <bonzini at gnu dot org>, gcc at gcc dot gnu dot org
- Date: Mon, 17 May 2004 16:18:22 +0300
- Subject: RE: Beginner GCC projects question
Nice document. It contains almost all you need to make this work. Still it
several issues. It doesn't handle conflicts between my second and third
The examples solve either:
> 2. You don't want "make clean" to compile foo.m and foo.o,
> all you want is to clean-up.
or (Basic Auto-Dependencies):
> 3. You want to re-create foo.m when it is explicitly removed.
but not both at the same time.
So if you take the better (Advanced) solution, you make it
almost perfect - except the case when someone removes .deps
(or any .P file in it).
To fix that you'd need something ugly like:
%.o: %.c %.P <--- make sure that %.P is not removed.
(do all the stuff mentioned in the document)
Otherwise when %.P is removed, %.o will not be compiled
even when its include files change (unless %.c changes as well).
This is a great source of crashes, and worse - a great source
of bugs that escape local testing.
"Dave Korn" <firstname.lastname@example.org>
Sent by: email@example.com
To: Michael Veksler/Haifa/IBM@IBMIL, "'Paolo Bonzini'"
Subject: RE: Beginner GCC projects question
There's a very fine document called "Advanced Auto-Dependency
at the gmake maintainer's website
which will probably help if you haven't seen it before. Highly