We are using recursive make in our project. We also use a commercial embedded compiler (diab) with a FlexLM license.
We are currently adding license-borrowing as a dependency on the top-level targets in each directory.
Like this:
.PHONY: target
target: borrow_compiler $(TARGETLIB)
$(RETURN_COMPILER)
.PHONY : borrow_compiler
borrow_compiler:
@$(BORROW_COMPILER) 300
where BORROW_COMPILER
and RETURN_COMPILER
are scripts that acquires the license.
Our problem is that it takes a long time to build after a small change due to the communication with the license server for each recursive sub-directory.
Is there a better way to do this?