disable makefile error messages
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > disable makefile error messages




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    disable makefile error messages  
andyhaupt@netscape.net


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-25-07 12:23 AM

Hello,

consider this simple makefile:

bar:
@if test -d /tmp ; then echo yes; exit 1; fi


make bar   displays

yes
*** Error code 1
The following command caused the error:
if test -d /tmp ; then echo yes; exit 1; fi
make: Fatal error: Command failed for target `bar'

I only want to see the printed 'yes' and the standard make error msg
should be disabled somehow.
Is this possible and how?

The output is from 'make' on Solaris 10 ,
gnu make shows just one line  gmake: *** [bar] Error 1
but the issue remains: is it possible to skip that msg?

rgds
andy






[ Post a follow-up to this message ]



    Re: disable makefile error messages  
Ben Bacarisse


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-25-07 12:23 AM

andyhaupt@netscape.net writes:

> consider this simple makefile:
>
> bar:
>     @if test -d /tmp ; then echo yes; exit 1; fi
>
>
> make bar   displays
>
> yes
> *** Error code 1
> The following command caused the error:
> if test -d /tmp ; then echo yes; exit 1; fi
> make: Fatal error: Command failed for target `bar'
>
> I only want to see the printed 'yes' and the standard make error msg
> should be disabled somehow.
> Is this possible and how?

Err..  How about not making the command fail?

--
Ben.





[ Post a follow-up to this message ]



    Re: disable makefile error messages  
andyhaupt@netscape.net


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-25-07 12:31 PM

My example is of course a simplified one to show the issue in as few
lines as possible.

Imagine this bigger scenario:
make install should install the code in some dir.
I want to check whether the dir exists (and is writable by me) or if
not I will create it.
Checks for writability or mkdir might fail.
In case of failure I want to put out an error msg of my own (that
would be the 'yes' in the example)
and stop any further execution, I don't want to see any additional
info from make itself.

If there is no way to disable it I might go for gnu make since one
line of  make output
is easier to digest than the verbose Solaris 10 lines.

rgds
andy

On 25 Sep., 02:11, Ben Bacarisse <ben.use...@bsb.me.uk> wrote:
> andyha...@netscape.net writes: 
> 
> 
> 
> 
>
> Err..  How about not making the command fail?
>
> --
> Ben.






[ Post a follow-up to this message ]



    Re: disable makefile error messages  
Ivan Gotovchits


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-25-07 06:26 PM

andyhaupt@netscape.net wrote:

> The following command caused the error:
> if test -d /tmp ; then echo yes; exit 1; fi
> make: Fatal error: Command failed for target `bar'
try to
exec 3>/dev/null
--
s/.../.gotovchits/g for email.





[ Post a follow-up to this message ]



    Re: disable makefile error messages  
Ben Bacarisse


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-25-07 06:26 PM

andyhaupt@netscape.net writes:
> On 25 Sep., 02:11, Ben Bacarisse <ben.use...@bsb.me.uk> wrote: 
>
> My example is of course a simplified one to show the issue in as few
> lines as possible.
>
> Imagine this bigger scenario:
> make install should install the code in some dir.
> I want to check whether the dir exists (and is writable by me) or if
> not I will create it.
> Checks for writability or mkdir might fail.

Ah, I see.  Sorry, I know of no way to stop the messages.  You can
ignore errors, of course (by several mechanisms), but that is not what
you want.

BTW, most technical groups prefer trimmed and interleaved replies to
"top post, full quote".

--
Ben.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:35 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register