From 2f80e8623b4712dbe0f46963f7aed08ec4645473 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 10 Nov 2019 13:31:36 +0000 Subject: [PATCH 1/1] Revert "BEFORE NO BUILD TREE" This reverts commit a423046ad42c0fbdf7fd3afad88dfe57dfbd30ca. --- build-aux/subdirmk-setup | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/build-aux/subdirmk-setup b/build-aux/subdirmk-setup index c1866f6..9f3c8c6 100644 --- a/build-aux/subdirmk-setup +++ b/build-aux/subdirmk-setup @@ -8,41 +8,25 @@ use strict; -our $root = [ '.', [ ] ]; -# each node is [ 'relative subdir name', \@children ] +our @allsubdirs = @ARGV; -sub build_tree () { - foreach my $subdir (@ARGV) { - my @path = $subdir eq '.' ? () : split m{/+}, $subdir; - my $node = $root; - foreach my $d (@path) { - my ($c,) = grep { $_->[0] eq $d } @{ $node->[1] }; - if (!$c) { - $c = [ $d, [ ] ]; - push @{ $node->[1] }, $c; - } - $node = $c; - } - } -} - - - -sub write_makefile ($$) { - my ($subdir,$depth) = @_; +sub write_makefile () { start_output_file("Makefile"); - my $cd = $depth ? join('/', ('..',) x $depth) : '.'; print O <