chiark / gitweb /
WIP
[subdirmk.git] / build-aux / subdirmk-setup
index 000417f01874d940438518056b1c94ad09934aaa..f781325657e96ef97aece23ab6864e1ced9a297a 100755 (executable)
@@ -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,6 +79,7 @@ sub write_makefile ($$) {
     my $cd = $depth ? join('/', ('..',) x $depth) : '.';
     o <<END;
 default: all
+.SUFFIXES:
 %:
        \$(MAKE) -C $cd -f subdirs.mk ${dir_prefix}\$@
 END