Home

Awesome

cargo-make-tasks

Release license

Reusable makefiles for cargo-make.

<a name="overview"></a>

Overview

The cargo-make-tasks repository contains makefiles with tasks specific for a programing language or environment.<br> While cargo-make comes with many built in tasks, those are either generic tasks (such as git actions) or specific for rust (such as cargo actions).<br> However, this repository aims to provide additional tasks that can be used as is for projects that have different requirements.

<a name="usage"></a>

The following example Makefile.toml does the following:

# Include the requested makefile (in this example, cmake.toml) and optionally also
# other generic makefiles from cargo-make directly.
extend = [
  { path = "./target/cargo-make/build-file.toml" },
  { path = "./target/cargo-make/git.toml" },
  { path = "./target/cargo-make/github.toml" },
  { path = "./target/cargo-make/toml.toml" },
  { path = "./target/cargo-make/cmake.toml" }
]

[config]
load_script = '''
#!@duckscript
# setup directory for external makefiles
mkdir ./target/cargo-make

# load the makefile from the cargo-make-tasks repository (in this example, cmake.toml)
file = set cmake
file_path = set ./target/cargo-make/${file}.toml
if not is_file ${file_path}
  content = http_client --method GET https://raw.githubusercontent.com/sagiegurari/cargo-make-tasks/master/src/${file}.toml
  writefile ${file_path} ${content}
end

# Optionally, load additional generic makefiles from cargo-make repository
files = array build-file git github toml
for file in ${files}
  file_path = set ./target/cargo-make/${file}.toml
  if not is_file ${file_path}
    content = http_client --method GET https://raw.githubusercontent.com/sagiegurari/cargo-make/master/src/lib/descriptor/makefiles/${file}.toml
    writefile ${file_path} ${content}
  end
end
release ${files}
'''

Contributing

See contributing guide

<a name="history"></a>

Release History

See Changelog

<a name="license"></a>

License

Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.