fait-macro

<h1 align="center"> <img height="75" alt="fait-macro" src="logo.png"> </h1> <h4 align="center">autogenerated makefiles from handlebars templates</h4>

Usage no npm install needed!

<script type="module">
  import faitMacro from 'https://cdn.skypack.dev/fait-macro';
</script>

README

fait-macro

autogenerated makefiles from handlebars templates

Installation

fait-macro requires fait 1.0. install them both with:

npm install --save-dev fait fait-macro

fait will create a barebones makefile: to load fait-macro, add:

$(call require, fait-macro)

Usage

Create a makefile template (e.g. dynamic.hbs), then in your makefile, add -include dynamic.mk. Any Make variables referenced in the template are interpolated into the generated makefile.

Why

Generated makefile includes allow you to expand variables in places where that doesn't normally work, such as the target list of a static pattern rule.

Documentation

Rules

📝 %.mk ⬅️ %.hbs %.mk.json 🔗

Compile a makefile from a Handlebars template with data from makefile vars.

📝 %.mk.json ⬅️ %.hbs $(MAKEFILE_LIST) 🔗

Generate an intermediate json file of makefile variables by exporting the names found in the Handlebars template

licence

MIT