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 8dfebc6818fdd9c7941740ec16bf5b4b64055e3b..cc309f6ae1ec796febb92b7b4fad8083f2d9669d 100644 (file)
@@ -192,6 +192,9 @@ empty string).
 
 &!<lwsp>       disables & until EOL (and then disappears)
 
 
 &!<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,
 &!STUFF
        changes the escape sequence from & to literally STUFF
        STUFF may be any series of of non-whitespace characters,
index 8a5daa6b0fc6269cfc6c2cba935b957a0c62e8e2..486bdc54e1c888b7be9cee539918296651cc8010 100755 (executable)
@@ -165,6 +165,8 @@ sub process_input_mk ($$$$$$$$) {
                s{(?<=[ \t])(?=\S)(?!\\\s*$)}{$prefix}g;
                o $_;
                $_ = $after;
                s{(?<=[ \t])(?=\S)(?!\\\s*$)}{$prefix}g;
                o $_;
                $_ = $after;
+           } elsif (s{^\#}{}) {
+               $_ = '';
            } elsif (s{^![ \t]+}{}) {
                o $_;
                $_ = '';
            } elsif (s{^![ \t]+}{}) {
                o $_;
                $_ = '';