From 8e06ab6a9530064eba6a8f27411352c9121108b5 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 19 Dec 2016 21:12:14 +0530 Subject: Use a script to clean-up custom-target output dirs The script will manually delete all custom_target outputs that are directories instead of files. This is needed because on platforms other than Windows, Ninja only deletes directories while cleaning if they are empty. Closes #1220 --- mesonbuild/backend/backends.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mesonbuild/backend/backends.py') diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 8b6d181..bc61c96 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -22,6 +22,15 @@ import json import subprocess from ..mesonlib import MesonException, get_compiler_for_source, classify_unity_sources +class CleanTrees(): + ''' + Directories outputted by custom targets that have to be manually cleaned + because on Linux `ninja clean` only deletes empty directories. + ''' + def __init__(self, build_dir, trees): + self.build_dir = build_dir + self.trees = trees + class InstallData(): def __init__(self, source_dir, build_dir, prefix): self.source_dir = source_dir -- cgit v1.1