diff --git a/weed-fs/src/cmd/weedmaster/Makefile b/weed-fs/src/cmd/weedmaster/Makefile index a0c4ca7c0..9acc3f421 100644 --- a/weed-fs/src/cmd/weedmaster/Makefile +++ b/weed-fs/src/cmd/weedmaster/Makefile @@ -19,8 +19,8 @@ GOPATHSEP=: ifeq ($(GOHOSTOS),windows) GOPATHSEP=; endif -GCIMPORTS=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) -LDIMPORTS=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +GCIMPORTS+=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +LDIMPORTS+=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) # gb: default target is in GBROOT this way command: @@ -34,6 +34,6 @@ command: $(GBROOT)/bin/$(TARG) # gb: local dependencies $(TARG): $(GBROOT)/_obj/storage.a -<<<<<<< local + $(TARG): $(GBROOT)/_obj/directory.a -<<<<<<< local + diff --git a/weed-fs/src/cmd/weedvolume/Makefile b/weed-fs/src/cmd/weedvolume/Makefile new file mode 100644 index 000000000..62d8088b5 --- /dev/null +++ b/weed-fs/src/cmd/weedvolume/Makefile @@ -0,0 +1,37 @@ +# Makefile generated by gb: http://go-gb.googlecode.com +# gb provides configuration-free building and distributing + +include $(GOROOT)/src/Make.inc + +TARG=weedvolume +GOFILES=\ + weedvolume.go\ + +# gb: this is the local install +GBROOT=../../.. + +# gb: compile/link against local install +GCIMPORTS+= -I $(GBROOT)/_obj +LDIMPORTS+= -L $(GBROOT)/_obj + +# gb: compile/link against GOPATH entries +GOPATHSEP=: +ifeq ($(GOHOSTOS),windows) +GOPATHSEP=; +endif +GCIMPORTS+=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +LDIMPORTS+=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) + +# gb: default target is in GBROOT this way +command: + +include $(GOROOT)/src/Make.cmd + +# gb: copy to local install +$(GBROOT)/bin/$(TARG): $(TARG) + mkdir -p $(dir $@); cp -f $< $@ +command: $(GBROOT)/bin/$(TARG) + +# gb: local dependencies +$(TARG): $(GBROOT)/_obj/storage.a + diff --git a/weed-fs/src/cmd/weedvolume/fix_volume_index/Makefile b/weed-fs/src/cmd/weedvolume/fix_volume_index/Makefile index 54e0d7d74..516117f0e 100644 --- a/weed-fs/src/cmd/weedvolume/fix_volume_index/Makefile +++ b/weed-fs/src/cmd/weedvolume/fix_volume_index/Makefile @@ -19,8 +19,8 @@ GOPATHSEP=: ifeq ($(GOHOSTOS),windows) GOPATHSEP=; endif -GCIMPORTS=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) -LDIMPORTS=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +GCIMPORTS+=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +LDIMPORTS+=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) # gb: default target is in GBROOT this way command: @@ -34,4 +34,4 @@ command: $(GBROOT)/bin/$(TARG) # gb: local dependencies $(TARG): $(GBROOT)/_obj/storage.a -<<<<<<< local + diff --git a/weed-fs/src/pkg/directory/Makefile b/weed-fs/src/pkg/directory/Makefile index 55cc4ce50..49fc1b597 100644 --- a/weed-fs/src/pkg/directory/Makefile +++ b/weed-fs/src/pkg/directory/Makefile @@ -14,13 +14,14 @@ GBROOT=../../.. # gb: compile/link against local install GCIMPORTS+= -I $(GBROOT)/_obj LDIMPORTS+= -L $(GBROOT)/_obj + # gb: compile/link against GOPATH entries GOPATHSEP=: ifeq ($(GOHOSTOS),windows) GOPATHSEP=; endif -GCIMPORTS=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) -LDIMPORTS=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +GCIMPORTS+=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +LDIMPORTS+=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) # gb: copy to local install $(GBROOT)/_obj/$(TARG).a: _obj/$(TARG).a diff --git a/weed-fs/src/pkg/storage/Makefile b/weed-fs/src/pkg/storage/Makefile index ab50c9e8a..eceed56ba 100644 --- a/weed-fs/src/pkg/storage/Makefile +++ b/weed-fs/src/pkg/storage/Makefile @@ -16,13 +16,14 @@ GBROOT=../../.. # gb: compile/link against local install GCIMPORTS+= -I $(GBROOT)/_obj LDIMPORTS+= -L $(GBROOT)/_obj + # gb: compile/link against GOPATH entries GOPATHSEP=: ifeq ($(GOHOSTOS),windows) GOPATHSEP=; endif -GCIMPORTS=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) -LDIMPORTS=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +GCIMPORTS+=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +LDIMPORTS+=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) # gb: copy to local install $(GBROOT)/_obj/$(TARG).a: _obj/$(TARG).a diff --git a/weed-fs/src/pkg/util/Makefile b/weed-fs/src/pkg/util/Makefile index bf3a57f05..458e05408 100644 --- a/weed-fs/src/pkg/util/Makefile +++ b/weed-fs/src/pkg/util/Makefile @@ -14,13 +14,14 @@ GBROOT=../../.. # gb: compile/link against local install GCIMPORTS+= -I $(GBROOT)/_obj LDIMPORTS+= -L $(GBROOT)/_obj + # gb: compile/link against GOPATH entries GOPATHSEP=: ifeq ($(GOHOSTOS),windows) GOPATHSEP=; endif -GCIMPORTS=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) -LDIMPORTS=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +GCIMPORTS+=-I $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -I , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) +LDIMPORTS+=-L $(subst $(GOPATHSEP),/pkg/$(GOOS)_$(GOARCH) -L , $(GOPATH))/pkg/$(GOOS)_$(GOARCH) # gb: copy to local install $(GBROOT)/_obj/$(TARG).a: _obj/$(TARG).a