"""
import os
+import platform
import lldbtest
def getArchitecture():
return (" ARCHFLAG=" + archflag) if archflag else ""
+def getMake():
+ """Returns the name for GNU make"""
+ if platform.system() == "FreeBSD":
+ return "gmake "
+ else:
+ return "make "
+
def getArchSpec(architecture):
"""
Helper function to return the key-value string to specify the architecture
"""Build the binaries the default way."""
if clean:
lldbtest.system(["/bin/sh", "-c",
- "make clean" + getCmdLine(dictionary) + "; make"
+ getMake() + "clean" + getCmdLine(dictionary) + ";"
+ + getMake()
+ getArchSpec(architecture) + getCCSpec(compiler)
+ getCmdLine(dictionary)],
sender=sender)
else:
lldbtest.system(["/bin/sh", "-c",
- "make" + getArchSpec(architecture) + getCCSpec(compiler)
+ getMake() + getArchSpec(architecture) + getCCSpec(compiler)
+ getCmdLine(dictionary)],
sender=sender)
"""Build the binaries with dwarf debug info."""
if clean:
lldbtest.system(["/bin/sh", "-c",
- "make clean" + getCmdLine(dictionary)
- + "; make MAKE_DSYM=NO"
+ getMake() + "clean" + getCmdLine(dictionary)
+ + ";" + getMake() + "MAKE_DSYM=NO"
+ getArchSpec(architecture) + getCCSpec(compiler)
+ getCmdLine(dictionary)],
sender=sender)
else:
lldbtest.system(["/bin/sh", "-c",
- "make MAKE_DSYM=NO"
+ getMake() + "MAKE_DSYM=NO"
+ getArchSpec(architecture) + getCCSpec(compiler)
+ getCmdLine(dictionary)],
sender=sender)
#import traceback
#traceback.print_stack()
if os.path.isfile("Makefile"):
- lldbtest.system(["/bin/sh", "-c", "make clean"+getCmdLine(dictionary)],
+ lldbtest.system(["/bin/sh", "-c",
+ getMake() + "clean" + getCmdLine(dictionary)],
sender=sender)
# True signifies that we can handle cleanup.