This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to use protoize ?

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,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]