2 Commits

Author SHA1 Message Date
Steffen Eiden
e6add997eb Integrate rust into s390-tools build system
The rust integration into the s390-tools build system consists of the
following steps:

- Add a subdirectory for the rust code.
- Add a Makefile that forwards rust builds to `cargo`.
- Add a `utils` crate for rust code in s390-tools.
- Add rust stuff for dotfiles:
  - gitignore
  - editorconfig
  - codespellrc (while at it, add an ignore file)

With cargo the rust ecosystem has its own build system which also is
responsible to resolve rust dependencies via downloading the dependencies
from (default) crates.io and discover the source files. Therefore, the
Makefile just calls `cargo build` to forward the build to cargo.

If a rust crate does not require external dependencies, users might call
rustc directly.

A simple `make` will build all the rust targets as well (with --release
specified). Also `make install` will work as usual.

A few Makefile configuration variables are introduced for rust/Cargo:
  - HAVE_CARGO (default 1) to toggle the build of rust code using cargo
  - CARGOFLAGS             to add custom cargo flags, e.g. --offline
  - CARGO		   Cargo binary location defaults to
                           $(where cargo)

A new global make target is defined to get the current s390-tools
version:
$ make version
  2.28.0

rust/Makefile also has the `print-rust-targets`  target to print all rust
directories/crates that should be shipped/installed.

Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2023-08-04 11:40:46 +02:00
Marc Hartmayer
b3551f50a8 Provide codespell configuration
While at it, add a list with words to ignore. This suppresses the following codespell finding:

$ codespell libcpumf/libcpumf_cpuset.c
libcpumf/libcpumf_cpuset.c:15: parm ==> param, pram, parma
libcpumf/libcpumf_cpuset.c:17: parm ==> param, pram, parma

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2022-11-03 17:38:53 +01:00