From e800135795f6f551781b2e0f531926ef8a4a2e34 Mon Sep 17 00:00:00 2001 From: moculus Date: Sat, 11 Apr 2009 03:45:21 +0000 Subject: [PATCH] --HG-- branch : pmacs2 --- mode/c.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/mode/c.py b/mode/c.py index 40fdd10..8b171a4 100644 --- a/mode/c.py +++ b/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) + d = os.path.dirname(w.buffer.path) + 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'