From a96cd266e1cd6fae4a347d6ba12b14314c3dd532 Mon Sep 17 00:00:00 2001 From: Pierce Lopez Date: Wed, 30 Sep 2015 01:15:45 -0400 Subject: [PATCH 1/2] Makefile: BINARIES and EXAMPLES are gone, install depends on APPS --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8a1330a8b..18212ce60 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,6 @@ $(BLDDIR)/%: @mkdir -p $(dir $@) go build ${GOFLAGS} -o $(abspath $@) ./$* -$(BINARIES): %: $(BLDDIR)/% $(APPS): %: $(BLDDIR)/apps/% $(BLDDIR)/apps/nsqd: $(NSQD_SRCS) @@ -41,10 +40,9 @@ clean: rm -fr $(BLDDIR) .PHONY: install clean all -.PHONY: $(BINARIES) .PHONY: $(APPS) -install: $(BINARIES) $(EXAMPLES) +install: $(APPS) install -m 755 -d ${DESTDIR}${BINDIR} install -m 755 $(BLDDIR)/apps/nsqlookupd ${DESTDIR}${BINDIR}/nsqlookupd install -m 755 $(BLDDIR)/apps/nsqd ${DESTDIR}${BINDIR}/nsqd From 86899ee61a6e1b6c1bc63ec12fa18f32fcc22f1e Mon Sep 17 00:00:00 2001 From: Pierce Lopez Date: Wed, 30 Sep 2015 01:28:47 -0400 Subject: [PATCH 2/2] Makefile: no need to write apps/ dir everywhere also, we can line up variables nicely --- Makefile | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 18212ce60..a44ab2806 100644 --- a/Makefile +++ b/Makefile @@ -21,20 +21,20 @@ all: $(APPS) $(BLDDIR)/%: @mkdir -p $(dir $@) - go build ${GOFLAGS} -o $(abspath $@) ./$* + go build ${GOFLAGS} -o $@ ./apps/$* -$(APPS): %: $(BLDDIR)/apps/% +$(APPS): %: $(BLDDIR)/% -$(BLDDIR)/apps/nsqd: $(NSQD_SRCS) -$(BLDDIR)/apps/nsqlookupd: $(NSQLOOKUPD_SRCS) -$(BLDDIR)/apps/nsqadmin: $(NSQADMIN_SRCS) -$(BLDDIR)/apps/nsq_pubsub: $(NSQ_PUBSUB_SRCS) -$(BLDDIR)/apps/nsq_to_nsq: $(NSQ_TO_NSQ_SRCS) -$(BLDDIR)/apps/nsq_to_file: $(NSQ_TO_FILE_SRCS) -$(BLDDIR)/apps/nsq_to_http: $(NSQ_TO_HTTP_SRCS) -$(BLDDIR)/apps/nsq_tail: $(NSQ_TAIL_SRCS) -$(BLDDIR)/apps/nsq_stat: $(NSQ_STAT_SRCS) -$(BLDDIR)/apps/to_nsq: $(TO_NSQ_SRCS) +$(BLDDIR)/nsqd: $(NSQD_SRCS) +$(BLDDIR)/nsqlookupd: $(NSQLOOKUPD_SRCS) +$(BLDDIR)/nsqadmin: $(NSQADMIN_SRCS) +$(BLDDIR)/nsq_pubsub: $(NSQ_PUBSUB_SRCS) +$(BLDDIR)/nsq_to_nsq: $(NSQ_TO_NSQ_SRCS) +$(BLDDIR)/nsq_to_file: $(NSQ_TO_FILE_SRCS) +$(BLDDIR)/nsq_to_http: $(NSQ_TO_HTTP_SRCS) +$(BLDDIR)/nsq_tail: $(NSQ_TAIL_SRCS) +$(BLDDIR)/nsq_stat: $(NSQ_STAT_SRCS) +$(BLDDIR)/to_nsq: $(TO_NSQ_SRCS) clean: rm -fr $(BLDDIR) @@ -44,13 +44,13 @@ clean: install: $(APPS) install -m 755 -d ${DESTDIR}${BINDIR} - install -m 755 $(BLDDIR)/apps/nsqlookupd ${DESTDIR}${BINDIR}/nsqlookupd - install -m 755 $(BLDDIR)/apps/nsqd ${DESTDIR}${BINDIR}/nsqd - install -m 755 $(BLDDIR)/apps/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 - install -m 755 $(BLDDIR)/apps/nsq_to_file ${DESTDIR}${BINDIR}/nsq_to_file - install -m 755 $(BLDDIR)/apps/nsq_to_http ${DESTDIR}${BINDIR}/nsq_to_http - install -m 755 $(BLDDIR)/apps/nsq_tail ${DESTDIR}${BINDIR}/nsq_tail - install -m 755 $(BLDDIR)/apps/nsq_stat ${DESTDIR}${BINDIR}/nsq_stat - install -m 755 $(BLDDIR)/apps/to_nsq ${DESTDIR}${BINDIR}/to_nsq + install -m 755 $(BLDDIR)/nsqlookupd ${DESTDIR}${BINDIR}/nsqlookupd + install -m 755 $(BLDDIR)/nsqd ${DESTDIR}${BINDIR}/nsqd + install -m 755 $(BLDDIR)/nsqadmin ${DESTDIR}${BINDIR}/nsqadmin + install -m 755 $(BLDDIR)/nsq_pubsub ${DESTDIR}${BINDIR}/nsq_pubsub + install -m 755 $(BLDDIR)/nsq_to_nsq ${DESTDIR}${BINDIR}/nsq_to_nsq + install -m 755 $(BLDDIR)/nsq_to_file ${DESTDIR}${BINDIR}/nsq_to_file + install -m 755 $(BLDDIR)/nsq_to_http ${DESTDIR}${BINDIR}/nsq_to_http + install -m 755 $(BLDDIR)/nsq_tail ${DESTDIR}${BINDIR}/nsq_tail + install -m 755 $(BLDDIR)/nsq_stat ${DESTDIR}${BINDIR}/nsq_stat + install -m 755 $(BLDDIR)/to_nsq ${DESTDIR}${BINDIR}/to_nsq