It's better to write a note in the installation handbook and in make.conf.5 stating that make.conf is not a bash file. Infact multiline definitions of variables are not supported. Read my discussion with Aaron in the bug #100373 Reproducible: Always Steps to Reproduce: 1. 2. 3.
I don't see the point of this in the installation handbook. Re-assigning to the portage team to fix man make.conf if they see it fit to do so. This kind of info is way too advanced for the handbook IMHO, as far as the docs go, this is a WONTFIX.
I read in the handbook this note about the format of make.conf: << As you probably noticed, the make.conf.example file is structured in a generic way: commented lines start with "#", other lines define variables using the VARIABLE="content" syntax. The make.conf file uses the same syntax. >> The reader can think that variable definitions are like those ones of a bash file
It's bash compatible (it can be parsed by bash), so such a statement would be incorrect (how do you define a "bash file"?) Multiline vars are supported in make.conf.
we should make a note that having multiple CFLAGS or CXXFLAGS or such will break many packages though
Any test case? I don't see how packages could be broken by this as bash/shlex should collapse it back into single-line vars, so packages would never see a difference, no?
most configure scripts will blow up with newlines in CFLAGS # CFLAGS='-pipe -Os'$'\n''-Wall' emerge sed <snip> configure: creating ./config.status config.status: creating bootstrap.sh sed: file ./confstatxsZ7xZ/subs-2.sed line 9: unterminated `s' command config.status: creating Makefile sed: file ./confstatxsZ7xZ/subs-2.sed line 9: unterminated `s' command <snip> make: *** No targets. Stop. !!! ERROR: sys-apps/sed-4.1.4 failed. !!! Function src_compile, Line 62, Exitcode 2 !!! build failed
Ahhh this is relevant from the standpoint of bug 101416
re comment 6: yes, on the command line - but portage_util.varexpand strips them from make.conf.