Subject: bug#75940: closed (Re: bug#75940: GNU Automake will generate corrupt Makefile if variable containing line breaks.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 24 Feb 2025 17:04:02 +0000

Your bug report

#75940: GNU Automake will generate corrupt Makefile if variable containing line breaks.

which was filed against the automake package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
75940: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75940
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#75940: GNU Automake will generate corrupt Makefile if variable containing line breaks.
From: Karl Berry <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Mon, 24 Feb 2025 10:02:42 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

I'm going to close this for lack of any apparent way forward, but feel
free to reply/reopen or open a new issue if desired. --thanks, karl.

Subject: GNU Automake will generate corrupt Makefile if variable containing line breaks.
From: 陈 溢飞 <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 30 Jan 2025 02:25:20 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

GNU Automake will generate a broken Makefile when configuring if some variables containing line
breaks.

If variable A is defined as:

```autoconf
A=$(cat a.txt)`
AC_SUBST([A])
```

And `a.txt` contains:

```text
line 1
  line 2
```

Then the generated `Makefile.in` will contain:

```makefile
A=@A@
```

And the generated `Makefile` will contain:

```makefile
A=line 1
  line 2
```

When configuring, `config.status` will report:

```text
config.status: executing depfiles commands
config.status: error: in '/workspaces/a':
config.status: error: Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  If GNU make was not used, consider
    re-running the configure script with MAKE="gmake" (or whatever is
    necessary).  You can also try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See 'config.log' for more details
```

`config.log`:

```text
config.status:1191: executing depfiles commands
config.status:1268: cd srclib       && sed -e '/# am--include-marker/d' Makefile         | make -f - am--depfiles
/tmp/GmXRgxDy:359: *** missing separator.  Stop.
config.status:1273: $? = 2
config.status:1277: error: in '/workspaces/a':
config.status:1279: error: Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  If GNU make was not used, consider
    re-running the configure script with MAKE="gmake" (or whatever is
    necessary).  You can also try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See 'config.log' for more details
```

Thanks,