Re-namespacing things and adjusting how stuff gets built
based on some recent practical experience with Go.
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
SOURCES := $(shell find src -name '*.go')
|
||||
TARGETS := $(patsubst src/%.go,bin/%,$(SOURCES))
|
||||
PACKAGES := $(foreach pkg,\
|
||||
$(shell ls src/gotour.meatballhat.com),\
|
||||
$(patsubst %,gotour.meatballhat.com/%,$(pkg))\
|
||||
)
|
||||
|
||||
bin/%: src/%.go
|
||||
go build -x -o $@ $^
|
||||
|
||||
all: $(TARGETS)
|
||||
all:
|
||||
go install $(PACKAGES)
|
||||
|
||||
clean:
|
||||
rm -v bin/*
|
||||
|
||||
env:
|
||||
@echo GOPATH=$(GOPATH)
|
||||
@echo PACKAGES=$(PACKAGES)
|
||||
|
||||
.PHONY: all clean
|
||||
|
Reference in New Issue
Block a user