Skip to content

Commit

Permalink
don't rely on "echo" supporting \n
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Apr 18, 2018
1 parent 3d60d17 commit 69a6fa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/include/all.mk
Expand Up @@ -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} >> $@

Expand Down

0 comments on commit 69a6fa9

Please sign in to comment.