crystal-lang / distribution-scripts

40 stars 24 forks source link

Bugfix: comments in variables values create spaces #225

Closed beta-ziliani closed 1 year ago

beta-ziliani commented 1 year ago

In a Makefile a line of the sort VAR = VAL ## comment makes VAR have VAL (note the space). This is documented in the GNU man of make.

Conversely, if you do not want any whitespace characters at the end of your variable value, you must remember not to put a random comment on the end of the line after some whitespace, such as this:

dir := /foo/bar # directory to put the frobs in

Here the value of the variable dir is ‘/foo/bar ’ (with four trailing spaces), which was probably not the intention.