Hi all,

vim-latexsuite checks for a Makefile and set makeprg accordingly only
when Tex_CompileLatex() is called. The problem is when you want to use
the ":make" command : makeprg is set to the default rule (pdflatex),
so it does not use the Makefile.

Here is a small hack to make this feature work (add a check in
Tex_SetTeXCompilerTarget):

diff --git a/vimfiles/ftplugin/latex-suite/compiler.vim
b/vimfiles/ftplugin/latex-suite/compiler.vim
index 08b0509..597293f 100644
--- a/vimfiles/ftplugin/latex-suite/compiler.vim
+++ b/vimfiles/ftplugin/latex-suite/compiler.vim
@@ -24,7 +24,13 @@ function! Tex_SetTeXCompilerTarget(type, target)

        if targetRule != ''
                if a:type == 'Compile'
-                       let &l:makeprg = escape(targetRule,
Tex_GetVarValue('Tex_EscapeChars'))
+            " check if we have a Makefile, and if we want to use it set
+            " makeprg accordingly
+            if Tex_GetVarValue('Tex_UseMakefile') &&
(glob('makefile') != '' || glob('Makefile') != '')
+                let &l:makeprg = 'make $*'
+            else
+                let &l:makeprg = escape(targetRule,
Tex_GetVarValue('Tex_EscapeChars'))
+            endif
                elseif a:type == 'View'
                        let s:viewer = targetRule
                endif

Cheers,
Emmanuel

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to