Notes to editors: Please don't change the code. I'll report it.
I hope you remember your username and password because lot of people found that answer useful.. But not me, no Sr. and that's because in a Makefile rules are slightly different.
In my case I'm encoding some JSON data and providing that to curl so I'm going to share just the basic idea because it is already encoded if you use the right type.
# Remember, this is a Makefile!
# Assuming your environment knows the variables in brackets
more_tests:
@LABORADO=$$(echo -n "{\"user\":\"$(ALWAYS)\",\"know\":\"$(NOTHING)\"}" | base64) && \
echo $(SHELL) && \
echo \"$$LABORADO\"
And this is the output:
> make more_tests
/bin/sh
"eyJ1c2VyIjoic2hvdWxkIiwia25vdyI6ImhpbXNlbGYifQ=="
The shell variable was just a random environment variable that I picked as an example because I know whatever your environment is it will know that value (I hope).
Remember.. I know $ALWAYS, $NOTHING, but I know my environment :D)