Skip navigation.
Home
The QNX Community Portal

View topic - make and qcc

make and qcc

Read-only archive of qnx.development_tools (Self-hosted graphical development with the Eclipse IDE and cross-hosted development on Solaris, Linux, or Windows) at inn.qnx.com

make and qcc

Postby Mario Charest » Wed Jul 12, 2006 8:57 pm

With Watcom under QNX4 a *.err file is created if the compiler detects some
error/warning.

I'm trying to find a simple solution, within a makefile and haven't been
able to find anything that doesn't look like a kludge.

Any hint?
Mario Charest
 

Re: make and qcc

Postby Chris Herborth » Thu Jul 13, 2006 6:36 pm

Mario Charest wrote:
With Watcom under QNX4 a *.err file is created if the compiler detects some
error/warning.

I'm trying to find a simple solution, within a makefile and haven't been
able to find anything that doesn't look like a kludge.

Any hint?

Something like this in your Makefile?

..c.o:
qcc $CFLAGS $< -o $@ 2> $<.err
if [ ! -s $<.err ] ; then \
rm -f $<.err ; \
else \
echo Compile errors in $<: ; \
cat $<.err ; \
fi

Assuming I've got the $< and $@ right, that'll build the file and
redirect error output to filename.err... if the .err file is empty,
it'll be deleted.

--
Chris Herborth (cherborth@qnx.com) - Senior Zombiologist and Tech Writer
Never send a monster to do the work of an evil scientist.
Monthly QNX newsletter - http://www.qnx.com/news/forms/newsletter.html
Chris Herborth
 


Return to qnx.development_tools

Who is online

Users browsing this forum: No registered users and 1 guest