%% "Mariusz Janczak" <[EMAIL PROTECTED]> writes: mj> I have a problem with using for loop within makefile :( I am mj> triying to generate a variable size file filled up with dummy mj> data:
mj> forloop = $(shell for (( id=$(1) ; id>$(2) ; id-- )); do printf '\xff' >> mj> reserved.bin; done) mj> reserved.bin: mj> @echo .. Creating $@ file ... mj> $(shell echo -n > reserved.bin) mj> $(call forloop, 10, 0) I don't understand why you're using $(shell ...) in a command script like this. A command script is PASSED to the shell; that's what those lines do. Why not just write them directly? You don't need $(shell ...) here. Anyway, your problem is that make does not invoke your shell, whatever that might be, when it runs commands: that would be a disaster. Make always invokes /bin/sh, unless you override it by setting the SHELL make environment variable. /bin/sh is typically a POSIX shell, and it doesn't support the enhancements that bash implements beyond POSIX. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
