On 25.01.24 17:25, Tristan Partin wrote:
> The way that this currently works is that you will fail at configure
> time if bz2 doesn't exist on the system. Meson will try to resolve a
> .path() method on a NotFoundProgram. You might want to define the bz2
> target to just call `exit 1` in this case.
>
> if bzip2.found()
> # do your current target
> else
> bz2 = run_target('tar.bz2', command: ['exit', 1])
> endif
>
> This should cause pgdist to appropriately fail at run time when
> generating the bz2 tarball.
Ok, done that way.
> For what it's worth, I run Meson 1.3, and the behavior of generating the
> tarballs even though it is a dirty tree still occurred. In the new patch
> you seem to say it was fixed in 0.60.
The problem I'm referring to is that before 0.60, alias_target cannot
depend on run_target (only "build target"). This is AFAICT not
documented and might not have been an intentional change, but you can
trace it in the meson source code, and it shows in the PostgreSQL CI.
That's also why for the above bzip2 issue I have to use custom_target in
place of your run_target.