bug-make
[Top][All Lists]
Advanced

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

gmake enhancement request for include directive (3.79.1)


From: Sandy Currier
Subject: gmake enhancement request for include directive (3.79.1)
Date: Thu, 10 May 2001 14:50:47 -0400

Hi Paul (or whomever may read this - I hope someone does!),

A couple years ago I exchanged email with you (Paul Smith) regarding a couple make
enhancements.  At the time I was hoping for a little bit of clearmake
functionality implemented via a dot file that records the expanded
command line and file stat information of the target file.  This info would be
optionally parsed when the target file is stat'ed when
determining the 'need to remake' dependency graph. 

Thus, whether a target is remade or not could then also be a function
of the command line (in a string sense) as well as the actual mod
time of the file.  This instead of just 'newness'.  This would support
the ability of gmake to remake a target if a compiler option changes, etc.

This was never implemented, which is ok, but wanted to mention it
again just in case it slipped through the cracks.


However, this is a different enhancement request which the make gods
may hopefully find more interesting and worthwhile.  This enhancement
is with respect to the include directive and gmake's ability to 'restart' itself if
it finds that it has remade a (dependency) makefile that it has parsed.
Let me explain.

Currently (3.79.1, all platforms), gmake supports including for example
dependency (*.d) makefiles which typically include the header files that
C files depend on (as output for example with the -MMD gcc switch).
The problem is if a header file is moved or deleted.  The .d file still
references the non-existant .h file.  However, when gmake goes to include
the .d, since the .h file no longer exists gmake fails and exits.  If gmake in this case
could be configured to attempt to rebuild the .d file instead of exiting,
then this somewhat common case would be handled entirely from within
gmake.  To solve this now, creative wrapper scripts around gmake need
to sense this case, delete the .d file manually, then restart gmake.

In summary, if when including a .d file an error is discovered, can the .d
file be marked as 'needing to be remade' instead of gmake just exiting with
an error?

I tried various incantations of '-include', but it does not mask this type of
error (when a file referenced by an included .d file does not exist).

thanks!  Questions/comments welcome!  A work around, or a pointer to
documentation to solve the problem would be great.

thanks!
-sandy




reply via email to

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