Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds makefiles include directory to recursive make invocations #37

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

1 participant