diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-04-18 09:53:51 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-04-18 09:53:51 +0000 |
commit | e9d3e0ca5788ef39b1f09b9bfea3709eea4992f7 (patch) | |
tree | 33322d2b9980797001598384542d759d359c1f89 /lib/make/setup_configuration.pl | |
parent | 5bdbd10a2cd10eb9a48f856ed51fa85fbb4adaac (diff) |
Tidied a bit.
Added creation of a new file
configs/<config>/config-info
which stores info about the configuration.
Currently it stores the name of the configuration, the flags passed to make,
the date of the configuration, the host the configuration was created on,
and the error return code of the configure script.
Note that the flags are in the form
<actual make flags> -- <other flags>
and normally will just be
s
which is from the implicit -s when SILENT=yes (the default).
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1570 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/setup_configuration.pl')
-rwxr-xr-x | lib/make/setup_configuration.pl | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/lib/make/setup_configuration.pl b/lib/make/setup_configuration.pl index 92d39640..a0ac978d 100755 --- a/lib/make/setup_configuration.pl +++ b/lib/make/setup_configuration.pl @@ -62,44 +62,46 @@ if (! -d "$config" && ! -l "$config") { print "Creating new configuration $config.\n"; - mkdir("$config",0755) || die "Internal error - could't create $configs_dir/$config"; + for $dir ("$config", "$config/build", "$config/lib", "$config/config-data") + { + mkdir("$dir",0755) || die "Internal error - could't create $dir"; + } - chdir "$config" || die "Internal error - could't enter $configs_dir/$config"; +} +else +{ + print "Reconfiguring $config.\n"; + $reconfiguring = 1; +} - mkdir("build",0755); - mkdir("lib",0755); - mkdir("config-data",0755); - chdir "config-data" || die "Internal error - could't enter $configs_dir/$config/config-data"; +chdir "$config" || die "Internal error - could't enter $configs_dir/$config"; - &SetConfigureEnv(); +open(INFO, ">config-info") || die "Internal error - couldn't create $configs_dir/$config/config-info"; - system("$configure"); +print INFO "CONFIG : $config\n"; +print INFO "CONFIG-FLAGS : " . $ENV{"MAKEFLAGS"} . "\n"; +print INFO "CONFIG-DATE : " . gmtime(time()) . "\n"; - $retcode = $? >> 8; +$host = `hostname`; - chdir ".."; - chdir ".."; -} +chop $host; -# Rerun the configure script -if($reconfig) -{ - print "Reconfiguring $config.\n"; +print INFO "CONFIG-HOST : " . $host . "\n"; - chdir "$config" || die "Internal error - could't enter $configs_dir/$config"; +chdir "config-data" || die "Internal error - could't enter $configs_dir/$config/config-data"; - chdir "config-data" || die "Internal error - couldn't enter $configs_dir/$config/config-data"; +&SetConfigureEnv(); - &SetConfigureEnv(); +system("$configure"); - system("$configure"); +$retcode = $? >> 8; - $retcode = $? >> 8; +chdir ".."; - chdir ".."; - chdir ".."; -} +print INFO "CONFIG-STATUS : $retcode\n"; + +close(INFO); exit $retcode; @@ -165,3 +167,5 @@ sub SetConfigureEnv } } + +sub ConfigureConfiguration |