This package strives to provide clean and easy to understand functions, as well as a transient menu, to build projects of various build systems.
Supported build systems:
- Bazel
- Make
- CMake
- Cargo
- Meson + Ninja
- NPM
build.el provides interactive build commands for each build system. Build commands are prefixed by the name of the build system:
Build system | Prefix |
---|---|
CMake | build-cmake- |
Bazel | build-bazel- |
Make | build-make- |
Cargo | build-cargo- |
Meson+Ninja | build-meson-, build-ninja- |
NPM | build-npm- |
Each build system exposes different amounts of functions, depending on the capability of the build system.
Though in general, where-ever possible, build.el will try to auto-complete possible targets given the context for you.
Make
, only has build-make-run
, which will prompt you for a target that
should be ran, the targets are auto-completed from the Makefile itself.
Bazel
, on the other hand, has build-bazel-run
, build-bazel-test
, and
build-bazel-build
. Running any of the commands will trigger a
completing-read
auto suggestion with matching targets.
CMake
has build-cmake-build
and build-cmake-generate
.
Meson
has build-meson-setup
, compilation is done via build-ninja-build
.
NPM
has build-npm-run
, build-npm-install
and build-npm-uninstall
.
run
, and uninstall
will be autocompleted from the package.json
in the project root.
In general, each build system has it’s own transient menu, these are always
called build-<system>-transient
. Though you will probably want to use
build-menu
, which will try to infer the build system of the current
project and show that instead.
![](https://private-user-images.githubusercontent.com/72092018/368104159-4fd17387-24af-47a2-92a1-2cf7065c73eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjEwMTUsIm5iZiI6MTczOTM2MDcxNSwicGF0aCI6Ii83MjA5MjAxOC8zNjgxMDQxNTktNGZkMTczODctMjRhZi00N2EyLTkyYTEtMmNmNzA2NWM3M2ViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDExNDUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU3NWUzZDFkM2YzMDJhZjUyMTU2NWM4ZThjYzI5OWY4MzAxYjQ5MmQ5YjkyYTc2NGMzY2JiOWQ1ZjdiZjAzMWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yTOLi-WAJ4OwK3IxOd8Ke8vRY5T005kXPWoGacMrfHk)
![](https://private-user-images.githubusercontent.com/72092018/368104167-9f4a4a7b-c925-4e3d-9acb-45c833a7c7ab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjEwMTUsIm5iZiI6MTczOTM2MDcxNSwicGF0aCI6Ii83MjA5MjAxOC8zNjgxMDQxNjctOWY0YTRhN2ItYzkyNS00ZTNkLTlhY2ItNDVjODMzYTdjN2FiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDExNDUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE0ODA0N2M1NWY5YzhmOTY2OTljYzc3ZGVmYjQ4NGJlNWIzMTBiZDlmNjZkODJkNDlkMjdjMGIxNTk4OTU0NGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.idJRDKiOf9qqKc_2xCB1ND6RN0fNKwj_bEi1aQdkR7E)
![](https://private-user-images.githubusercontent.com/72092018/368104170-86409bc6-274e-493a-8950-f880d8bf4822.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjEwMTUsIm5iZiI6MTczOTM2MDcxNSwicGF0aCI6Ii83MjA5MjAxOC8zNjgxMDQxNzAtODY0MDliYzYtMjc0ZS00OTNhLTg5NTAtZjg4MGQ4YmY0ODIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDExNDUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI0OGJiZTBjZjYyOGFiMGI0ZWNjNGE1Mzc1NmY0YzhjNjI4M2I1YjFmMmFiMDNjN2I1OTQzMTJhNmU1NjczZWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Ec25Ow6k9n16kdBEr8RaIqQyCf-335EyKUlGSE8Lwpk)
![](https://private-user-images.githubusercontent.com/72092018/368238865-5de4ec37-6334-4788-9bc8-92cf06666c91.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjEwMTUsIm5iZiI6MTczOTM2MDcxNSwicGF0aCI6Ii83MjA5MjAxOC8zNjgyMzg4NjUtNWRlNGVjMzctNjMzNC00Nzg4LTliYzgtOTJjZjA2NjY2YzkxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDExNDUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThmMjAxNTZkMzNiMjYwMjQ0OTYzOTgwOGZjMGYyMzYzMTgwNTc5MzlkNDJmYTVmZmU4YTI0YmY0ODIzY2RlNWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.o0gI1svbRvE8yggOnk2C7LITpKT7JgV4FAXjZPVLsAM)
![](https://private-user-images.githubusercontent.com/72092018/368238429-08e9c25a-d1f9-4115-b7f7-cf70fc1b8b21.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjEwMTUsIm5iZiI6MTczOTM2MDcxNSwicGF0aCI6Ii83MjA5MjAxOC8zNjgyMzg0MjktMDhlOWMyNWEtZDFmOS00MTE1LWI3ZjctY2Y3MGZjMWI4YjIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDExNDUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY4YTlkMmM3M2VkNzc5ZGFkNzU0ZjY4ZTJjNmIwNmI4NDZjZmYyMzllNTgyOWZkZDc4ZDIyOGQxN2M5ZTFkN2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.N5qY-7mo8eMUTlEHRIcddGgln4ofFzVfbJx3ovRzXtw)
![](https://private-user-images.githubusercontent.com/72092018/368675478-bd46f6eb-6c67-42a8-89da-853b710547b5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjEwMTUsIm5iZiI6MTczOTM2MDcxNSwicGF0aCI6Ii83MjA5MjAxOC8zNjg2NzU0NzgtYmQ0NmY2ZWItNmM2Ny00MmE4LTg5ZGEtODUzYjcxMDU0N2I1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDExNDUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMzNTRmYjNkMzRjN2VmNThhMjI2ZWI4MjIxNzA0MzgwNGI4NDMxNTBlMWE4ZWVjZGY0NDk2MmRmZGU1OTFlZTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.AS6x_tV5ZBE2a_-H_PFWhjw4MMN1FgDjvkc2cpxjqrY)
Clone the repository:
git clone https://github.com/27justin/build.el ~/.emacs.d/site-lisp/build.el
Add it to your load path
(add-to-list 'load-path "~/.emacs.d/site-lisp/build.el")
(use-package build)
Done.