Make Makefile compatible with GNU Make >= 3.79.1 #2853
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a small change to the Makefile that makes it syntactically compatible with GNU
make
as far back as at least 3.79.1 while remaining forward compatible.I'm interested in this change because some coworkers of mine are working on an R package wrapper, and some of the build tools available in the R package compilation environment — particularly
make
— are really dated. They aren't able to include libsass sources directly in the package (as is required of such things in the R world) without patching it first.I figured it might be useful for other people to build with really old versions of
make
, and it would be nice not to patch it locally. So, I put together this PR.Technical context
The particular reason for this change is that
make
(since 3.8 I think?) supports two kinds of "complex conditionals", or conditional statements withelse
clauses:and
The latter syntax is the one used in libsass's Makefile, but
make
3.79.1 only supports the former.This PR translates instances of of the "new" syntax into the old so that
make
3.79.1 can process the Makefile without any syntax errors.Upside
With the old syntax, libsass is likely to build on a wider variety of old platforms.
Downside
The old syntax is slightly more verbose.
Thanks in advance for considering this change!