Can a makefile have a directory as a target?
Your makefile should do what you expect. Since yank has no dependency, it won't be remade if it exists. So this looks like a bug in makepp. You could confirm this by trying your makefile with a traditional implementation of make.
In a makefile, is a directory name a phony target or "real" target?
What you need is an order-only prerequisite.
A quick search didn't turn up any reference for makepp and order-only prerequisites, but it may still work.
Yes, a Makefile
can have a directory as target.
Your problem could be that the cd
doesn't do what you want: it does cd
and the git clone
is carried out in the original directory (the one you cd
ed from, not the one you cd
ed to). This is because for every command in the Makefile
an extra shell is created. A workaround is to run cd
and clone as one command with the shell's &&
.
This should work:
bla/f: dir
cd dir && touch f
dir:
mkdir dir