7 # Import buildconfig if available, otherwise set has_buildconfig to False so
8 # we skip the check which relies on it.
12 has_buildconfig
= False
14 has_buildconfig
= True
17 def generate(output
, *input_paths
):
19 This file generates a ThirdPartyPaths.cpp file from the ThirdPartyPaths.txt
20 file in /tools/rewriting, which is used by the Clang Plugin to help identify
21 sources which should be ignored.
27 for path
in input_paths
:
29 lines
.update(f
.readlines())
33 if line
.endswith("/"):
37 # Ignore lines starting with $UNVALIDATED
38 # These should only be coming from Unvalidated.txt
39 if line
.startswith("$UNVALIDATED"):
41 elif not glob
.glob(buildconfig
.topsrcdir
+ "/" + line
):
50 + " does not exist. Remove it from Generated.txt or "
51 + "ThirdPartyPaths.txt and try again."
54 tpp_strings
= ",\n ".join([json
.dumps(tpp
) for tpp
in sorted(tpp_list
)])
58 /* THIS FILE IS GENERATED BY ThirdPartyPaths.py - DO NOT EDIT */
62 const char* MOZ_THIRD_PARTY_PATHS[] = {
66 extern const uint32_t MOZ_THIRD_PARTY_PATHS_COUNT = %d;
69 % (tpp_strings
, len(tpp_list
))