Re-namespacing things and adjusting how stuff gets built
based on some recent practical experience with Go.
This commit is contained in:
parent
45239efacc
commit
0d7806fba4
4
gotime/.example-autoenv.env
Normal file
4
gotime/.example-autoenv.env
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export PATH="$HOME/src/box-o-sand/src/gotime/.installation/go/bin:$PATH"
|
||||||
|
export GOROOT="$HOME/src/box-o-sand/src/gotime/.installation/go"
|
||||||
|
export GOPATH="$GOROOT:$HOME/src/box-o-sand/src/gotime"
|
||||||
|
source "$GOROOT/misc/bash/go"
|
@ -1,12 +1,16 @@
|
|||||||
SOURCES := $(shell find src -name '*.go')
|
PACKAGES := $(foreach pkg,\
|
||||||
TARGETS := $(patsubst src/%.go,bin/%,$(SOURCES))
|
$(shell ls src/gotour.meatballhat.com),\
|
||||||
|
$(patsubst %,gotour.meatballhat.com/%,$(pkg))\
|
||||||
|
)
|
||||||
|
|
||||||
bin/%: src/%.go
|
all:
|
||||||
go build -x -o $@ $^
|
go install $(PACKAGES)
|
||||||
|
|
||||||
all: $(TARGETS)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -v bin/*
|
rm -v bin/*
|
||||||
|
|
||||||
|
env:
|
||||||
|
@echo GOPATH=$(GOPATH)
|
||||||
|
@echo PACKAGES=$(PACKAGES)
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
Loading…
Reference in New Issue
Block a user