help-make
[Top][All Lists]
Advanced

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

$i not working in $(word n, list)


From: baumann Pan
Subject: $i not working in $(word n, list)
Date: Tue, 15 Nov 2011 09:44:02 +0800

Hi,

I want to use $(word ) and $(words) function to do sth.


Makefile:
all:
    for (( i=0 ; i <= $(words a b c d e f) ; ++i )) ; do echo $$i ;
echo $(word $$i, a b c d e f) ; done;

the output is:
makefile:2: *** non-numeric first argument to `word' function: '$i'.  Stop.




what's wrong with the line 2? Thanks!



reply via email to

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