From a9f3a0a0d4960cbd579e88b3a0e98867c7264a7a Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 14 Aug 2009 19:45:30 +0000 Subject: Regenerate modules makefile if installing or uninstalling extras modules. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11513 e03df62e-2008-0410-955e-edbf42e46eb7 --- modulemanager | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'modulemanager') diff --git a/modulemanager b/modulemanager index f98b0a3d1..37aebac9b 100755 --- a/modulemanager +++ b/modulemanager @@ -278,11 +278,15 @@ resolve_deps(0); $| = 1; # immediate print of lines without \n +# whether or not to invoke ./configure -modupdate after processing +my $regen_modules_list = 0; + print "Processing changes for $action...\n"; for my $mod (keys %installed) { next if $todo{$mod}; print "Uninstalling $mod $installed{$mod}\n"; unlink "src/modules/$mod.cpp"; + $regen_modules_list = 1; } my $count = scalar keys %todo; @@ -308,6 +312,7 @@ for my $mod (sort keys %todo) { } else { print " - HTTP $stat\n"; } + $regen_modules_list = 1; } # write database of installed versions @@ -317,4 +322,11 @@ foreach my $key (keys %mod_versions) print SRC "$key $mod_versions{$key}\n"; } close SRC; -print "Done!\n"; + +# regenerate makefiles if necessary +if ($regen_modules_list) +{ + print "Done... Re-generating makefiles\n"; + system "./configure -modupdate"; +} +print "Finished!\n"; -- cgit v1.2.3