From f8f865517248fe7098e262319dc655b40537de9f Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 30 Oct 2008 21:56:54 +0100 Subject: [PATCH] Configure: Added a mechanism for registering post-config hooks. --- ucw/perl/UCW/Configure.pm | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ".") { -- 2.39.5