branch : pmacs2
This commit is contained in:
moculus 2009-04-11 03:45:21 +00:00
parent 1e912c093a
commit e800135795
1 changed files with 8 additions and 10 deletions

View File

@ -139,26 +139,24 @@ class CCheckSyntax(Exec):
show_success = False show_success = False
args = [] args = []
def _execute(self, w, **vargs): def _execute(self, w, **vargs):
cmd='C_INCLUDE_PATH=. %s' % w.application.config['c.syntax-cmd']
if w.application.config['c.syntax-rel-dir']: if w.application.config['c.syntax-rel-dir']:
d = os.path.dirname(w.buffer.path) self._doit(w, w.buffer.path, cmd, cmdname='c-check-syntax',
self._doit(w, w.buffer.path, w.application.config['c.syntax-cmd'], cmddir=os.path.dirname(w.buffer.path))
cmdname='c-check-syntax', cmddir=d)
else: else:
self._doit(w, w.buffer.path, w.application.config['c.syntax-cmd'], self._doit(w, w.buffer.path, cmd, cmdname='c-check-syntax')
cmdname='c-check-syntax')
class CMake(Exec): class CMake(Exec):
'''Build this C program (using the mode's make cmd)''' '''Build this C program (using the mode's make cmd)'''
show_success = False show_success = False
args = [] args = []
def _execute(self, w, **vargs): def _execute(self, w, **vargs):
cmd = w.application.config['c.make-cmd'],
if w.application.config['c.make-rel-dir']: if w.application.config['c.make-rel-dir']:
d = os.path.dirname(w.buffer.path) d = os.path.dirname(w.buffer.path)
self._doit(w, w.buffer.path, w.application.config['c.make-cmd'], self._doit(w, w.buffer.path, cmd, cmdname='c-make', cmddir=d)
cmdname='c-make', cmddir=d)
else: else:
self._doit(w, w.buffer.path, w.application.config['c.make-cmd'], self._doit(w, w.buffer.path, cmd, cmdname='c-make')
cmdname='c-make')
class C(Fundamental): class C(Fundamental):
name = 'C' name = 'C'