diff options
author | Joey Hess <joey@kitenet.net> | 2010-04-24 20:22:20 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-04-24 20:22:20 -0400 |
commit | ca9c6cc254d934837406ef9bb0dc5d021983661b (patch) | |
tree | 4e9e9edcbcee0227e550c6674167b010fe82acd1 /IkiWiki/Render.pm | |
parent | 0d8fc55d3356ea7da2ce175d25230d207bd32088 (diff) | |
download | ikiwiki-ca9c6cc254d934837406ef9bb0dc5d021983661b.tar ikiwiki-ca9c6cc254d934837406ef9bb0dc5d021983661b.tar.gz |
add support for mass dependencies
Registered by passing "" as page name to add_depends.
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r-- | IkiWiki/Render.pm | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 8ae0cbd4f..50af2bdec 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -591,13 +591,18 @@ sub render_dependent ($$$$$$$) { my %lc_changed = map { lc(pagename($_)) => 1 } @changed; my %lc_exists_changed = map { lc(pagename($_)) => 1 } @exists_changed; + + my $mass_reason; + foreach my $p ("page.tmpl", keys %{$depends_simple{""}}) { + $mass_reason=$p if $rendered{$p}; + } foreach my $f (@$files) { next if $rendered{$f}; my $p=pagename($f); - my $reason = undef; - - if (exists $depends_simple{$p}) { + my $reason = $mass_reason; + + if (exists $depends_simple{$p} && ! defined $reason) { foreach my $d (keys %{$depends_simple{$p}}) { if (($depends_simple{$p}{$d} & $IkiWiki::DEPEND_CONTENT && $lc_changed{$d}) @@ -771,13 +776,7 @@ sub refresh () { render_linkers($file); } - if ($rendered{"templates/page.tmpl"}) { - foreach my $f (@$files) { - next if $f eq "templates/page.tmpl"; - render($f, sprintf(gettext("building %s, which depends on %s"), $f, "templates/page.tmpl")); - } - } - elsif (@$changed || @$internal_changed || + if (@$changed || @$internal_changed || @$del || @$internal_del || @$internal_new) { 1 while render_dependent($files, $new, $internal_new, $del, $internal_del, $internal_changed, |