]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
only print out top-level attributes
authorAlan T. DeKok <aland@freeradius.org>
Sun, 9 May 2021 19:30:24 +0000 (15:30 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 9 May 2021 19:30:24 +0000 (15:30 -0400)
as the names for sub-attributes are not qualified by the parents
name.

In order to do this properly, we should change the series of shell
commands with grep / awk into a Perl script.  Probably by copying
scripts/dict/format.pl and changing it.

src/include/all.mk

index f332f74cd878f69b12d9be0b5bb7e5c07923497a..0debbcd08d0e1e6c97d4a1fb5c16dc499136f986 100644 (file)
@@ -61,7 +61,7 @@ src/include/$(1): $(2)
        ${Q}test -e $$@ || mkdir -p $$(dir $$@)
        ${Q}echo "#pragma once" > $$@
        ${Q}grep ^PROTOCOL $$< | ${NORMALIZE} | awk '{print "#define FR_PROTOCOL_"$$$$2" " $$$$3 "      //!< AUTOGENERATED PROTOCOL NUMBER DEFINITION"}' >> $$@
-       ${Q}grep ^ATTRIBUTE $$< | ${NORMALIZE}  | awk '{print "#define FR_"$$$$2 " " $$$$3 "    //!< AUTOGENERATED ATTRIBUTE DEFINITION"}' >> $$@
+       ${Q}grep ^ATTRIBUTE $$< | egrep -v '[   ]\.' | ${NORMALIZE}  | awk '{print "#define FR_"$$$$2 " " $$$$3 "       //!< AUTOGENERATED ATTRIBUTE DEFINITION"}' >> $$@
        ${Q}grep ^STRUCT $$< | ${NORMALIZE}  | awk '{print "#define FR_"$$$$2 " " $$$$3 "       //!< AUTOGENERATED ATTRIBUTE DEFINITION"}' >> $$@
        ${Q}grep ^VALUE $$< | ${NORMALIZE} | awk '{print "#define FR_"$$$$2"_VALUE_"$$$$3 " " $$$$4 "   //!< AUTOGENERATED VALUE DEFINITION"}' >> $$@
 endef