[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: escape hash mark
From: |
Stefano Lattarini |
Subject: |
Re: escape hash mark |
Date: |
Fri, 19 Aug 2011 21:17:32 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
On Friday 19 August 2011, Daniel Neuberger wrote:
> On 08/19/2011 02:30 PM, Stefano Lattarini wrote:
> > Does the following works?
> >
> > HASHMARK = \#
> > SOMEVAR = "$(HASHMARK)some comment"
> > SOMEVAR += "other stuff"
> Yes, thanks for the tip.
>
> > Anyway, consider that there is no portable way to place a literal `#' in
> > a make variable; for example:
> Thanks for the pointer. I think the method I had would be portable, right?
>
Well, no, `$(shell ...)' is a GNU make extension. Your best bet is still
`\#' (maybe with the indirection necessary to prevent automake from mangling
it), since it seems to work with BSD make too.
Regards,
Stefano