add generate target to makefile
This commit is contained in:
@@ -35,7 +35,7 @@ GITDIRTY = $(shell git diff --quiet || echo "-dirty")
|
|||||||
# build with `make COMMIT=tarball` if building outside of git repo
|
# build with `make COMMIT=tarball` if building outside of git repo
|
||||||
COMMIT ?= $(GITC)$(GITDIRTY)
|
COMMIT ?= $(GITC)$(GITDIRTY)
|
||||||
|
|
||||||
.PHONY: all clean install uninstall test
|
.PHONY: all generate clean install uninstall test
|
||||||
.DEFAULT_GOAL := all
|
.DEFAULT_GOAL := all
|
||||||
|
|
||||||
all: $(BUILDDIR)/$(NAME) $(BUILDDIR)/$(NAME).1
|
all: $(BUILDDIR)/$(NAME) $(BUILDDIR)/$(NAME).1
|
||||||
@@ -46,9 +46,11 @@ $(BUILDDIR):
|
|||||||
|
|
||||||
|
|
||||||
$(BUILDDIR)/$(NAME): $(GOSRC) | $(BUILDDIR)
|
$(BUILDDIR)/$(NAME): $(GOSRC) | $(BUILDDIR)
|
||||||
#$(GO) generate ./...
|
|
||||||
$(GO) build $(GOFLAGS) -ldflags "$(GOLDFLAGS)" -o $@
|
$(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)
|
$(BUILDDIR)/%.1: doc/%.1.scd | $(BUILDDIR)
|
||||||
$(SCDOC) < $< > $@
|
$(SCDOC) < $< > $@
|
||||||
|
|||||||
Reference in New Issue
Block a user