help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to debug my Makefile


From: Paul Smith
Subject: Re: How to debug my Makefile
Date: Fri, 20 Jul 2018 13:43:15 -0400

On Fri, 2018-07-20 at 13:27 -0400, Stefan Monnier wrote:
> How could I generate an output file via a Make rule when the desired
> content of the file is in a Make variable that's too big for the
> command line?

If you are using GNU make 4.0 or better you can use the $(file ...)
function to write to a file (there is no limit, other than memory, to
the size of a variable in GNU make and so no limit to the amount of
content you can add to a file with the $(file ...) function), then
invoke a shell script on that file instead of using "echo ...".

https://www.gnu.org/software/make/manual/html_node/File-Function.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]