diff --git a/meta/attrversion.sh b/meta/attrversion.sh index 205744ab5..5cc72361c 100755 --- a/meta/attrversion.sh +++ b/meta/attrversion.sh @@ -44,4 +44,5 @@ TAGS=$(git tag --sort=v:refname | grep -P "^v\d+\.\d+.\d+$" | sed -n -e '/'$BASE (for tag in $TAGS; do git grep -P "^\s+SAI_\w+_ATTR_" $tag ../inc ../experimental | cat; done; grep -P "^\s+SAI_\w+_ATTR_" ../inc/sai*h ../experimental/sai*h | perl -npe '$_.="HEAD:"' ) | \ - perl -ne '/^(\S+):..\/(\S+)\/\S+.h:\s+(SAI_\w+_ATTR_\w+)/; print "#define $3 \"$1\" /* $2 */\n" if not defined $h{$3};$h{$3}=1' > $OUTPUT + perl -ne '/^(\S+):..\/(\S+)\/\S+.h:\s+(SAI_\w+_ATTR_\w+)/; + print "#define SAI_METADATA_ATTR_VERSION_$3 \"$1\" /* $2 */\n" if not defined $h{$3};$h{$3}=1' > $OUTPUT diff --git a/meta/parse.pl b/meta/parse.pl index 0c7677c2e..8ccabb198 100755 --- a/meta/parse.pl +++ b/meta/parse.pl @@ -4432,7 +4432,7 @@ sub ExtractAttrApiVersion for my $line (@lines) { - if (not $line =~ /#define (SAI_\w+_ATTR_\w+) "(v\d+\.\d+\.\d+|HEAD)"/) + if (not $line =~ /#define SAI_METADATA_ATTR_VERSION_(SAI_\w+_ATTR_\w+) "(v\d+\.\d+\.\d+|HEAD)"/) { LogError "invalid line in saiattrversion.h: $line"; next;