b96e03dde1
This adds a dependency on $(OBJDIR) for every rule that creates a file inside $(OBJDIR) but does not already depend on any file within $(OBJDIR). All other dependencies on $(OBJDIR) are removed. These dependencies are added after a | to tell make that this is a "order-only prerequisite". This means that the file inside $(OBJDIR) needs $(OBJDIR) to be present but if $(OBJDIR) changes (which happens whenever a file _inside_ the directory is touched!), there is no need to recompile the file within $(OBJDIR). Implementing this using a generic implicit rule like: $(OBJDIR)/%: | $(OBJDIR) doesn't work, since make doesn't merge the prerequisites of multiple implicit rules like it does for explicit rules. We could use $(LOCAL_OBJS) and friends to create explicit rules to do something like the above, but just adding the dependencies on all rules seems more explicit and future-proof. |
||
---|---|---|
.. | ||
Arduino.mk | ||
licence.txt |