-
Notifications
You must be signed in to change notification settings - Fork 66
make: build virtme-ng-init by default #200
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
Conversation
Are you referring to the use of I'm not really sure what problem this PR is solving but this description is misleading. Please consider describing the true motivation. |
As mentioned in the README file, the 'make' command should only build virtme-ng-init. Building is what 'make' usually does, and not installing stuff. Since commit 85a9b42 ("Make it build on macOS"), 'make' was building virtme-ng-init, but it was also trying to install it with other files elsewhere on the system, what 'make install' does. That's because make was using the first target as the default one, so the 'install' one. Instead of directly calling 'cargo' like it was the case before, the 'build' part of setup.py is called. This will generate files in the build dir that are probably not needed, but it is quick, and it will also build virtme-ng-init properly, what we want. While at it: - Mention all targets that are not linked to files in .PHONY. - Only generate the init file when needed: when the .rs files have been modified. - Initialise the submodule if the .rs files are not present. - A new 'clean' target can help to force rebuilding (or just to clean, even if it looks like it missed many generated files...). Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Thanks, I just updated the description: we don't want
Is it clearer? |
Note: I used |
We could detect python3 || python, but I wouldn't over-complicate things here, running python3 setup.py build seems good enough. |
Thanks for clarifying. |
Good point. We can indeed change that later. Are there still some distributions not having a |
Not that I'm aware of, I think all the recent distro have python3. |
As mentioned in the README file, the
make
command should only buildvirtme-ng-init
. Building is whatmake
usually does, and not installing stuff.Since commit 85a9b42 ("Make it build on macOS"),
make
was buildingvirtme-ng-init
, but it was also trying to install it with other files elsewhere on the system, whatmake install
does. That's becausemake
was using the first target as the default one, so theinstall
one.Instead of directly calling
cargo
like it was the case before, thebuild
part ofsetup.py
is called. This will generate files in the build dir that are probably not needed, but it is quick, and it will also buildvirtme-ng-init
properly, what we want. Cc: @tamird.While at it:
Mention all targets that are not linked to files in
.PHONY
.Only generate the init file when needed: when the
.rs
files have been modified.Initialise the submodule if the
.rs
files are not present.A new
clean
target can help to force rebuilding (or just to clean, even if it looks like it missed many generated files...).