]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Keep .inst-files on the list
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 4 Dec 2011 22:43:55 +0000 (22:43 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 4 Dec 2011 22:43:55 +0000 (22:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@24787 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/scripts/make_dependencies.cc

index 07f9515f13dc142c6cd71e14af5d00f594de92c5..3880244593795997ce92857045d49aca08aa6b06 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2003, 2007, 2008, 2010 by the deal.II authors
+//    Copyright (C) 2003, 2007, 2008, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -92,8 +92,17 @@ void determine_direct_includes (const std::string &file)
                                file.begin()+file.rfind ('/')+1);
 
   std::ifstream in(file.c_str());
-  assert ((bool)in);
-
+                                  // If the file does not exist, for
+                                  // instance an ".inst" file which
+                                  // will be generated by make later,
+                                  // just return from this function.
+                                  //
+                                  // As a result, non-existing files
+                                  // are expected to have no
+                                  // dependencies.
+  if (! ((bool)in))
+    return;
+  
   std::string line;
   while (in)
     {
@@ -195,7 +204,12 @@ void determine_direct_includes (const std::string &file)
                                        // and that we can read from
                                        // it, otherwise just ignore
                                        // the line
-      {
+
+                                      // If this is an ".inst" file,
+                                      // it will be generated by make
+                                      // later, so we better keep it
+                                      // on the list.
+      if (included_file.rfind(".inst") != (included_file.size()-5)) {
        struct stat buf;
        int error = stat (included_file.c_str(), &buf);
 

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.