1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-10-18 00:16:11 -04:00
nix/doc/manual/generate-deps.py
John Ericson 08b59aad31 Build the manual with Meson
Co-Authored-By: Qyriad <qyriad@qyriad.me>
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
Co-Authored-By: eldritch horrors <pennae@lix.systems>
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
Co-authored-by: Tom Bereknyei <tomberek@gmail.com>
2024-10-09 11:58:17 -04:00

23 lines
821 B
Python
Executable file

#!/usr/bin/env python3
import glob
import sys
# meson expects makefile-style dependency declarations, i.e.
#
# target: dependency...
#
# meson seems to pass depfiles straight on to ninja even though
# it also parses the file itself (or at least has code to do so
# in its tree), so we must live by ninja's rules: only slashes,
# spaces and octothorpes can be escaped, anything else is taken
# literally. since the rules for these aren't even the same for
# all three we will just fail when we encounter any of them (if
# asserts are off for some reason the depfile will likely point
# to nonexistant paths, making everything phony and thus fine.)
for path in glob.glob(sys.argv[1] + '/**', recursive=True):
assert '\\' not in path
assert ' ' not in path
assert '#' not in path
print("ignored:", path)