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')
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user