meson: do not use source_root() when possible
source_root() function is deprecated in Meson version 0.56.0 because it returns the source root of the parent project if called from a subproject. Why would anyone need Mesa as a meson subproject? It would be used as subproject in a project generated by command buffer "decompiler" for Freedreno. Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Reviewed-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19901>
This commit is contained in:

committed by
Marge Bot

parent
74ad255c8c
commit
703d85485f
@@ -20,11 +20,16 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
|
||||
|
||||
def main():
|
||||
filename = os.path.join(os.environ['MESON_SOURCE_ROOT'], 'VERSION')
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('version_dir', help="Directory with VERSION file")
|
||||
args = parser.parse_args()
|
||||
|
||||
filename = os.path.join(args.version_dir, 'VERSION')
|
||||
with open(filename) as f:
|
||||
version = f.read().strip()
|
||||
print(version, end='')
|
||||
|
Reference in New Issue
Block a user