Skip to content

Commit

Permalink
Merge pull request #33 from haysclark/make-require
Browse files Browse the repository at this point in the history
Adding 'require' step to 'all' for dependency checks
  • Loading branch information
mrtazz committed Feb 11, 2020
2 parents 2b73ec2 + 39f8c76 commit 1f97310
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ MAN_TARGETS := $(patsubst man/man1/%.md,%,$(MAN_SOURCES))

INSTALLED_TARGETS = $(addprefix $(PREFIX)/bin/, $(TARGETS))
INSTALLED_MAN_TARGETS = $(addprefix $(PREFIX)/share/man/man1/, $(MAN_TARGETS))

# source, dependency and build definitions
DEPDIR = .d
MAKEDEPEND = echo "$@: $$(go list -f '{{ join .Deps "\n" }}' $< | awk '/github/ { gsub(/^github.com\/[a-z]*\/[a-z]*\//, ""); printf $$0"/*.go " }')" > $(DEPDIR)/$@.d
Expand All @@ -50,9 +50,13 @@ $(DEPDIR):
%.1: man/man1/%.1.md
sed "s/REPLACE_DATE/$(BUILDDATE)/" $< | pandoc -s -t man -o $@

all: $(TARGETS) $(MAN_TARGETS)
all: require $(TARGETS) $(MAN_TARGETS)
.DEFAULT_GOAL:=all

require:
@echo "Checking the programs required for the build are installed..."
@pandoc --version >/dev/null 2>&1 || (echo "ERROR: pandoc is required."; exit 1)

# development tasks
test:
go test -v $(TEST_PKG)
Expand Down

0 comments on commit 1f97310

Please sign in to comment.