Skip to content

Bugfix: comments in variables values create spaces#225

Merged
straight-shoota merged 2 commits intocrystal-lang:masterfrom
beta-ziliani:bug/docker/Makefile
Mar 1, 2023
Merged

Bugfix: comments in variables values create spaces#225
straight-shoota merged 2 commits intocrystal-lang:masterfrom
beta-ziliani:bug/docker/Makefile

Conversation

@beta-ziliani
Copy link
Member

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.

Co-authored-by: Johannes Müller <straightshoota@gmail.com>
@straight-shoota straight-shoota merged commit 5ec78a9 into crystal-lang:master Mar 1, 2023
straight-shoota added a commit to crystal-lang/crystal that referenced this pull request Mar 11, 2023
Updates `distribution-scripts` dependency to crystal-lang/distribution-scripts@4c0cb48

This includes the following changes:

* Update linux build to LLVM 15
* crystal-lang/distribution-scripts#227)
* crystal-lang/distribution-scripts#225)
straight-shoota added a commit to crystal-lang/crystal that referenced this pull request Mar 22, 2023
straight-shoota added a commit to crystal-lang/crystal that referenced this pull request Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants