I'm having hard time writing a makefile rule that outputs a multiline variable in a file.
Here is the code I have :
define VAR1
/dev d 755 - - - - -
endef
define VAR2
/test d 777 - - - - -
/test2 d 777 - - - - -
endef
VARS += $(VAR1)
VARS += $(VAR2)
all:
echo "$(VARS)" > test
However, the echo fails telling "Unterminated quoted string" for a reason unknown to me. How could i put in the file every lines declared on a separate line ?