summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdeheader12
1 files changed, 2 insertions, 10 deletions
diff --git a/deheader b/deheader
index 519de87..6e1087e 100755
--- a/deheader
+++ b/deheader
@@ -1364,12 +1364,8 @@ def trim(line):
def testcompile(source, maker, msg="", verbosity=0, showerrs=False, subdir=""):
"Test-compile a sourcefile. Return the status and the compilation time"
(stem, _suffix) = os.path.splitext(source)
- derived = stem + ".o"
- if os.path.exists(os.path.join(subdir, derived)):
- os.remove(os.path.join(subdir, derived))
- elif os.path.exists("CMakeList.txt"):
- subprocess.call(["make","clean"])
- command = maker + " " + derived
+ tmpname = stem + ".o"
+ command = "{0} -o {1} {2}".format(maker, tmpname, source)
olddir = os.getcwd()
if len(subdir) > 0:
os.chdir(subdir)
@@ -1387,10 +1383,6 @@ def testcompile(source, maker, msg="", verbosity=0, showerrs=False, subdir=""):
explain = "succeeded"
if verbosity >= PROGRESS_DEBUG:
print("deheader: %s%s %s." % (source, msg, explain))
- if os.path.exists(derived):
- os.remove(derived)
- elif os.path.exists("CMakeList.txt"):
- subprocess.call(["make","clean"])
return (status, end - start)
def c_analyze(sourcefile, maker, includes, requires, verbosity, subdir=""):