Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

makefile question

Status
Not open for further replies.

tonykent

IS-IT--Management
Jun 13, 2002
251
GB
Can anyone tell me why this gmake makefile works:
Code:
LIST1 := `ls`

# inside a rule: first line starts with a TAB, all the rest are spaces
all: 
	@for x in `ls`;    do         echo $$x ;      done

outputs:
check.txt
inc.mk
makefile
subdir

but when I try to replace the 'ls' command with the variable $LIST1 like this:

Code:
LIST1 := `ls`

# inside a rule: first line starts with a TAB, all the rest are spaces
all: 
	@for x in $$LIST1;    do         echo $$x ;      done

I get no output?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top