Fix test targets for some build trees

The old targets only worked if the build tree was below the source tree.
This commit is contained in:
Georg Baum 2012-10-24 22:11:05 +02:00
parent 08375b191c
commit 02b1c4aa51
2 changed files with 11 additions and 1 deletions

View File

@ -36,7 +36,7 @@ TEST_FILES = \
TESTS = test/runtests.py
updatetests: tex2lyx
$(PYTHON) "$(srcdir)/test/runtests.py" ./tex2lyx ../../../lib/scripts "$(srcdir)/test"
$(PYTHON) "$(srcdir)/test/runtests.py" ./tex2lyx "$(top_srcdir)/lib/scripts" "$(srcdir)/test"
LINKED_FILES = \
../Author.cpp \

View File

@ -997,6 +997,16 @@ int main(int argc, char * argv[])
return EXIT_SUCCESS;
} else {
masterFilePathLyX = onlyPath(outfilename);
if (copy_files) {
FileName const path(masterFilePathLyX);
if (!path.isDirectory()) {
if (!path.createPath()) {
cerr << "Warning: Could not create directory for file `"
<< masterFilePathLyX << "´." << endl;
return EXIT_FAILURE;
}
}
}
if (roundtrip) {
if (tex2tex(infilename, FileName(outfilename), default_encoding))
return EXIT_SUCCESS;