make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dependencies and clean


From: Bijal Shah
Subject: Dependencies and clean
Date: Fri, 28 Jun 2002 18:20:43 +0100

This is more a question for those experienced makefile writers out there.

I use the system suggested on P31 of the GNU make manual (3.79) to generate
dependency files (.d) for my C files. This works well. The problems come as
follows:

*       If I specify to "clean" my dependency files and run clean before any
dependencies have been generated, I find that the system will generate the
dependencies in order to clean them. Is there any way of preventing this
other than conditionally including the dependencies?

*       Having a "rebuild" target seems to cause issues. Rebuild is defined
to rely on "clean" then the main target. The clean removes the dependency
files, but make doesn't re-generate them automatically. This means that if I
do a rebuild then a normal build, the second build will generate
dependencies again without rebuilting the final target.

They are kind of related, but I can't see an easy way around it. What I have
is a complex rule to examine $(MAKECMDGOALS) in order to work out if it
should include the dependencies or not.

Any thoughts on the subject would be much appreciated.

Thanks,

Bijal Shah
Software Consultant

Mediabright Limited
Softwright House
11-49 Station Road
Langley
Berkshire

Phone: +44 1753 811064
Fax: +44 1753 811834
Email: address@hidden
Web: http://www.mediabright.co.uk



Attachment: Bijal Shah.vcf
Description: Binary data


reply via email to

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