help-make
[Top][All Lists]
Advanced

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

Re: Embedding a carriage return in $(error)?


From: Mike Shal
Subject: Re: Embedding a carriage return in $(error)?
Date: Mon, 16 Apr 2007 20:56:30 -0400

On 4/16/07, Rick Flower <address@hidden> wrote:
Just curious if it is possible to embed a newline/carriage return at a
particular spot in the message spit out by $(error)?  I've got a message
that would be easier to read if i could put a single newline in there
somewhere.. I tried (pardon the wrapping):

ifeq (,$(OBJDIR))
  $(error No object directory found -- possible configuration problem? \n \
   I looked for : $(OBJDIRS))
endif


One way would be to use define/endef to create a variable, since that
preserves newlines:

define err
No object directory found -- possible configuration problem?
I looked for : $(OBJDIRS)
endef

ifeq (,$(OBJDIR))
  $(error $(err))
endif

I don't know if there's an easy way to do "inline" newlines, but in
general anytime you want newlines in things, define/endef is your guy.

-Mike




reply via email to

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