From 069a72ad079ed3336c619d6766543112db9d6894 Mon Sep 17 00:00:00 2001 From: kanschat Date: Sun, 4 Dec 2011 22:43:55 +0000 Subject: [PATCH] Keep .inst-files on the list git-svn-id: https://svn.dealii.org/trunk@24787 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/common/scripts/make_dependencies.cc | 22 +++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/deal.II/common/scripts/make_dependencies.cc b/deal.II/common/scripts/make_dependencies.cc index 07f9515f13..3880244593 100644 --- a/deal.II/common/scripts/make_dependencies.cc +++ b/deal.II/common/scripts/make_dependencies.cc @@ -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); -- 2.39.5