Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Allow to give search directory on command line.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 23 Apr 2018 08:00:06 +0000 (10:00 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 23 Apr 2018 08:13:32 +0000 (10:13 +0200)
tools/doxygen/xbt_log_extract_hierarchy.pl

index 8370735..3675ec9 100755 (executable)
@@ -75,14 +75,14 @@ sub parse_file {
        print STDERR " $name -> $anc\n" if $debug;
    }
 }
-# Retrieve all the file names, and add their content to $data
-my $data;
-open FILES, "find ../src/ ../tools/ ../include/ -name '*.c' -o -name '*.cpp' |" || die "Cannot search for the source file names: $!\n";
+# Retrieve all the file names
+my $path = $ARGV[0] // "..";
+open FILES, "find $path/src/ $path/tools/ $path/include/ -name '*.c' -o -name '*.cpp' |" || die "Cannot search for the source file names: $!\n";
 while (my $file=<FILES>) {
     chomp $file;
     parse_file($file);         
 }
-parse_file("../include/xbt/sysdep.h"); 
+parse_file("$path/include/xbt/sysdep.h");
 close FILES;
 
 # Display the tree, looking for disconnected elems