diff options
author | Peter Powell <petpow@saberuk.com> | 2016-03-22 23:14:22 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2016-03-22 23:39:03 +0000 |
commit | 37d939829bb51d6e697d5a654d7dcc32522f01aa (patch) | |
tree | 6df34c8348fb73adeefbea94f130cf5417ddfd64 /make/configure.pm | |
parent | f79a55616b5ff05d4f2e6b031a17be5668d1d3ea (diff) |
Move the configure cache to the .configure directory too.
Diffstat (limited to 'make/configure.pm')
-rw-r--r-- | make/configure.pm | 7 |
1 files changed, 6 insertions, 1 deletions
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}: $!"; |