[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Writing contents of large variable into a file
From: |
daniel.steinmann |
Subject: |
RE: Writing contents of large variable into a file |
Date: |
Mon, 21 Feb 2005 10:04:08 +0100 |
> So imagine that what you want to do is this:
>
> $(shell echo $(TOO_LONG) > long_file)
>
> But can't because you hit a limit in the shell.
Right.
> Like this (in GNU Make 3.80 and above):
>
> write-var-to-file=$(strip $(shell rm -f $1)$(eval __a
> :=)$(foreach
> w,$($2),$(if $(filter $3,$(words $(__a))),$(shell echo -n
> "$(strip
> $(__a)) " >> $1)$(eval __a:=))$(eval __a +=$w))$(shell
> echo $(__a)
> >> $1))
Cool stuff. Unfortunately this does not work on my system (cygwin with GNU Make
3.80).
I will try some more to actually understand what above code does and why it
does not do what it should do.
Thanks for this idea,
Daniel