mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-25 23:19:06 +01:00
Define source code dependencies in Makefile
This commit is contained in:
parent
caebca5609
commit
f229f59dd5
21
Makefile
21
Makefile
@ -1,20 +1,27 @@
|
||||
APP = cc-metric-collector
|
||||
GOSRC_APP := metric-collector.go
|
||||
GOSRC_COLLECTORS := $(wildcard collectors/*.go)
|
||||
GOSRC_SINKS := $(wildcard sinks/*.go)
|
||||
GOSRC_RECEIVERS := $(wildcard receivers/*.go)
|
||||
GOSRC := $(GOSRC_APP) $(GOSRC_COLLECTORS) $(GOSRC_SINKS) $(GOSRC_RECEIVERS)
|
||||
|
||||
.PHONY: all
|
||||
all: $(APP)
|
||||
|
||||
$(APP): metric-collector.go
|
||||
$(APP): $(GOSRC)
|
||||
make -C collectors
|
||||
go get
|
||||
go build -o $(APP) metric-collector.go
|
||||
go build -o $(APP) $(GOSRC_APP)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
make -C collectors clean
|
||||
rm -f $(APP)
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
go fmt collectors/*.go
|
||||
go fmt sinks/*.go
|
||||
go fmt receivers/*.go
|
||||
go fmt metric-collector.go
|
||||
go fmt $(GOSRC_COLLECTORS)
|
||||
go fmt $(GOSRC_SINKS)
|
||||
go fmt $(GOSRC_RECEIVERS)
|
||||
go fmt $(GOSRC_APP)
|
||||
|
||||
.PHONY: clean
|
||||
|
Loading…
Reference in New Issue
Block a user