From: Arnaud Giersch Date: Mon, 23 Apr 2018 08:00:06 +0000 (+0200) Subject: Allow to give search directory on command line. X-Git-Tag: v3.20~343 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0eea8359e77474a2aec1f551accd4c83e3d0980b Allow to give search directory on command line. --- diff --git a/tools/doxygen/xbt_log_extract_hierarchy.pl b/tools/doxygen/xbt_log_extract_hierarchy.pl index 8370735d8b..3675ec9f6c 100755 --- a/tools/doxygen/xbt_log_extract_hierarchy.pl +++ b/tools/doxygen/xbt_log_extract_hierarchy.pl @@ -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=) { 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