projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng-gen-tp: only replace file extension
[lttng-ust.git]
/
tools
/
lttng-gen-tp
diff --git
a/tools/lttng-gen-tp
b/tools/lttng-gen-tp
index b62cd9907618207de72604e947a3b0ab11df9558..6aa1bba15d05012cf75e8d3aa0af69d4efa67bdf 100755
(executable)
--- a/
tools/lttng-gen-tp
+++ b/
tools/lttng-gen-tp
@@
-79,7
+79,9
@@
class CFile:
def write(self):
outputFile = open(self.outputFilename,"w")
def write(self):
outputFile = open(self.outputFilename,"w")
- headerFilename = self.outputFilename.replace(".c",".h")
+ headerFilename = self.outputFilename
+ if headerFilename.endswith(".c"):
+ headerFilename = headerFilename[:-2] + ".h"
outputFile.write(CFile.FILE_TPL.format(
headerFilename = headerFilename))
outputFile.write(CFile.FILE_TPL.format(
headerFilename = headerFilename))
@@
-126,7
+128,10
@@
class ObjFile:
return cc
def write(self):
return cc
def write(self):
- cFilename = self.outputFilename.replace(".o",".c")
+ cFilename = self.outputFilename
+ if cFilename.endswith(".o"):
+ cFilename = cFilename[:-2] + ".c"
+
cc = self._detectCC()
if cc == "":
raise RuntimeError("No C Compiler detected")
cc = self._detectCC()
if cc == "":
raise RuntimeError("No C Compiler detected")
This page took
0.023456 seconds
and
4
git commands to generate.