how to get MAJORVERSION in meson

Started by Pavel Stehuleabout 1 year ago4 messages
#1Pavel Stehule
pavel.stehule@gmail.com

Hi

I tried to add meson support to plpgsql_check. As template I used
https://raw.githubusercontent.com/petere/plsh/refs/heads/meson/meson.build

Unfortunately, for tests I need to know MAJORVERSION. In makefile I use

ifndef MAJORVERSION
MAJORVERSION := $(basename $(VERSION))
endif

Is there some similar pattern for meson?

Regards

Pavel

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Pavel Stehule (#1)
Re: how to get MAJORVERSION in meson

pá 29. 11. 2024 v 10:42 odesílatel Pavel Stehule <pavel.stehule@gmail.com>
napsal:

Hi

I tried to add meson support to plpgsql_check. As template I used
https://raw.githubusercontent.com/petere/plsh/refs/heads/meson/meson.build

Unfortunately, for tests I need to know MAJORVERSION. In makefile I use

ifndef MAJORVERSION
MAJORVERSION := $(basename $(VERSION))
endif

Is there some similar pattern for meson?

at the end I wrote (based on Postgres's meson build).

https://github.com/okbob/plpgsql_check/blob/master/meson.build

Is there some other solution?

Regards

Pavel

Show quoted text

Regards

Pavel

#3jian he
jian.universality@gmail.com
In reply to: Pavel Stehule (#2)
Re: how to get MAJORVERSION in meson

On Fri, Nov 29, 2024 at 7:09 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:

pá 29. 11. 2024 v 10:42 odesílatel Pavel Stehule <pavel.stehule@gmail.com> napsal:

Hi

I tried to add meson support to plpgsql_check. As template I used https://raw.githubusercontent.com/petere/plsh/refs/heads/meson/meson.build

Unfortunately, for tests I need to know MAJORVERSION. In makefile I use

ifndef MAJORVERSION
MAJORVERSION := $(basename $(VERSION))
endif

Is there some similar pattern for meson?

at the end I wrote (based on Postgres's meson build).

https://github.com/okbob/plpgsql_check/blob/master/meson.build

Is there some other solution?

google around, then i found out this
https://github.com/mesonbuild/meson/issues/3535

#4Pavel Stehule
pavel.stehule@gmail.com
In reply to: jian he (#3)
Re: how to get MAJORVERSION in meson

so 30. 11. 2024 v 16:42 odesílatel jian he <jian.universality@gmail.com>
napsal:

On Fri, Nov 29, 2024 at 7:09 PM Pavel Stehule <pavel.stehule@gmail.com>
wrote:

pá 29. 11. 2024 v 10:42 odesílatel Pavel Stehule <

pavel.stehule@gmail.com> napsal:

Hi

I tried to add meson support to plpgsql_check. As template I used

https://raw.githubusercontent.com/petere/plsh/refs/heads/meson/meson.build

Unfortunately, for tests I need to know MAJORVERSION. In makefile I use

ifndef MAJORVERSION
MAJORVERSION := $(basename $(VERSION))
endif

Is there some similar pattern for meson?

at the end I wrote (based on Postgres's meson build).

https://github.com/okbob/plpgsql_check/blob/master/meson.build

Is there some other solution?

google around, then i found out this
https://github.com/mesonbuild/meson/issues/3535

Unfortunately this is not available for extensions - the extensions are
independent projects and take any information from pg_config.