Skip to content

Commit

Permalink
Hack to make go build work when using a weird directory structure.
Browse files Browse the repository at this point in the history
`go build` by default compiles the main package into a binary named
the same as the current directory. Sometimes folks do things to
cause this directory to not be named "logstash-forwarder"
(for example, as reported in elastic#388).

This change makes all `go build` documentation/invocations force the
output binary name to be "logstash-forwarder" regardless of the
parent directory name.

Fixes elastic#402
  • Loading branch information
jordansissel authored and justmara committed May 28, 2015
1 parent 603c49e commit 6e84dd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OBJECTS=logstash-forwarder
compile: $(OBJECTS)

logstash-forwarder:
go build
go build -o $@

.PHONY: clean
clean:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ you're probably OK to ignore this.

git clone git://github.com/elasticsearch/logstash-forwarder.git
cd logstash-forwarder
go build
go build -o logstash-forwarder

gccgo note: Using gccgo is not recommended because it produces a binary with a
runtime dependency on libgo. With the normal go compiler, this dependency
Expand Down

0 comments on commit 6e84dd0

Please sign in to comment.