From: Ian Jackson Date: Sun, 10 Nov 2019 13:31:36 +0000 (+0000) Subject: Revert "BEFORE NO BUILD TREE" X-Git-Tag: subdirmk/0.1~131 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=subdirmk.git;a=commitdiff_plain;h=2f80e8623b4712dbe0f46963f7aed08ec4645473;ds=sidebyside Revert "BEFORE NO BUILD TREE" This reverts commit a423046ad42c0fbdf7fd3afad88dfe57dfbd30ca. --- 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 <