makefile: fix binary dependencies

OCID_LINK is necessary to correctly build all of the binaries. This
syntax is a GNU Make-ism[1] that allows you to specify a path dependency
without rebuilding the target if the dependency is newer than the
target.

[1]: https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

Signed-off-by: Aleksa Sarai <asarai@suse.com>
This commit is contained in:
Aleksa Sarai 2016-10-15 15:48:18 +11:00
parent cb7239caa6
commit d559b58fd4
No known key found for this signature in database
GPG key ID: 9E18AA267DDB8DB4

View file

@ -40,11 +40,12 @@ conmon:
pause:
make -C $@
GO_SRC = $(shell find . -name \*.go)
ocid: $(GO_SRC) ${OCID_LINK}
GO_SRC = $(shell find . -name \*.go)
ocid: $(GO_SRC) | ${OCID_LINK}
go build --tags "$(BUILDTAGS)" -o $@ ./cmd/server/
ocic: $(GO_SRC)
ocic: $(GO_SRC) | ${OCID_LINK}
go build -o $@ ./cmd/client/
ocid.conf: ocid