chiark / gitweb /
Macro assistance part 2 - syntax for $(eval $(call...))
[subdirmk.git] / tests / filter / extract-doctest
index 57f5313a1fda1e96800430703f3ebd6459b7abc7..d779e00a5da4c152f9e55146a7c16b05f483c87c 100755 (executable)
@@ -56,6 +56,9 @@ while (<>) {
            $e->{OutTop} = $1 eq 'nothing' ? '' : $1;
        } elsif (# parse: expect other wordish things to be comments
                 m{^(?!or\b)\w{2,} }) {
+       } elsif (# adhoc: slightly special case for $(eval $(call
+                m{^\$\{.*}) {
+           $e->{Out} .= ' '.$&;
        } elsif (m/^$/) {
        } else {
            confess "unk rhs $_ ?";
@@ -140,6 +143,8 @@ sub writeout ($) {
                      my ($e) = @_;
                      # adhoc: skip &:macro in already-doubling part
                      return 0 if $e->{In} =~ m{^\&\:macro};
+                     # adhoc: skip &${ ie eval in already-doubling part
+                     return 0 if $e->{In} =~ m{^\&\$\{};
                      return 0 if $e->{CQ};
                      return $e->{DD} || !grep {
                          # If there are two entries with the same In,