]> git.lyx.org Git - features.git/commitdiff
Fix test targets for some build trees
authorGeorg Baum <baum@lyx.org>
Wed, 24 Oct 2012 20:11:05 +0000 (22:11 +0200)
committerGeorg Baum <baum@lyx.org>
Wed, 24 Oct 2012 20:11:05 +0000 (22:11 +0200)
The old targets only worked if the build tree was below the source tree.

src/tex2lyx/Makefile.am
src/tex2lyx/tex2lyx.cpp

index 94e6c4d6b75a03465487fa13fb048602573a1195..b0be0afd961a32b32d297367afa78b68d9c25e86 100644 (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 \
index 1abdecb2c919d9401af84aef264542e6da00856f..756177463340788be00e1c31169c8db8a2538e94 100644 (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;