parent
1e912c093a
commit
e800135795
16
mode/c.py
16
mode/c.py
|
@ -139,26 +139,24 @@ class CCheckSyntax(Exec):
|
|||
show_success = False
|
||||
args = []
|
||||
def _execute(self, w, **vargs):
|
||||
cmd='C_INCLUDE_PATH=. %s' % w.application.config['c.syntax-cmd']
|
||||
if w.application.config['c.syntax-rel-dir']:
|
||||
d = os.path.dirname(w.buffer.path)
|
||||
self._doit(w, w.buffer.path, w.application.config['c.syntax-cmd'],
|
||||
cmdname='c-check-syntax', cmddir=d)
|
||||
self._doit(w, w.buffer.path, cmd, cmdname='c-check-syntax',
|
||||
cmddir=os.path.dirname(w.buffer.path))
|
||||
else:
|
||||
self._doit(w, w.buffer.path, w.application.config['c.syntax-cmd'],
|
||||
cmdname='c-check-syntax')
|
||||
self._doit(w, w.buffer.path, cmd, cmdname='c-check-syntax')
|
||||
|
||||
class CMake(Exec):
|
||||
'''Build this C program (using the mode's make cmd)'''
|
||||
show_success = False
|
||||
args = []
|
||||
def _execute(self, w, **vargs):
|
||||
cmd = w.application.config['c.make-cmd'],
|
||||
if w.application.config['c.make-rel-dir']:
|
||||
d = os.path.dirname(w.buffer.path)
|
||||
self._doit(w, w.buffer.path, w.application.config['c.make-cmd'],
|
||||
cmdname='c-make', cmddir=d)
|
||||
self._doit(w, w.buffer.path, cmd, cmdname='c-make', cmddir=d)
|
||||
else:
|
||||
self._doit(w, w.buffer.path, w.application.config['c.make-cmd'],
|
||||
cmdname='c-make')
|
||||
self._doit(w, w.buffer.path, cmd, cmdname='c-make')
|
||||
|
||||
class C(Fundamental):
|
||||
name = 'C'
|
||||
|
|
Loading…
Reference in New Issue