diff options
author | Nathan Rajlich <nathan@tootallnate.net> | 2012-08-10 03:30:41 +0400 |
---|---|---|
committer | Nathan Rajlich <nathan@tootallnate.net> | 2012-08-10 04:11:41 +0400 |
commit | 64ac54a64d68c1fffd352d0453d81b6c3c0455b0 (patch) | |
tree | 33219e4c290e81474ba2a5a4ba0b231e8aa430dd /Makefile | |
parent | c82e2889e8259ebd750c3b8f14fefcef74cb1caa (diff) |
Makefile: add a better check to ensure a node "release"
Closes #3841.
Closes #3842.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -192,15 +192,17 @@ docclean: -rm -rf out/doc VERSION=v$(shell $(PYTHON) tools/getnodeversion.py) +RELEASE=$(shell $(PYTHON) tools/getnodeisrelease.py) PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]') -ifeq ($(DESTCPU),x64) -ARCH=x86_64 -else -ifeq ($(DESTCPU),ia32) -ARCH=i386 +ifeq ($(findstring x86_64,$(shell uname -m)),x86_64) +DESTCPU ?= x64 else -ARCH=$(shell uname -m) +DESTCPU ?= ia32 endif +ifeq ($(DESTCPU),x64) +ARCH=x64 +else +ARCH=x86 endif TARNAME=node-$(VERSION) TARBALL=$(TARNAME).tar.gz @@ -225,11 +227,11 @@ release-only: echo "" >&2 ; \ exit 1 ; \ fi - @if [ $(shell ./node --version) = "$(VERSION)" ]; then \ + @if [ "$(RELEASE)" = "1" ]; then \ exit 0; \ else \ echo "" >&2 ; \ - echo "$(shell ./node --version) doesn't match $(VERSION)." >&2 ; \ + echo "#NODE_VERSION_IS_RELEASE is set to $(RELEASE)." >&2 ; \ echo "Did you remember to update src/node_version.cc?" >&2 ; \ echo "" >&2 ; \ exit 1 ; \ |