I have a project with a directory structure like this:
╷ /
├ Makefile
├┐ dir1/
│├ foo.in
│└ foo.out
├┐ dir2/
┊┊
and the Makefile contains rules for all file in the project, e.g.
dir1/%.out: dir1/%.in
gen_out $< $@
If I am in the top level directory, I can run make dir1/foo.out just fine.
The question is: What is the most elegant way that calling make foo.out inside dir1 has the same effect?