From: Mathieu Desnoyers Date: Mon, 26 Aug 2013 15:24:26 +0000 (-0400) Subject: tools/lttng-gen-tp: honor CPPFLAGS and LDFLAGS X-Git-Tag: v2.3.0-rc2~2 X-Git-Url: http://git.lttng.org/?p=lttng-ust.git;a=commitdiff_plain;h=170423b056ecdef441820a54be350605e4dc8951 tools/lttng-gen-tp: honor CPPFLAGS and LDFLAGS Signed-off-by: Mathieu Desnoyers --- diff --git a/tools/lttng-gen-tp b/tools/lttng-gen-tp index 1b8439f3..ed0c48fa 100755 --- a/tools/lttng-gen-tp +++ b/tools/lttng-gen-tp @@ -130,12 +130,20 @@ class ObjFile: cc = self._detectCC() if cc == "": raise RuntimeError("No C Compiler detected") + if 'CPPFLAGS' in os.environ: + cppflags = os.environ['CPPFLAGS'] + else: + cppflags = "" if 'CFLAGS' in os.environ: cflags = os.environ['CFLAGS'] else: cflags = "" + if 'LDFLAGS' in os.environ: + ldflags = os.environ['LDFLAGS'] + else: + ldflags = "" - command = cc + " -c " + cflags + " -I. -llttng-ust" + " -o " + self.outputFilename + " " + cFilename + command = cc + " -c " + cppflags + cflags + ldflags + " -I. -llttng-ust" + " -o " + self.outputFilename + " " + cFilename if verbose: print("Compile command: " + command) subprocess.call(command.split())