aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-12-19 21:12:14 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-12-19 22:31:26 +0530
commit8e06ab6a9530064eba6a8f27411352c9121108b5 (patch)
tree785d3426f2a869754e360d32f9d54d0c1ff4b8bb /mesonbuild/backend/backends.py
parentc854ae1801380c91b1e751e516ec4feeadb6d511 (diff)
downloadmeson-8e06ab6a9530064eba6a8f27411352c9121108b5.zip
meson-8e06ab6a9530064eba6a8f27411352c9121108b5.tar.gz
meson-8e06ab6a9530064eba6a8f27411352c9121108b5.tar.bz2
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
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py9
1 files changed, 9 insertions, 0 deletions
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