diff options
author | Olof Johansson <olof@ethup.se> | 2013-04-23 22:17:09 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-04-24 00:38:44 +0400 |
commit | ddf4d1a32a404ee3789bc17276702bb5536b03f6 (patch) | |
tree | 9582f6b996eb43176b677b8e17b800c2b0b516f6 /Makefile | |
parent | 025f9133bbdae6ecd8acfc623b42dfbd6d15d6f9 (diff) |
install: Support $(PREFIX) install target directory prefix
This change introduces support for the common PREFIX variable in the
Makefile and install.py, instead of having /usr/local hardcoded. This
makes it much easier to install node to custom locations e.g. in a
user's home directory.
The PREFIX variable defaults to /usr/local.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -5,6 +5,7 @@ PYTHON ?= python NINJA ?= ninja DESTDIR ?= SIGN ?= +PREFIX ?= /usr/local NODE ?= ./node @@ -55,10 +56,10 @@ config.gypi: configure $(PYTHON) ./configure install: all - $(PYTHON) tools/install.py $@ $(DESTDIR) + $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' uninstall: - $(PYTHON) tools/install.py $@ $(DESTDIR) + $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' clean: -rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node blog.html email.md @@ -266,17 +267,17 @@ pkg: $(PKG) $(PKG): release-only rm -rf $(PKGDIR) rm -rf out/deps out/Release - $(PYTHON) ./configure --prefix=$(PKGDIR)/32/usr/local --without-snapshot --dest-cpu=ia32 --tag=$(TAG) + $(PYTHON) ./configure --prefix=$(PKGDIR)/32$(PREFIX) --without-snapshot --dest-cpu=ia32 --tag=$(TAG) $(MAKE) install V=$(V) rm -rf out/deps out/Release - $(PYTHON) ./configure --prefix=$(PKGDIR)/usr/local --without-snapshot --dest-cpu=x64 --tag=$(TAG) + $(PYTHON) ./configure --prefix=$(PKGDIR)$(PREFIX) --without-snapshot --dest-cpu=x64 --tag=$(TAG) $(MAKE) install V=$(V) SIGN="$(SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh - lipo $(PKGDIR)/32/usr/local/bin/node \ - $(PKGDIR)/usr/local/bin/node \ - -output $(PKGDIR)/usr/local/bin/node-universal \ + lipo $(PKGDIR)/32$(PREFIX)/bin/node \ + $(PKGDIR)$(PREFIX)/bin/node \ + -output $(PKGDIR)$(PREFIX)/bin/node-universal \ -create - mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node + mv $(PKGDIR)$(PREFIX)/bin/node-universal $(PKGDIR)$(PREFIX)/bin/node rm -rf $(PKGDIR)/32 $(packagemaker) \ --id "org.nodejs.Node" \ |