make: Clean up the Makefiles so the output is more elegant
This avoids printing erroneous messages when nothing is actually happening.
This commit is contained in:
22
Makefile
22
Makefile
@@ -117,7 +117,6 @@ race:
|
|||||||
|
|
||||||
# generate go files from non-go source
|
# generate go files from non-go source
|
||||||
bindata: ## generate go files from non-go sources
|
bindata: ## generate go files from non-go sources
|
||||||
@echo "Generating: bindata..."
|
|
||||||
$(MAKE) --quiet -C bindata
|
$(MAKE) --quiet -C bindata
|
||||||
$(MAKE) --quiet -C lang/funcs
|
$(MAKE) --quiet -C lang/funcs
|
||||||
|
|
||||||
@@ -126,8 +125,7 @@ generate:
|
|||||||
|
|
||||||
lang: ## generates the lexer/parser for the language frontend
|
lang: ## generates the lexer/parser for the language frontend
|
||||||
@# recursively run make in child dir named lang
|
@# recursively run make in child dir named lang
|
||||||
@echo "Generating: lang..."
|
@$(MAKE) --quiet -C lang
|
||||||
$(MAKE) --quiet -C lang
|
|
||||||
|
|
||||||
# build a `mgmt` binary for current host os/arch
|
# build a `mgmt` binary for current host os/arch
|
||||||
$(PROGRAM): build/mgmt-${GOHOSTOS}-${GOHOSTARCH} ## build an mgmt binary for current host os/arch
|
$(PROGRAM): build/mgmt-${GOHOSTOS}-${GOHOSTARCH} ## build an mgmt binary for current host os/arch
|
||||||
@@ -362,28 +360,28 @@ releases/$(VERSION)/.mkdir:
|
|||||||
mkdir -p releases/$(VERSION)/{deb,rpm,pacman}/ && touch releases/$(VERSION)/.mkdir
|
mkdir -p releases/$(VERSION)/{deb,rpm,pacman}/ && touch releases/$(VERSION)/.mkdir
|
||||||
|
|
||||||
releases/$(VERSION)/rpm/changelog: $(PROGRAM) releases/$(VERSION)/.mkdir
|
releases/$(VERSION)/rpm/changelog: $(PROGRAM) releases/$(VERSION)/.mkdir
|
||||||
@echo "Generating rpm changelog..."
|
@echo "Generating: rpm changelog..."
|
||||||
./misc/make-rpm-changelog.sh $(VERSION)
|
./misc/make-rpm-changelog.sh $(VERSION)
|
||||||
|
|
||||||
$(RPM_PKG): releases/$(VERSION)/rpm/changelog
|
$(RPM_PKG): releases/$(VERSION)/rpm/changelog
|
||||||
@echo "Building rpm package..."
|
@echo "Building: rpm package..."
|
||||||
./misc/fpm-pack.sh rpm $(VERSION) libvirt-devel augeas-devel
|
./misc/fpm-pack.sh rpm $(VERSION) libvirt-devel augeas-devel
|
||||||
|
|
||||||
releases/$(VERSION)/deb/changelog: $(PROGRAM) releases/$(VERSION)/.mkdir
|
releases/$(VERSION)/deb/changelog: $(PROGRAM) releases/$(VERSION)/.mkdir
|
||||||
@echo "Generating deb changelog..."
|
@echo "Generating: deb changelog..."
|
||||||
./misc/make-deb-changelog.sh $(VERSION)
|
./misc/make-deb-changelog.sh $(VERSION)
|
||||||
|
|
||||||
$(DEB_PKG): releases/$(VERSION)/deb/changelog
|
$(DEB_PKG): releases/$(VERSION)/deb/changelog
|
||||||
@echo "Building deb package..."
|
@echo "Building: deb package..."
|
||||||
./misc/fpm-pack.sh deb $(VERSION) libvirt-dev libaugeas-dev
|
./misc/fpm-pack.sh deb $(VERSION) libvirt-dev libaugeas-dev
|
||||||
|
|
||||||
$(PACMAN_PKG): $(PROGRAM) releases/$(VERSION)/.mkdir
|
$(PACMAN_PKG): $(PROGRAM) releases/$(VERSION)/.mkdir
|
||||||
@echo "Building pacman package..."
|
@echo "Building: pacman package..."
|
||||||
./misc/fpm-pack.sh pacman $(VERSION) libvirt augeas
|
./misc/fpm-pack.sh pacman $(VERSION) libvirt augeas
|
||||||
|
|
||||||
$(SHA256SUMS): $(RPM_PKG) $(DEB_PKG) $(PACMAN_PKG)
|
$(SHA256SUMS): $(RPM_PKG) $(DEB_PKG) $(PACMAN_PKG)
|
||||||
@# remove the directory separator in the SHA256SUMS file
|
@# remove the directory separator in the SHA256SUMS file
|
||||||
@echo "Generating sha256 sum..."
|
@echo "Generating: sha256 sum..."
|
||||||
sha256sum $(RPM_PKG) $(DEB_PKG) $(PACMAN_PKG) | awk -F '/| ' '{print $$1" "$$6}' > $(SHA256SUMS)
|
sha256sum $(RPM_PKG) $(DEB_PKG) $(PACMAN_PKG) | awk -F '/| ' '{print $$1" "$$6}' > $(SHA256SUMS)
|
||||||
|
|
||||||
$(SHA256SUMS_ASC): $(SHA256SUMS)
|
$(SHA256SUMS_ASC): $(SHA256SUMS)
|
||||||
@@ -413,9 +411,11 @@ help: ## show this help screen
|
|||||||
funcgen: lang/funcs/core/generated_funcs_test.go lang/funcs/core/generated_funcs.go
|
funcgen: lang/funcs/core/generated_funcs_test.go lang/funcs/core/generated_funcs.go
|
||||||
|
|
||||||
lang/funcs/core/generated_funcs_test.go: lang/funcs/funcgen/*.go lang/funcs/core/funcgen.yaml lang/funcs/funcgen/templates/generated_funcs_test.go.tpl
|
lang/funcs/core/generated_funcs_test.go: lang/funcs/funcgen/*.go lang/funcs/core/funcgen.yaml lang/funcs/funcgen/templates/generated_funcs_test.go.tpl
|
||||||
go run lang/funcs/funcgen/*.go -templates lang/funcs/funcgen/templates/generated_funcs_test.go.tpl
|
@echo "Generating: funcs test..."
|
||||||
|
@go run lang/funcs/funcgen/*.go -templates lang/funcs/funcgen/templates/generated_funcs_test.go.tpl 2>/dev/null
|
||||||
|
|
||||||
lang/funcs/core/generated_funcs.go: lang/funcs/funcgen/*.go lang/funcs/core/funcgen.yaml lang/funcs/funcgen/templates/generated_funcs.go.tpl
|
lang/funcs/core/generated_funcs.go: lang/funcs/funcgen/*.go lang/funcs/core/funcgen.yaml lang/funcs/funcgen/templates/generated_funcs.go.tpl
|
||||||
go run lang/funcs/funcgen/*.go -templates lang/funcs/funcgen/templates/generated_funcs.go.tpl
|
@echo "Generating: funcs..."
|
||||||
|
@go run lang/funcs/funcgen/*.go -templates lang/funcs/funcgen/templates/generated_funcs.go.tpl 2>/dev/null
|
||||||
|
|
||||||
# vim: ts=8
|
# vim: ts=8
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ build: bindata.go
|
|||||||
|
|
||||||
# add more input files as dependencies at the end here...
|
# add more input files as dependencies at the end here...
|
||||||
bindata.go: ../COPYING
|
bindata.go: ../COPYING
|
||||||
|
@echo "Generating: bindata..."
|
||||||
# go-bindata --pkg bindata -o <OUTPUT> <INPUT>
|
# go-bindata --pkg bindata -o <OUTPUT> <INPUT>
|
||||||
go-bindata --pkg bindata -o ./$@ $^
|
go-bindata --pkg bindata -o ./$@ $^
|
||||||
# gofmt the output file
|
# gofmt the output file
|
||||||
|
|||||||
@@ -25,13 +25,15 @@ all: build
|
|||||||
build: lexer.nn.go y.go
|
build: lexer.nn.go y.go
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm lexer.nn.go y.go y.output || true
|
@rm -f lexer.nn.go y.go y.output || true
|
||||||
|
|
||||||
lexer.nn.go: lexer.nex
|
lexer.nn.go: lexer.nex
|
||||||
|
@echo "Generating: lexer..."
|
||||||
nex -e lexer.nex
|
nex -e lexer.nex
|
||||||
@ROOT="$$( cd "$$( dirname "$${BASH_SOURCE[0]}" )" && cd .. && pwd )" && $$ROOT/misc/header.sh 'lexer.nn.go'
|
@ROOT="$$( cd "$$( dirname "$${BASH_SOURCE[0]}" )" && cd .. && pwd )" && $$ROOT/misc/header.sh 'lexer.nn.go'
|
||||||
|
|
||||||
y.go: parser.y
|
y.go: parser.y
|
||||||
|
@echo "Generating: parser..."
|
||||||
ifneq ($(OLDGOYACC),)
|
ifneq ($(OLDGOYACC),)
|
||||||
go tool yacc parser.y
|
go tool yacc parser.y
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user