Skip to content

Commit

Permalink
Makefile: add target for precompiled binary tarballs
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
TooTallNate committed Aug 6, 2012
1 parent 7a9db6c commit 42aac41
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 42aac41

Please sign in to comment.