bordeaux

Revolutionize the Makefile.

Usage no npm install needed!

<script type="module">
  import bordeaux from 'https://cdn.skypack.dev/bordeaux';
</script>

README

Bordeaux

Stars LoC
Revolutionize the Makefile. View on NPM

Usage

positional arguments:
  operation             What operation are we running? ('build' or 'transpile')

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Show verbose information.
  -f FLAGS [FLAGS ...], --flags FLAGS [FLAGS ...]
                        Flags to pass to Make. (Only used with 'build')
  -t TARGET, --target TARGET
                        Target to build. (Only used with 'build')
  -o OUTFILE, --outfile OUTFILE
                        File to send result to. (Only used with 'transpile')
  -i INPUT, --input INPUT
                        Input JSON / YAML file. (Defaults to 'BordeauxFile')

Example

Let's say we wanted to make a project. We want this project to:

  • use gcc as a compiler
  • print Hello, world! when run
  • use Bordeaux as a compilation utility

We'd start by writing our program. We'd end up with a little something like:

#include <stdio.h>

int main() {
  printf("Hello, World!\n");
  return 0;
}

Then we can test it.

gcc -o project.o project.c
./project.o
> Hello, World!

Great, it works! The hard part is done; now we need to write our Bordeaux file. Let's call our build target proj. We'll write something like this to BordeauxFile:

path: /usr/bin
defaultTarget: proj
targets:
    proj:
        runner: gcc -o project.o project.c
        silent: true

In order to test our newly created build file, we just need to run brdx build.

brdx build
> WARNING: You didn't specify a target to build. We'll be building the provided default target (if any).
> INFO: Transpiled.
> INFO: Using default target. (proj)
> INFO: Building target 'proj'...
> INFO: Built.

That's it! Now, we have our project fully completed.