fix(build): Makefile corrections

- Fix an issue whereby `make clean` filed to remove assets created by
  `make generate`.

- Fix a subsequent issue whereby `make generate` was being run too late
  in the `make build` target, which resulted in a build failure.
This commit is contained in:
Christopher Allen Lane 2022-08-26 13:09:40 -04:00
parent 2717044b62
commit d773383f70

View File

@ -41,7 +41,7 @@ releases := \
## build: build an executable for your architecture
.PHONY: build
build: $(dist_dir) clean fmt lint vet vendor generate man
build: $(dist_dir) | clean generate fmt lint vet vendor man
$(GO) build $(BUILD_FLAGS) -o $(dist_dir)/cheat $(cmd_dir)
## build-release: build release executables
@ -104,7 +104,7 @@ install: build
## clean: remove compiled executables
.PHONY: clean
clean: $(dist_dir)
$(RM) -f $(dist_dir)/*
$(RM) -f $(dist_dir)/* $(cmd_dir)/str_config.go $(cmd_dir)/str_usage.go
## distclean: remove the tags file
.PHONY: distclean