GO ?= go RM ?= rm SCDOC ?= scdoc all: neofeels doc neofeels: $(GO) build $(GOFLAGS) . ifeq (, $(shell which $(SCDOC) 2>/dev/null)) $(warning "$(SCDOC) not found, skipping building documentation") doc: else doc: doc/neofeels.1 doc/neofeels.1: $(SCDOC) < doc/neofeels.1.scd > doc/neofeels.1 endif clean: rm neofeels doc/neofeels.1 .PHONY: all neofeels doc clean