URL: <https://savannah.gnu.org/bugs/?59154>
Summary: Multiline environment variables handled poorly Project: make Submitted by: dankegel Submitted on: Mon 21 Sep 2020 02:58:39 PM UTC Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 4.2.1 Operating System: Any Fixed Release: None Triage Status: None _______________________________________________________ Details: I accidentally used a multiline envrionment variable thusly: $ export PUB="$(base64 < ~/.ssh/id_rsa.pub)" $ cat Makefile foo: echo PUB is "$(PUB)" This worked fine on mac where base64 defaults to not wrapping there. But on Linux where base64 defaults to wrapping, this explored multiline variable values. With gnu make, it fails with /bin/sh: 1: Syntax error: unterminated quoted string With bsd make, it succeeds. The shell is happy to handle multiline environment variables. Given that, IMHO, Makefiles that contain properly quoted shell references to an environment variable ought to continue working even if that environment variable happens to contain a multiline value. One other implementation gets it right, so it seems reasonable to enhance gnu make to handle this case as well. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?59154> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/