summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornytpu <alex@nytpu.com>2021-05-12 16:32:03 -0600
committernytpu <alex@nytpu.com>2021-05-12 16:40:19 -0600
commita6e9de3083c0ac0d951a1f88b43dac78f6a0a9ed (patch)
tree2e90c15713b448fe03ae0ca77be25d65241f4693
parent680d30f6846e830a303edbd5484b306096f92ef8 (diff)
add generate target to makefile
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5d08e08..b27eedb 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ GITDIRTY = $(shell git diff --quiet || echo "-dirty")
# build with `make COMMIT=tarball` if building outside of git repo
COMMIT ?= $(GITC)$(GITDIRTY)
-.PHONY: all clean install uninstall test
+.PHONY: all generate clean install uninstall test
.DEFAULT_GOAL := all
all: $(BUILDDIR)/$(NAME) $(BUILDDIR)/$(NAME).1
@@ -46,9 +46,11 @@ $(BUILDDIR):
$(BUILDDIR)/$(NAME): $(GOSRC) | $(BUILDDIR)
- #$(GO) generate ./...
$(GO) build $(GOFLAGS) -ldflags "$(GOLDFLAGS)" -o $@
+generate: $(GOSRC) | $(BUILDDIR)
+ $(GO) generate ./...
+ $(GO) build $(GOFLAGS) -ldflags "$(GOLDFLAGS)" -o $(BUILDDIR)/$(NAME)
$(BUILDDIR)/%.1: doc/%.1.scd | $(BUILDDIR)
$(SCDOC) < $< > $@