3 # Look for CXX files that are not referenced by any makefile
10 a
= subprocess
.Popen("git ls-files", stdout
=subprocess
.PIPE
, shell
=True)
13 if filename
.find(".cxx") != -1 \
14 and filename
.find("precompiled") == -1 \
15 and filename
.find("/workben") == -1 \
16 and not filename
.startswith("odk/examples/") \
17 and not filename
.startswith("bridges/") \
18 and not filename
.startswith("compilerplugins/") \
19 and filename
.find("/qa/") == -1 \
20 and filename
.find("/test/") == -1 \
21 and not filename
.startswith("testtools/") \
22 and not filename
.startswith("vcl/") \
23 and not filename
.startswith("cli_ure/"):
24 sourceFiles
.add(filename
.strip())
26 a
= subprocess
.Popen("git ls-files */*.mk", stdout
=subprocess
.PIPE
, shell
=True)
28 for makefilename
in txt
:
29 makefilename
= makefilename
.strip()
30 with
open(makefilename
, "r") as makefile
:
31 moduleName
= makefilename
[:makefilename
.find("/")]
35 if state
== 0 and "_add_exception_objects" in line
:
37 elif state
== 1 and line
!= "))":
38 s
= line
.replace("\\","").replace(")", "").strip()
39 # parse line like: $(call gb_Helper_optional,AVMEDIA,svx/source/sidebar/media/MediaPlaybackPanel) \
43 sourceFiles
.discard(s
+ ".cxx")
50 print "files not listed in makefile"
51 print "----------------------------"
52 for x
in sorted(sourceFiles
):