diff --git a/share/machdeps/make_machdep/make_machdep.py b/share/machdeps/make_machdep/make_machdep.py index bd0b6cefa82eeebfdbf575326681d26122018c34..b3c5fa1cab26d75a066cbbeb2b959939ede5487e 100755 --- a/share/machdeps/make_machdep/make_machdep.py +++ b/share/machdeps/make_machdep/make_machdep.py @@ -61,6 +61,12 @@ parser.add_argument( help="option to pass to the compiler to obtain its version; default is --version", ) +parser.add_argument( + "--machdep-schema", + default="machdep-schema.yaml", + help="location of the schema file describing a machdep; default is 'machdep-schema.yaml'", +) + parser.add_argument( "--from-file", help="reads compiler and arch flags from existing yaml file. Use -i to update it in place", @@ -106,8 +112,7 @@ if not args.cpp_arch_flags: def make_schema(): - schema_filename = my_path.parent / "machdep-schema.yaml" - with open(schema_filename, "r") as schema: + with open(args.machdep_schema, "r") as schema: return yaml.safe_load(schema)