From: Martin Mares Date: Thu, 30 Oct 2008 20:56:54 +0000 (+0100) Subject: Configure: Added a mechanism for registering post-config hooks. X-Git-Tag: holmes-import~227^2~5^2~9 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=f8f865517248fe7098e262319dc655b40537de9f;p=libucw.git Configure: Added a mechanism for registering post-config hooks. --- diff --git a/ucw/perl/UCW/Configure.pm b/ucw/perl/UCW/Configure.pm index 6fb84a19..2657a630 100644 --- a/ucw/perl/UCW/Configure.pm +++ b/ucw/perl/UCW/Configure.pm @@ -23,6 +23,7 @@ BEGIN { our %vars; our %overriden; +our @postconfigs; sub debPrint() { print "VARS:\n"; @@ -157,7 +158,15 @@ sub Include($) { require $f; } +sub PostConfig(&) { + unshift @postconfigs, $_[0]; +} + sub Finish() { + for my $post (@postconfigs) { + &$post(); + } + print "\n"; if (Get("SRCDIR") ne ".") {