Code:
$ tree
├── makefile
├── template
├── var1
└── var2
$ cat var1
xxx="true"
$ cat var2
yyy="false"
$ cat template
$config
$ cat makefile
var1 := $(shell cat var1)
var2 := $(shell cat var2)
default:
sh -c "config='$(var1) $(var2)' envsubst < template"
$ make
sh -c "config='xxx="true" yyy="false"' envsubst < template"
xxx=true yyy=false
Observe the output last line
Code:
xxx=true yyy=false
But I expected
Code:
xxx="true" yyy="false"
Practically macan the apices.
Why?