Re: plperl win32

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: plperl win32
Date: 2004-07-16 16:15:05
Message-ID: 21506.1089994505@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> I originally tried the approach with
> ifeq ($(PORTNAME),win32)
> perl_archlibexp=$(subst, \,/,$(perl_archlibexp))
> ...

> but then make complained about recursive assignment of the variable. If
> there is a simple way to get around that, it wouldn't be necessary.

Use := not = ...

When you write foo = something, you are defining something that acts
like a macro rather than a constant string, and so the above is a
self-referential macro. In particular $(x) references are not expanded
yet in something that's assigned with =.

Here is an example of the difference:

x = foo
y = bar$(x)
x = baz

If you now evaluate $(y) you will get barbaz, not barfoo (in fact,
there is no need to define x before y at all in this case).
On the other hand, in

x = foo
y := bar$(x)

y is assigned barfoo, and it won't change if x is modified later.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Andreas Pflug 2004-07-16 16:19:08 Re: serverlog rotation/functions
Previous Message Magnus Hagander 2004-07-16 15:36:12 Re: plperl win32