Skip to content

Commit

Permalink
fix makefile for relocated nsqlookupd
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Feb 5, 2014
1 parent affc180 commit 6813a90
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,21 @@ NSQ_TO_HTTP_SRCS = $(wildcard apps/nsq_to_http/*.go nsq/*.go util/*.go)
NSQ_TAIL_SRCS = $(wildcard apps/nsq_tail/*.go nsq/*.go util/*.go)
NSQ_STAT_SRCS = $(wildcard apps/nsq_stat/*.go util/*.go util/lookupd/*.go)

BINARIES = nsqd nsqlookupd nsqadmin
EXAMPLES = nsq_pubsub nsq_to_nsq nsq_to_file nsq_to_http nsq_tail nsq_stat
BINARIES = nsqd nsqadmin
APPS = nsqlookupd nsq_pubsub nsq_to_nsq nsq_to_file nsq_to_http nsq_tail nsq_stat
BLDDIR = build

all: $(BINARIES) $(EXAMPLES)
all: $(BINARIES) $(APPS)

$(BLDDIR)/%:
mkdir -p $(dir $@)
go build ${GOFLAGS} -o $(abspath $@) ./$*

$(BINARIES): %: $(BLDDIR)/%
$(EXAMPLES): %: $(BLDDIR)/apps/%
$(APPS): %: $(BLDDIR)/apps/%

# Dependencies
$(BLDDIR)/nsqd: $(NSQD_SRCS)
$(BLDDIR)/nsqlookupd: $(NSQLOOKUPD_SRCS)
$(BLDDIR)/apps/nsqlookupd: $(NSQLOOKUPD_SRCS)
$(BLDDIR)/nsqadmin: $(NSQADMIN_SRCS)
$(BLDDIR)/apps/nsq_pubsub: $(NSQ_PUBSUB_SRCS)
$(BLDDIR)/apps/nsq_to_nsq: $(NSQ_TO_NSQ_SRCS)
Expand All @@ -40,17 +39,14 @@ $(BLDDIR)/apps/nsq_stat: $(NSQ_STAT_SRCS)
clean:
rm -fr $(BLDDIR)

# Targets
.PHONY: install clean all
# Programs
.PHONY: $(BINARIES)
# Examples
.PHONY: $(EXAMPLES)
.PHONY: $(APPS)

install: $(BINARIES) $(EXAMPLES)
install -m 755 -d ${DESTDIR}${BINDIR}
install -m 755 $(BLDDIR)/nsqd ${DESTDIR}${BINDIR}/nsqd
install -m 755 $(BLDDIR)/nsqlookupd ${DESTDIR}${BINDIR}/nsqlookupd
install -m 755 $(BLDDIR)/apps/nsqlookupd ${DESTDIR}${BINDIR}/nsqlookupd
install -m 755 $(BLDDIR)/nsqadmin ${DESTDIR}${BINDIR}/nsqadmin
install -m 755 $(BLDDIR)/apps/nsq_pubsub ${DESTDIR}${BINDIR}/nsq_pubsub
install -m 755 $(BLDDIR)/apps/nsq_to_nsq ${DESTDIR}${BINDIR}/nsq_to_nsq
Expand Down

0 comments on commit 6813a90

Please sign in to comment.