Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix the log hierarchy extraction wrt mc_main, that is not in libsimgrid
[simgrid.git] / tools / doxygen / xbt_log_extract_hierarchy.pl
index 8544ab9..40f60ee 100755 (executable)
@@ -1,5 +1,11 @@
 #!/usr/bin/perl
 
+# Copyright (c) 2008, 2010, 2012-2014. The SimGrid Team.
+# All rights reserved.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the license (GNU LGPL) which comes with this package.
+
 use strict;
 use warnings;
 
@@ -86,7 +92,7 @@ sub parse_file {
 }
 # Retrieve all the file names, and add their content to $data
 my $data;
-open FILES, "find ../src/ ../tools/ ../include/ -name '*.c'|" || die "Cannot search for the source file names: $!\n";
+open FILES, "find ../src/ ../tools/ ../include/ -name '*.c' -o -name '*.cpp' |" || die "Cannot search for the source file names: $!\n";
 while (my $file=<FILES>) {
     chomp $file;
     parse_file($file);         
@@ -112,7 +118,9 @@ sub display_subtree {
 display_subtree("XBT_LOG_ROOT_CAT","");
 
 map {
-    warn "Category $_ does not seem to be connected.  Use XBT_LOG_CONNECT($_).\n";
+    if ($_ ne "mc_main") { # This one is not in libsimgrid
+      warn "Category $_ does not seem to be connected.  Use XBT_LOG_CONNECT($_).\n";
+    }
 } grep {!defined $connected{$_}} sort keys %ancestor;
 map {
     warn "Category $_ does not seem to be connected to the root (anc=$ancestor{$_})\n";