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

[WIP] Makefile dependency generation #5433

Draft
wants to merge 15 commits into
base: development
Choose a base branch
from

Conversation

bensze01
Copy link
Contributor

Status

WIP

@bensze01 bensze01 added needs-work needs-ci Needs to pass CI tests labels Jan 13, 2022
@@ -590,7 +590,7 @@ pre_setup_keep_going () {
case "$1" in
"msg "*) false;;
"cd "*) false;;
*make*[\ /]tests*) false;; # make tests, make CFLAGS=-I../tests, ...
*make*[\ /]tests*) false;; # make tests, make CFLAGS=-Itests, ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid that if we need to make this change in our scripts, it likely means some users will have to make similar changes, and so this breaks backward compatibility.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle, I like that everything is done from the toplevel directory. I'm just worried that we can't do it.

I think we can preserve backward compatibility at the cost of adding a lot of cd commands.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, Ok. I think I know how I could emulate this behaviour, If we want to keep maximum backwards compatibility.

Copy link
Contributor Author

@bensze01 bensze01 Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, the current behaviour of our Makefiles with regards to CFLAGS, etc. is very unintuitive, if you use relative paths.

CFLAGS=-Ifoo means library/foo for the files in the library and 3rdparty/everest directories, while it means programs/foo in the programs directory, tests/foo in the tests directory and tests/fuzz/foo in the tests/fuzz/foo directory.

It would be much more sane for everything to be relative to the toplevel directory. I would expect that users have to work around this already by using absolute paths if they build anything outside the files under library.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Granted, most users probably do only care about things under library

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the cd commands needed to emulate the old behaviour.

@bensze01 bensze01 force-pushed the make_dependency_generation branch 8 times, most recently from a4200a1 to 9c25d29 Compare February 3, 2022 15:24
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
The value of MAKEFILE_LIST will change after the next include,
so evaluate the expression immediately.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
@bensze01 bensze01 force-pushed the make_dependency_generation branch 2 times, most recently from e6eb052 to 4132968 Compare February 10, 2022 06:44
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
@bensze01 bensze01 force-pushed the make_dependency_generation branch 2 times, most recently from c09d335 to 3fa972f Compare February 11, 2022 11:05
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
@tom-daubney-arm tom-daubney-arm added the historical-reviewed Reviewed & agreed to keep legacy PR/issue label Jun 2, 2023
@tom-daubney-arm
Copy link
Contributor

We are now converting older PRs to draft PRs where the following conditions are met: They have not been updated in the last 3 months, and they need more than non-trivial work to complete.

@tom-daubney-arm tom-daubney-arm marked this pull request as draft June 2, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
historical-reviewed Reviewed & agreed to keep legacy PR/issue needs-ci Needs to pass CI tests needs-work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants