Closed cristim closed 7 years ago
It already works if the user gives the var as follows: LDFLAGS='"foo bar"' make
. You think that it's not up to the user to do this?
Even in Go, when giving the -ldflags
one has to quote the value if there are multiple values. Go does not do the job for the end user.
I find it cleaner to quote/fix it where it's needed as quoted (the docker run command fails without quotes) instead of defining it with nested quotes from the start.
Without the quotes in the Makefile.example, my main Makefile would need to define it like this, which I personally find ugly:
LDFLAGS="'-pluginpath lambda -X lambda.Version=$(BUILD)'"
Later edit: never mind, I found a way to make my Makefile quote it.
Hey @cristim why did you closed the PR, I was performing some tests in order to know if this modification is not too specific for those (like you) who use another Makefile to run the Makefile.example. It had to be generic for every usage. So I just finished my tests and it's very ok. So please reopen so I can merge :wink:
Oh you've deleted it in a row :cry: Reopen it please.
@fsenart reopened
I think it needs to be quoted in order to properly support the case when LDFLAGS contains multiple options separated by whitespace.