help-make
[Top][All Lists]
Advanced

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

Re: command line limitation


From: Maxim Yegorushkin
Subject: Re: command line limitation
Date: Fri, 14 Jul 2006 11:29:08 +0100
User-agent: Thunderbird 1.5 (Windows/20051201)

ma wrote:
"Maxim Yegorushkin" <address@hidden> wrote in message news:address@hidden
ma wrote:

I have a make file that is automatically generated. It that makefile, I have a variable that is very long. It is around 88K long. When I am trying to pass it to any function (ar for example), the operating system complains that the command line is too long. The other way is to put this variable in a text file and call ar in this way:

ar @a.txt

The problem is I don't know how I can write this variable into a file? I can't use something such as echo $(Long_Var) >a.txt since then the command line to echo is too long. Is there any way that I can do in gmake? Is there any function in gmake that help to write a variable into a file?
You could output the variable word by word to a file:

words = a b c d
foo :
        @for w in $(words); do echo -n "$$w " >> $@; done

And then feed the words from the file to ar as command line arguments using xarg utility.

Thanks Maxim,

    It is a very nice trick.

I wrote a batch file as follow and it was working well:

Jens Schweikhardt replied that it still suffers from the very same problem, that's why it does not work with that many words in your makefile.





reply via email to

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