[Top][All Lists]

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

Re: error messages from including files

From: Arthur Davis
Subject: Re: error messages from including files
Date: Wed, 09 Apr 2003 15:16:48 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

My concern was with the fact that -include does not fail if the file does not exist. In my case, the list of inlcuded files was generated by make as were the files themselves. Also, the rule to create the included files was a pattern rule. If any of that failed, the -include directive would not complain, that bit of functionality would be absent (in my case the specification of prerequisites), and no error would be given.

dave russo wrote:

At 01:56 PM 4/9/2003 -0400, Arthur Davis wrote:

-include does cause make to suppress printing the message, but it also indicates that it is ok if the file does not exist which in my case was not true.

Again, I probably don;t understand the problem but ...

Can't your rule for the potentially non-existent include file do *anything* you need it to?

    % cat foo.mak -include bar.mak

    bar.mak:         @echo making $@ ..         @false

    % make -f foo.mak making bar.mak .. make: *** [bar.mak] Error 255

Changing false to true above allows make to complete successively.

dave russo wrote:

> The ability for this to be suppressed is requested in bug #102.
_> I don't think there's any way to do it currently.

I probably don't understand the problem but ...

I thought that "-include" was supposed to be used to suppress errors. make also seems to "do the right thing" if the file does not exist and make has a rule to create it; i.e., it creates it and recursively restarts.

reply via email to

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