From 37d939829bb51d6e697d5a654d7dcc32522f01aa Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 22 Mar 2016 23:14:22 +0000 Subject: Move the configure cache to the .configure directory too. --- make/configure.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'make/configure.pm') diff --git a/make/configure.pm b/make/configure.pm index 7614ca884..db9c42eb9 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -41,7 +41,7 @@ use make::console; use make::utilities; use constant CONFIGURE_DIRECTORY => '.configure'; -use constant CONFIGURE_CACHE_FILE => '.configure.cache'; +use constant CONFIGURE_CACHE_FILE => catfile(CONFIGURE_DIRECTORY, 'cache.cfg'); use constant CONFIGURE_CACHE_VERSION => '1'; our @EXPORT = qw(CONFIGURE_CACHE_FILE @@ -228,6 +228,11 @@ sub read_configure_cache { } sub write_configure_cache(%) { + unless (-e CONFIGURE_DIRECTORY) { + print_format "Creating <|GREEN ${\CONFIGURE_DIRECTORY}|> ...\n"; + create_directory CONFIGURE_DIRECTORY, 0750 or print_error "unable to create ${\CONFIGURE_DIRECTORY}: $!"; + } + print_format "Writing <|GREEN ${\CONFIGURE_CACHE_FILE}|> ...\n"; my %config = @_; open(CACHE, '>', CONFIGURE_CACHE_FILE) or print_error "unable to write ${\CONFIGURE_CACHE_FILE}: $!"; -- cgit v1.2.3