From f2cbe8f4f5fbfc73ae8eb08521cd0080f536e626 Mon Sep 17 00:00:00 2001 From: undyamon <148129121+undyamon@users.noreply.github.com> Date: Wed, 29 Nov 2023 23:02:35 +0100 Subject: Add make module (#18) --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 431c8fb..a03c2c1 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Tasks in this plugin are provided by modules that implement functionality for a - [CMake](https://cmake.org) via [cmake-file-api](https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html#codemodel-version-2). - [Cargo](https://doc.rust-lang.org/cargo). +- [GNU Make](https://www.gnu.org/software/make/) You can also write [your own module](#modules-creation-and-configuration). @@ -90,6 +91,31 @@ require('tasks').setup({ Cargo module doesn't have a `target` param which specific to CMake because `cargo run` automatically pick the binary. If there is multiple binaries, you can set which one you want to run using `--bin` or `--project` in step 2 as you do in CLI. +### GNU Make + +1. Open a Make project. +2. Run a Make target `` with `:Task start make `. + +To override targets or add custom `make` options, configure the appropriate task: + +```lua +require('tasks').setup({ + default_params = { + ... + make = { + cmd = 'make', + args = { + all = { '-j10', 'all' }, -- :Task start make all → make -j10 all + build = {}, -- :Task start make build → make + nuke = { 'clean' }, -- :Task start make nuke → make clean + }, + }, + ... + } +}) +``` + + ## Modules creation and configuration To create a module just put a lua file under `lua/tasks/modules` in your configuration or submit your module as a PR. In this module you need to return a table with the following fields: -- cgit v1.2.3