This is the mail archive of the
mailing list for the GCC project.
Re: How to use protoize ?
- From: Jim Wilson <wilson at tuliptree dot org>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 10 Aug 2003 00:43:37 -0700
- Subject: Re: How to use protoize ?
- References: <200308100028.UAA25414@caip.rutgers.edu>
Kaveh R. Ghazi wrote:
Would someone please help me with using protoize? (I want to be able
to run it as a test if I happen to change it as part of maintenance
In c-aux-info, in gen_aux_info_record, there is a comment that states
that protoize only works for files in the current working directory, and
hence it always emits "." for the directory.
Protoize fails when it tries to convert a relative pathname for an
include file to a full pathname. It ends up using the directory holding
the source file instead of using the current working directory, and that
gives a full pathname that is nonsense.
See invocation_filename in protoize.c. c-aux-info emits ".", and
process_aux_info_file converts this into the source file name. Later
on, in referenced_file_is_newer, we call abspath with
invocation_filename, and hence header file names which are relative to
the objdir get treated as relative to the srcdir. It isn't clear to me
if this has ever worked the way you want it to.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com