Skip to content

Commit

Permalink
make.bat: change current directory
Browse files Browse the repository at this point in the history
amendment for switching between drives and flipping back to initial cur dir at end of make.bat
  • Loading branch information
jannick0 committed May 21, 2014
1 parent fc386eb commit feb24c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/latexgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ static void writeMakeBat()
exit(1);
}
FTextStream t(&file);
t << "cd %~p0\n\n"; // switch current directory with make.bat (for external calls of make.bat)
t << "set Dir_Old=%cd%\n";
t << "cd /D %~dp0\n\n";
t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n\n";
if (!Config_getBool("USE_PDFLATEX")) // use plain old latex
{
Expand Down Expand Up @@ -247,6 +248,7 @@ static void writeMakeBat()
t << "endlocal\n";
t << mkidx_command << " refman.idx\n";
t << "pdflatex refman\n";
t << "cd /D %Dir_Old%\n";
}
#endif
}
Expand Down

0 comments on commit feb24c8

Please sign in to comment.