From 42aac41b9399dbdb14e3f250f358c14ec13ee5e4 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Sat, 4 Aug 2012 12:07:17 -0700 Subject: [PATCH] Makefile: add target for precompiled binary tarballs This target compiles node with "/" as the prefix and installs into a directory like: "node-v0.8.6-darwin-x86_64". Then it creates a gzipped-tarball of that directory, called something like: "node-v0.8.6-darwin-x86_64.tar.gz". --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Makefile b/Makefile index 869eafac9a1..826cd89feef 100644 --- a/Makefile +++ b/Makefile @@ -192,8 +192,12 @@ docclean: -rm -rf out/doc VERSION=v$(shell $(PYTHON) tools/getnodeversion.py) +PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]') +ARCH=$(shell uname -m) TARNAME=node-$(VERSION) TARBALL=$(TARNAME).tar.gz +BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH) +BINARYTAR=$(BINARYNAME).tar.gz PKG=out/$(TARNAME).pkg packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker @@ -256,6 +260,18 @@ $(TARBALL): node doc rm -rf $(TARNAME) gzip -f -9 $(TARNAME).tar +$(BINARYTAR): + rm -rf $(BINARYNAME) + rm -rf out/deps out/Release + ./configure --prefix=/ --without-snapshot + $(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1 + cp README.md $(BINARYNAME) + cp LICENSE $(BINARYNAME) + cp ChangeLog $(BINARYNAME) + tar -cf $(BINARYNAME).tar $(BINARYNAME) + rm -rf $(BINARYNAME) + gzip -f -9 $(BINARYNAME).tar + dist-upload: $(TARBALL) $(PKG) ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION) scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL)