use make::common;
use make::console;
-use make::utilities;
use constant CONFIGURE_DIRECTORY => '.configure';
use constant CONFIGURE_CACHE_FILE => catfile(CONFIGURE_DIRECTORY, 'cache.cfg');
write_configure_cache
get_compiler_info
find_compiler
- get_property
parse_templates);
sub __get_socketengines {
--socketengine=[name] Sets the socket engine to be used. Possible
values are $SELIST.
--uid=[id|name] Sets the user to run InspIRCd as.
- --update Updates the build environment.
+ --update Updates the build environment with the settings
+ from the cache.
FLAGS
say 'Updating...';
my %config = read_configure_cache();
my %compiler = get_compiler_info($config{CXX});
- my %version = get_version();
+ my %version = get_version $config{DISTRIBUTION};
parse_templates(\%config, \%compiler, \%version);
say 'Update complete!';
exit 0;
}
}
-sub get_property($$;$)
-{
- my ($file, $property, $default) = @_;
- open(MODULE, $file) or return $default;
- while (<MODULE>) {
- if ($_ =~ /^\/\* \$(\S+): (.+) \*\/$/) {
- next unless $1 eq $property;
- close(MODULE);
- return translate_functions($2, $file);
- }
- }
- close(MODULE);
- return $default // '';
-}
-
sub parse_templates($$$) {
# These are actually hash references