[cfe-dev] ccc patch
Török Edwin
edwintorok at gmail.com
Sun Feb 3 06:57:49 PST 2008
Török Edwin wrote:
> ccc now creates object files without an extension, and this breaks
>
Also, ccc creates output objects in same directory as the source file,
and not in the current directory.
This doesn't work with VPATH builds in autotooled builds.
A better patch to address both this, the missing extension problem, and
the wrong return code problem:
$ svn diff utils/ccc
Index: utils/ccc
===================================================================
--- utils/ccc (revision 46686)
+++ utils/ccc (working copy)
@@ -22,6 +22,8 @@
cmd = ' '.join(args)
print >> sys.stderr, cmd
code = os.system(cmd)
+ if code > 255:
+ code = 1
if code:
sys.exit(code)
@@ -41,7 +43,11 @@
i = path.rfind('.')
if i < 0:
return path
- return path[:i] + newext
+ j = path.rfind('/',0,i)
+ print path
+ if j < 0:
+ return path[:i] + "." + newext
+ return path[j+1:i] + "." + newext
def inferlanguage(extension):
if extension == "c":
More information about the cfe-dev
mailing list