Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35531 )
Change subject: Makefile: Create the build directory before bootblock.bin ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35531/3/Makefile.inc File Makefile.inc:
https://review.coreboot.org/c/coreboot/+/35531/3/Makefile.inc@507 PS3, Line 507: build-dirs $(objcbfs) $(objgenerated):
Why have a phoney target when we can have real targets doing what Makefiles are supposed to do?
I don't know, I didn't put it there. I just think we should be consistent rather than having different rules to do the same thing all mixed together.
I think the phony target was created originally to decouple the dependencies of files to their directories: if you have foo/bar.o depend on foo/, any change to foo/* will update foo's timestamp.
AFAIK phony targets are always considered "out of date", so they (and anything depending on them) will always be rebuilt. So I don't think this example works like that (if foo is phony and foo/bar.o depends on foo, it will always be rebuilt). If you want to do that (make sure directory exists but don't imply dependency), you can use an order-only prerequisite instead (and then it doesn't matter whether it's phony or not).