[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (no subject)
From: |
Paul D. Smith |
Subject: |
Re: (no subject) |
Date: |
Wed, 10 Apr 2002 09:31:30 -0400 |
%% Maciej Walezak <address@hidden> writes:
mw> Thanks a lot. But the real problem is still not solved.
We can only give you answers based on the information you provide...
mw> The rule like this
mw> foo.h: bar.h
mw> tells make that foo.h depends on bar.h while it is not true.
mw> foo.h is never updated from bar.h and command-to-build-packet is
mw> invoked again and again without any effect.
I assumed, given your rules, that the "command-to-build-packet" created
the .h file as well.
If a command takes as input various .c and .h files, and generates a .h
file, then that target .h file _does_ depend on the prerequisite .h
file.
mw> But I must to write it this way because command-to-build creates
mw> more files, including object files that do depend on bar.h. I
mw> want to avoid senseless attempts of compilation.
If one invocation of a command generated multiple files, then any file
that might cause that command to need to be re-run (even if it only
_logically_ impacts some subset of the targets) is still a prerequisite
of _all_ the targets.
If that's not what you want then you need to modify the command so that
it generates individual targets based on a more specific set of
prerequisites.
mw> I surmise the benefit of your solution is that make does not check
mw> for existence of all files as it knows it has created all of them
mw> on occasion of creating first of them -am I right?
Not quite; make will still "check for the existence" of the files. But,
yes, this method causes make to understand that a single invocation of
the command script may update all the targets listed.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist