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

Makefile: download libbpf submodule when not found #44

Merged
merged 1 commit into from
Jul 27, 2021

Conversation

geyslan
Copy link
Member

@geyslan geyslan commented Jul 27, 2021

Making contribution easier.

@rafaeldtinoco
Copy link
Contributor

This way an offline build would fail, wouldn't it ? Sometimes we may need to rsync the git tree to an offline node to test building, for example. Maybe to check if directory is empty and then try to update it ?

Not sure about the submodule managing by Makefile also, @grantseltzer what is your take on this ?

@geyslan
Copy link
Member Author

geyslan commented Jul 27, 2021

Maybe to check if directory is empty and then try to update it ?

The rule already does something like that since LIBBPF_SRC = $(abspath ./libbpf/src). So the rule only runs if ./libbpf/src doesn't exist.

$(LIBBPF_SRC):
ifeq ($(wildcard $@), )
	echo "INFO: updating submodule 'libbpf'"
	$(GIT) submodule update --init --recursive
endif

@rafaeldtinoco
Copy link
Contributor

ifeq ($(wildcard $@), )

Sorry, missed that. Okay then, I'm ok with this.

Copy link
Contributor

@grantseltzer grantseltzer left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks so much @geyslan !

@grantseltzer grantseltzer merged commit 00b656d into aquasecurity:main Jul 27, 2021
@geyslan geyslan deleted the makefile-submodule branch September 12, 2021 12:18
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.

3 participants