X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=subdirmk.git;a=blobdiff_plain;f=build-aux%2Fsubdirmk-setup;h=e6e30e039912fd36f5703982199d3d7cc7cad736;hp=000417f01874d940438518056b1c94ad09934aaa;hb=e0d6429b6d8ed4c07f1dec7adeeab6984bb5c56c;hpb=cd3afb9014e59028706fdea6361acaf9c74498da diff --git a/build-aux/subdirmk-setup b/build-aux/subdirmk-setup index 000417f..e6e30e0 100755 --- a/build-aux/subdirmk-setup +++ b/build-aux/subdirmk-setup @@ -16,6 +16,8 @@ die unless @ARGV>=2; shift @ARGV; ($srcdir, @subdirs) = @ARGV; +s{/+$}{} foreach @subdirs; + our $root = [ '.', [ ] ]; # each node is [ 'relative subdir name', \@children ] @@ -77,8 +79,12 @@ sub write_makefile ($$) { my $cd = $depth ? join('/', ('..',) x $depth) : '.'; o <