help-make
[Top][All Lists]
Advanced

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

Moved sourcefiles and dependencies, automatic dependencies


From: Torsten Mohr
Subject: Moved sourcefiles and dependencies, automatic dependencies
Date: Tue, 31 Jul 2007 09:57:09 +0200
User-agent: KMail/1.9.1

Hi,

in a project in the office we store the list of files in a variable and
use automatic dependency generation.

I generate the name of the dependency file for the sources from the basename
of the files and prepend a different directory.  This way
"some/where/on/disk/main.c" becomes "dependencies/main.d".

If somebody now copies main.c into a/different/dir and changes the entry
in the variable in the Makefile to "a/different/dir/make.c", still the
name of the dependency file is "dependencies/main.d".  This file then
does not get remade and gets included and contains the old information,
so the wrong file gets compiled.

Of course i can tell the users to delete the dependency file when they
move a source file, but i'd like to have a more bullet-proof way.
Can anybody give me a hint on this?


Thanks for any hints,
Torsten.




reply via email to

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