4

Simple question but there are so many things to consider in make that it feels better if I ask this question:

Is VARIABLE = value equal to VARIABLE=value?

2 Answers 2

3

Yes, they're the same. Per the docs:

Whitespace around the variable name and immediately after the ‘=’ is ignored.

Sign up to request clarification or add additional context in comments.

Comments

3

Just FYI, although VARIABLE := value is the same as VARIABLE:=value, but

VARIABLE:=$(undefined) value
# now VARIABLE is prepended with a space

is NOT. This is why the make's manual says "ignored immediately after equal sign".

Also, operator += always adds a space.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.