From 2d24c15ad460e731c6128033e46266f8401d1295 Mon Sep 17 00:00:00 2001 From: Jon Palmisciano Date: Sun, 25 Dec 2022 14:41:08 -0500 Subject: [PATCH] Add draft of README, docs, and license --- LICENSE.txt | 26 +++++++++++++++++++++ README.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ docs/sample.toml | 6 +++++ pyproject.toml | 3 +++ 4 files changed, 95 insertions(+) create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 docs/sample.toml diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..7f6966c --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,26 @@ +Copyright (c) 2022 Jon Palmisciano + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..0ac5206 --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +# Emake + +Emake is an easy wrapper around CMake's CLI. It is meant to speed up the process +of configuring and building a CMake-based project from the command line. It +provides a user experience that smells vaguely like Autotools. + +## Tutorial + +> A small tour of Emake is offered below; see `emake -h` and `econf -h` for comprehensive help. + +In most cases, all you need to do to configure and build a project is simply run +`emake` by itself: + +```sh +emake # Configure project (if needed), then build +``` + +> For simple projects, this will work 99% of the time. + +If you wish to build a specific target, you may specify its name: + +```sh +emake test # Configure project (if needed), then build the `test` target +``` + +Sometimes you'll need to pass more arguments to CMake's configure step, as is +usual with larger, more complex projects. A project can be configured +(without building) using the `econf` tool. Once again, in the most simple case, +simply run `econf` by itself: + +```sh +econf # Configure the project (if needed) +``` + +Additional arguments can be passed through to CMake as follows: + +```sh +econf -- -DCMAKE_BUILD_TYPE=Release +``` + +### Settings + +Configuration and build settings can also be sourced from `emake.toml` in the +current working directory. + +```toml +[configure] +generator = "Ninja" +``` + +Running `econf` with the following `emake.toml` present will cause Ninja to be +used as the CMake generator by default. For a full sample configuration, see +[`sample.toml`](docs/sample.toml). + +## License + +Copyright © 2022 Jon Palmisciano. All rights reserved. + +Use of this source code is governed by the BSD 3-Clause license; a full copy of +the license can be found in the [LICENSE.txt](LICENSE.txt) file. diff --git a/docs/sample.toml b/docs/sample.toml new file mode 100644 index 0000000..a229fd6 --- /dev/null +++ b/docs/sample.toml @@ -0,0 +1,6 @@ +[configure] +args = ["-DFOO=1", "-DBAR=0"] +generator = "Ninja" + +[build] +jobs = 6 diff --git a/pyproject.toml b/pyproject.toml index 202e4e6..be5a9c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,9 @@ name = "emake" version = "0.1.0" description = "Easy wrapper around CMake's CLI" authors = ["Jon Palmisciano "] +readme = "README.md" +license = "BSD-3-Clause" +repository = "https://github.com/jonpalmisc/emake" [tool.poetry.scripts] emake = "emake.cli.emake:main"