]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix make_dependencies for .inst files
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 17 Jan 2012 14:42:30 +0000 (14:42 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 17 Jan 2012 14:42:30 +0000 (14:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@24905 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/scripts/make_dependencies.cc

index e17b8a9d9abceeac36e0a43a2fee62bb905d6b05..7f105ea77b3b8b4c3f77d48709e9c7cbf1b32756 100644 (file)
@@ -184,11 +184,25 @@ void determine_direct_includes (const std::string &file)
          std::abort();
        }
 
-                                       // next try to locate the file in
+
+      bool is_inst_file = 
+       included_file.size()>5
+       && (included_file.rfind(".inst") == (included_file.size()-5));
+
+                                      // .inst files are always relative to
+                                      // the current path. We need a special
+                                      // case, because they might not exist
+                                      // at this point and the next block
+                                      // checks the files for existence.
+      if (is_inst_file)
+       included_file = present_path+included_file;
+      
+
+                                      // next try to locate the file in
                                        // absolute paths. For includes of the
                                        // form #include "...", we check the
-                                       // current path first.
-      if (included_file[0] != '/')
+                                       // current path first. 
+      if (included_file[0] != '/' && !is_inst_file)
         {
          bool is_relative_path = false;
           if (line[pos] == '"' && file_exists(present_path+included_file))
@@ -219,8 +233,6 @@ void determine_direct_includes (const std::string &file)
                                       // it will be generated by make
                                       // later, so we better keep it
                                       // on the list.
-      bool is_inst_file = 
-       included_file.size()>5 && (included_file.rfind(".inst") == (included_file.size()-5));
       
       if (line[pos] != '"' || !is_inst_file)
        {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.