Re: plperl win32 - Mailing list pgsql-patches

From Tom Lane
Subject Re: plperl win32
Date
Msg-id 21506.1089994505@sss.pgh.pa.us
Whole thread Raw
In response to Re: plperl win32  ("Magnus Hagander" <mha@sollentuna.net>)
List pgsql-patches
"Magnus Hagander" <mha@sollentuna.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

pgsql-patches by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: plperl win32
Next
From: "Magnus Hagander"
Date:
Subject: Re: initdb authentication