From 8f1dd43b556907902dd57c3af6b4a590f0932620 Mon Sep 17 00:00:00 2001 From: Devin Teske Date: Tue, 7 May 2013 04:46:08 +0000 Subject: [PATCH] Recursively calculate includes. This solves the problem of some includes missing from the graph, but it also unfortunately forces yet another bug in graphviz dot(1) to appear. When edge labels are enabled (using '\T') with this many edges, dot(1) will do bad things in init_rank() and often crash. So while we're here, let's disable edge labels for the include- relationship graph feature. --- usr.sbin/bsdconfig/dot/dot | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/usr.sbin/bsdconfig/dot/dot b/usr.sbin/bsdconfig/dot/dot index f536c07427e5..367c15257d07 100755 --- a/usr.sbin/bsdconfig/dot/dot +++ b/usr.sbin/bsdconfig/dot/dot @@ -276,20 +276,26 @@ if [ "$SHOW_INCLUDES" ]; then # # Search previously-discovered include files for further includes # - for file in $include_file_list; do - include_file_list="$include_file_list $( - awk "$print_includes_awk" $BSDCFG_SHARE/$file - )" - done + before="$include_file_list" + while :; do + for file in $include_file_list; do + include_file_list="$include_file_list $( + awk "$print_includes_awk" $BSDCFG_SHARE/$file + )" + done - # - # Sort the list of includes and remove duplicate entries [again] - # - include_file_list=$( - for include_file in $include_file_list; do - echo "$include_file" - done | sort -u - ) + # + # Sort list of includes and remove duplicate entries [again] + # + include_file_list=$( + for include_file in $include_file_list; do + echo "$include_file" + done | sort -u + ) + + [ "$include_file_list" = "$before" ] && break + before="$include_file_list" + done fi # @@ -435,7 +441,8 @@ if [ "$SHOW_INCLUDES" ]; then shape=oval color=black fillcolor=white style=filled edge_color=grey begin_nodelist "$shape" "$color" "$fillcolor" "$style" print_node edge "style = dashed" "color = $edge_color" - print_node edge "label = \"\\T\"" "fontsize = 9" + #print_node edge "label = \"\\T\"" "fontsize = 9" + # NOTE: Edge labels are buggy on large graphs file_list=$( for file in \ $BSDCONFIG \