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)
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.
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.
📝 %.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
MIT