chiark / gitweb /
nailing-cargo: Make oot_absdir available earlier
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 25 Jul 2020 15:48:46 +0000 (16:48 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 25 Jul 2020 16:11:51 +0000 (17:11 +0100)
No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
nailing-cargo

index e9436f0821852b0bb042ff55f1aa3f4bd460d964..cef0808803d46e9260b6e55afb69c2dd2eab0dfa 100755 (executable)
@@ -273,6 +273,7 @@ sub consider_alt_cargo_lock () {
 }
 
 our $oot_dir;      # oot.dir or "Build"
+our $oot_absdir;
 
 sub consider_oot () {
   $oot_dir = cfgs qw(oot dir);
@@ -286,6 +287,7 @@ sub consider_oot () {
     return;
   }
   $oot_dir //= 'Build';
+  $oot_absdir = ($oot_dir !~ m{^/} ? "$worksphere/" : ""). $oot_dir;
 }
 
 our %manifests;
@@ -489,7 +491,6 @@ sub addargs () {
   unshift @ARGV, @args_preface;
 }
 
-our $oot_absdir;
 our $build_absdir; # .../Build/<subdir>
 
 sub oot_massage_cmdline () {
@@ -497,7 +498,6 @@ sub oot_massage_cmdline () {
 
   my $use = cfgs qw(oot use);
   $use // die "$self: out-of-tree build, but \`oot.use' not configured\n";
-  $oot_absdir = ($oot_dir !~ m{^/} ? "$worksphere/" : ""). $oot_dir;
   $build_absdir = "$oot_absdir/$subdir";
 
   my ($pre,$post);