I've makefile which looks like follows
apps = app1 app2 app3
all: dir app1 app2 app3 zip cleanup
Now I want to do some loop on the list of apps
varible,
something like
`loop on apps
endloop`
Is it possible in makefile to loop on it, I need to do loop on apps
varible list
update
lets say this variable(apps
) is generated by my program in the make
file, which provide for each project diffrent values of apps, sometimes its apps= app1 app2
sometimes its apps= app1
and sometimes can be 20 apps or more apps= app1 app2 appN
How can I iterate on apps
varible and do something, for example in each iteration print something like:
now im in `app1`
now im in `app2`
etc
When trying the following
.PHONY: foo
all: foo
APPS = app1 app2 app3 app4
foo : $(APPS)
for $$f in $(APPS); do echo $$f is here; done
I got following error:
make: *** No rule to make target
app1', needed by foo'. Stop.