chiark / gitweb /
New &# feature
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Nov 2019 22:03:57 +0000 (22:03 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Nov 2019 22:03:57 +0000 (22:03 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
subdirmk/README
subdirmk/generate

index 8dfebc6..cc309f6 100644 (file)
@@ -192,6 +192,9 @@ empty string).
 
 &!<lwsp>       disables & until EOL (and then disappears)
 
+&#     delete everything to end of line
+       (useful if the RHS contains unrecognise & constructions)
+
 &!STUFF
        changes the escape sequence from & to literally STUFF
        STUFF may be any series of of non-whitespace characters,
index 8a5daa6..486bdc5 100755 (executable)
@@ -165,6 +165,8 @@ sub process_input_mk ($$$$$$$$) {
                s{(?<=[ \t])(?=\S)(?!\\\s*$)}{$prefix}g;
                o $_;
                $_ = $after;
+           } elsif (s{^\#}{}) {
+               $_ = '';
            } elsif (s{^![ \t]+}{}) {
                o $_;
                $_ = '';