$(error) function does not work in make

I’m using the GNU make. I tried to use the $(error message) function.

It is not being recognized as a function by make.

Has anyone used $(error ) in a makefile?
What is the trick to using it?

This is QNX4.

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:

I’m using the GNU make. I tried to use the $(error message) function.

It is not being recognized as a function by make.

Has anyone used $(error ) in a makefile?
What is the trick to using it?

This is QNX4.

Hm…which gmake?

------------cut sample makefile----------------
dir_size: dir_size.c
$(error “blah”)

a: a.c

------------cut----------------

The above makefile will compile a from a.c, but if I try “make dir_size”,
I get:

Makefile:2: *** “blah”. Stop.

Of course, I might not be running the shipped version of make – I’m
running one dated Jan 11, 2001. (Unfortunately, I no longer maintain
a completely shipped-only QNX4 system.)

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

It claims to be version 3.74 from the make -version command line.
Size = 118602 Date = Jun 16, 1998

Where can I get the Jan 11, 2001 version? (I thought I had all of the
latest QNX4 stuff.)
It may be that the easiest thing is to just drop it into my QUICS account
(bcaroselli) and I’ll grab it unless you have a direct URL.

Thank you.

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:af83mj$nqn$6@nntp.qnx.com

“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:
I’m using the GNU make. I tried to use the $(error message) function.

It is not being recognized as a function by make.

Has anyone used $(error ) in a makefile?
What is the trick to using it?

This is QNX4.

Hm…which gmake?

------------cut sample makefile----------------
dir_size: dir_size.c
$(error “blah”)

a: a.c

------------cut----------------

The above makefile will compile a from a.c, but if I try “make dir_size”,
I get:

Makefile:2: *** “blah”. Stop.

Of course, I might not be running the shipped version of make – I’m
running one dated Jan 11, 2001. (Unfortunately, I no longer maintain
a completely shipped-only QNX4 system.)

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.