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

Check for variables that must defined in ci.mk #37

Merged
merged 2 commits into from
Feb 16, 2023

Conversation

josecm
Copy link
Member

@josecm josecm commented Jan 19, 2023

PR Description

As pointed out in #32, certain variables such as 'cc' must be defined by the Makefile that instantiates certain CI rules. There was no measure put in place to check that these variables were indeed defined. This PR introduces these checks by:

  • Creating an utility function that checks if the argument variable is defined;
  • Adding the check for the 'root_dir' variable which must be defined before ci.mk is included;
  • Adding the check for the 'cc' variable that must be defined when the 'cppcheck' rules are instantiated.

This commits introduces the 'util.mk' makefile meant as a repository for
utility defintions.

Initially the only utility defined is 'check_variable_defined' to
provide a standard way for makefiles to check if a variable is defined.

Signed-off-by: Jose Martins <josemartins90@gmail.com>
@josecm
Copy link
Member Author

josecm commented Jan 19, 2023

@DavidMCerdeira could you verify this fixes #32?

@josecm josecm force-pushed the fix/check_defined_make_variables branch from 9600261 to dcf3b8a Compare January 20, 2023 13:57
miguelafsilva5
miguelafsilva5 previously approved these changes Jan 20, 2023
ci.mk Show resolved Hide resolved
@josecm
Copy link
Member Author

josecm commented Feb 13, 2023

@miguelafsilva5 @AfonsoSantos96 anything holding up this PR?

@miguelafsilva5
Copy link
Member

miguelafsilva5 commented Feb 13, 2023

@josecm, @DavidMCerdeira seems to be having issues with this PR. Check his message above.

Certain variables must be defined before including 'ci.mk' or
instantiating some of its rules. This commits adds checks for two of
them 'root_dir' that should contain the repositories root directory
where the ci repo is located, and 'cc' which defines the compiler to be
used.

Signed-off-by: Jose Martins <josemartins90@gmail.com>
@josecm
Copy link
Member Author

josecm commented Feb 13, 2023

@josecm, @DavidMCerdeira seems to be having issues with this PR. Check his message above.

@DavidMCerdeira I believe this was fixed in the last commit.

@miguelafsilva5 miguelafsilva5 self-assigned this Feb 16, 2023
@miguelafsilva5 miguelafsilva5 merged commit aea7492 into main Feb 16, 2023
@miguelafsilva5 miguelafsilva5 deleted the fix/check_defined_make_variables branch February 16, 2023 10:44
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.

None yet

4 participants