Skip to content

Instantly share code, notes, and snippets.

@hannestyden
Last active May 3, 2021 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hannestyden/1879e7a0d926599f54049b00bc903de9 to your computer and use it in GitHub Desktop.
Save hannestyden/1879e7a0d926599f54049b00bc903de9 to your computer and use it in GitHub Desktop.
Significant trailing whitespace in GNU Make
# GNU Make 4.1
# the next line has no trailing whitespace
A=a
B=a# no whitespace before the comment
C=a # some whitespace before the comment
# the next line has some trailing whitespace
D=a
default:
[ "$(A)" = "$(B)" ] && echo ok || echo ko # => ok
[ "$(A)" = "$(C)" ] && echo ok || echo ko # => ko
[ "$(A)" = "$(D)" ] && echo ok || echo ko # => ko
[ "$(C)" = "$(D)" ] && echo ok || echo ko # => ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment