Skip to content

Conversation

@dbosk
Copy link
Owner

@dbosk dbosk commented Jan 19, 2018

Whenever we call MAKE in subdir.mk we will add -I ${INCLUDE_MAKEFILES}. This allows us to have makefiles in the subdirectories which have not set INCLUDE_MAKEFILES (e.g. old MIUN makefiles).

dbosk added 3 commits January 11, 2018 11:04
We want to propagate the INCLUDE_MAKEFILES so that we only have to
modify the root Makefile in an old (MIUN) repo.
@dbosk
Copy link
Owner Author

dbosk commented Jan 22, 2019

Maybe this would be nice to have in general? E.g.

../%:
    ${MAKE} -I ${INCLUDE_MAKEFILES} -C $(dir $@) $(notdir $@)

might work. Or more generally

%:
    [ -z "$(dir $@)" ] && ${MAKE} -I ${INCLUDE_MAKEFILES} -C $(dir $@) $(notdir $@)

However, the latter must be placed at the very end of all includes, which is difficult to ensure in an include.

@dbosk
Copy link
Owner Author

dbosk commented Jan 22, 2019

A better solution (documented here):

MAKEFLAGS+= -I ${INCLUDE_MAKEFILES}

The question is in which include file to put this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants