Skip to content

replace bashisms in m4/sage_spkg_collect.m4, m4/sage_spkg_enable.m4, build/pkgs/*/spkg-configure.m4, src/bin/sage-env, build/make/Makefile.in #29345

@orlitzky

Description

@orlitzky

Autoconf scripts should be POSIX sh rather than bash, but there are a few bashisms in m4/sage_spkg_collect.m4 and m4/sage_spkg_enable.m4:

  • The quoted newlines $'\n'
  • The use of VAR+=VALUE

Some of these should be straightforward to fix. The format

SAGE_BUILT_PACKAGES+="    $SPKG_NAME \\"$'\n'

can be changed to

SAGE_BUILT_PACKAGES="$SAGE_BUILT_PACKAGES $SPKG_NAME"

since the newline is only used to make the BUILT_PACKAGES rule in the resulting Makefile look nice. Changing them to spaces doesn't change what the rule does. I'm not sure about

SAGE_PACKAGE_VERSIONS+="vers_$SPKG_NAME = $SPKG_VERSION"$'\n

and

SAGE_PACKAGE_DEPENDENCIES+="deps_$SPKG_NAME = $DEPS"$'\n'

though, because those are inserted verbatim into the Makefile as rules, and the newlines probably matter.

Upstream: Fixed upstream, in a later stable release.

CC: @dimpase @mkoeppe @embray @vbraun

Component: build: configure

Author: Michael Orlitzky

Branch: 0e66a0a

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/29345

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions