Skip to content
Permalink
Browse files

don't rely on "echo" supporting \n

  • Loading branch information...
alandekok committed Apr 18, 2018
1 parent 3d60d17 commit 69a6fa99f230d4ea9996d2ebfdf7796d1a2d670f
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/include/all.mk
@@ -81,18 +81,20 @@ HEADERS += $(notdir ${HEADERS_RFC})
.PRECIOUS: $(HEADERS_RFC)

NORMALIZE := tr -- '[:lower:]/.-' '[:upper:]___' | sed 's/^/\#define /;s/241_//;'
HEADER := "/* AUTO_GENERATED FILE. DO NOT EDIT */\n\#pragma once"
HEADER := "/* AUTO_GENERATED FILE. DO NOT EDIT */"

src/include/attributes.h: share/dictionary.freeradius.internal
${Q}$(ECHO) HEADER $@
${Q}echo ${HEADER} > $@
${Q}echo "#pragma once" >> $@
${Q}grep ^ATTRIBUTE $< | awk '{print "FR_"$$2 " " $$3 }' | ${NORMALIZE} >> $@
${Q}echo " " >> $@
${Q}grep -- 'Auth-Type' $< | grep ^VALUE | awk '{print "FR_"$$2 "_" $$3 " " $$4 }' | ${NORMALIZE} >> $@

src/include/%.h: share/dictionary.% share/dictionary.vqp share/dictionary.freeradius.snmp
${Q}$(ECHO) HEADER $@
${Q}echo ${HEADER} > $@
${Q}echo "#pragma once" >> $@
${Q}grep ^ATTRIBUTE $< | awk '{print "FR_"$$2 " " $$3 }' | ${NORMALIZE} >> $@
${Q}grep ^VALUE $< | awk '{print "FR_"$$2"_VALUE_"$$3 " " $$4 }' | ${NORMALIZE} >> $@

0 comments on commit 69a6fa9

Please sign in to comment.
You can’t perform that action at this time.