meson: Correctly validate that prefix is a child of rootprefix
authorPeter Kjellerstedt <pkj@axis.com>
Thu, 27 May 2021 15:05:34 +0000 (17:05 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 9 Jul 2021 16:35:08 +0000 (18:35 +0200)
commited4578c6a84a8461a9ca2ea46293560c649a454d
treeebe2f7535087ac36349fa5ebdb6575d84cc237fe
parente0b4482d1966f36a903db403720336d056726048
meson: Correctly validate that prefix is a child of rootprefix

In commit d895e10a a test was introduced to validate that prefix is a
child of rootprefix. However, it only works when rootprefix is "/".
Since the test is ignored when rootprefix is equal to prefix, this is
only noticed if specifying both -Drootprefix= and -Dprefix=, e.g.:

  $ meson foo -Drootprefix=/foo -Dprefix=/foo/bar
  meson.build:111:8: ERROR: Problem encountered: Prefix is not below
  root prefix (now rootprefix=/foo prefix=/foo/bar)

(cherry picked from commit b2d74870711f859ddc72c5756299d2c2f1659468)
meson.build