Skip to content

AMUSE fails to build from tarball on pre-4.3 GNU Make #1188

@LourensVeen

Description

@LourensVeen

Describe the bug
AMUSE (specifically amuse-framework) fails to build when building from a tarball and using GNU Make <4.3:

support/shared/version.mk:4: *** unterminated call to function 'shell': missing ')'.  Stop.

That line contains:

    AMUSE_VERSION := $(shell grep -v '^#' ../../VERSION)

The GNU Make 4.3 release notes say:

WARNING: Backward-incompatibility!
Number signs (#) appearing inside a macro reference or function invocation
no longer introduce comments and should not be escaped with backslashes:
thus a call such as:
foo := $(shell echo '#')
is legal. Previously the number sign needed to be escaped, for example:
foo := $(shell echo '#')
Now this latter will resolve to "#". If you want to write makefiles
portable to both versions, assign the number sign to a variable:
H := #
foo := $(shell echo '$H')
This was claimed to be fixed in 3.81, but wasn't, for some reason.
To detect this change search for 'nocomment' in the .FEATURES variable.

So it seems that the # on that line is the culprit.

  • Try to reproduce with GNU Make 4.2.1 or older
  • Apply the above fix and test with both older and newer GNU Make

Thanks to @cournoyercloutierc for the report!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Bug

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions