Dear all,

I have a problem with using for loop within makefile :(
I am triying to generate a variable size file filled up with dummy data:

forloop = $(shell for (( id=$(1) ; id>$(2) ; id-- )); do printf '\xff' >>
reserved.bin; done)

reserved.bin:
    @echo .. Creating $@ file ...
    $(shell echo -n > reserved.bin)
    $(call forloop, 10, 0)

The result of that is as follow:
    Syntax error: Bad for loop variable
    gmake: *** [reserved.bin] Error 2

I tired to use following command
    for (( id=10 ; id>0 ; id-- )); do printf '\xff' >> reserved.bin; done
directly from bash and it works.

Could you answer where is a mistake?

Best regards
--------------------------------------------------------------
Mariusz Janczak
--------------------------------------------------------------



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to