Skip to content

fix: make install assumes mustach bin is built

Steve requested to merge steve-chavez/mustach:fix-makefile into master

Problem

When only interested in the core library without JSON support, the mustach binary is not built. make works fine for this case but make install assumes that the mustach binary exists so it fails.

$ make install
tool    = none
libs    = all
jsonc   = no
jansson = no
cjson   = no
install -d /usr/local/bin
install -m0755 mustach       /usr/local/bin/
install: cannot stat 'mustach': No such file or directory

Solution

This adds a bash conditional to the Makefile, so if the binary is not built it won't try to install it. With this make install will work normally.

Edited by Steve

Merge request reports