Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Apr 2006 16:32:49 -0500 (CDT)
From:      Lars Eighner <eighner@io.com>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Is Makefile.inc1 in 6 wrong?
Message-ID:  <20060404163058.J76542@goodwill.io.com>
In-Reply-To: <200604041726.17120.jkim@FreeBSD.org>
References:  <20060404160100.U76190@goodwill.io.com> <200604041726.17120.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 4 Apr 2006, Jung-uk Kim wrote:

> On Tuesday 04 April 2006 05:14 pm, Lars Eighner wrote:
>> It appears to me that either I have a wrong version of awk or
>> this Makefile.inc1 is wrong:
>>
>> #
>> # $FreeBSD: src/Makefile.inc1,v 1.499.2.11 2006/04/04 14:24:03
>> glebius Exp $ #
>>
>> <Snippage>
>>
>> MAKEOBJDIRPREFIX?=	/usr/obj
>> .if !defined(OSRELDATE)
>> .if exists(/usr/include/osreldate.h)
>> OSRELDATE!=	awk '/^\#define[[:space:]]*__FreeBSD_version/ { print
>> $$3 }' \ /usr/include/osreldate.h
>> .else
>> OSRELDATE=	0
>>
>>
>> In particular with the double dollar sign in the awk statement,
>> I get no return, therefore OSRELDATE gets set to 0.  The awk
>> statement also fails from the command line.  But if I use only
>> one $, the awk statement succeeds.
>>
>> Is there a reason for the double dollar sign?
>
> Yes.  See make(1):
>
>    $   A single dollar sign `$', i.e. `$$' expands to a single dollar
>        sign.

Then why does it get the wrong answer?   Also is there a
difference when the accent mark is used in front instead of a
real single quote?


-- 
Lars Eighner
eighner@io.com  lars@larseighner.com
http://www.larseighner.com/index.html
8800 N IH35 APT 1191 AUSTIN TX 78753-5266




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060404163058.J76542>