Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added PREFIX and DESTDIR vars to Makefile.

  • Loading branch information...
commit cb989017ce3a0c7597007f64453f58f2a2bd6317 1 parent c70a7bb
@mde mde authored
Showing with 10 additions and 6 deletions.
  1. +10 −6 Makefile
View
16 Makefile
@@ -17,22 +17,26 @@
.PHONY: all build install clean uninstall
+PREFIX=/usr/local
+DESTDIR=
+
all: build
build:
@echo 'Jake built.'
install:
- @mkdir -p /usr/local/lib/node_modules/jake && \
- cp -R ./* /usr/local/lib/node_modules/jake/ && \
- ln -snf /usr/local/lib/node_modules/jake/bin/cli.js /usr/local/bin/jake && \
- chmod 755 /usr/local/lib/node_modules/jake/bin/cli.js && \
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin \
+ mkdir -p $(DESTDIR)$(PREFIX)/lib/node_modules/jake && \
+ cp -R ./* $(DESTDIR)$(PREFIX)/lib/node_modules/jake/ && \
+ ln -snf $(DESTDIR)$(PREFIX)/lib/node_modules/jake/bin/cli.js $(DESTDIR)$(PREFIX)/bin/jake && \
+ chmod 755 $(DESTDIR)$(PREFIX)/lib/node_modules/jake/bin/cli.js && \
echo 'Jake installed.'
clean:
@true
uninstall:
- @rm -f /usr/local/bin/jake && \
- rm -fr /usr/local/lib/node_modules/jake/ && \
+ @rm -f $(DESTDIR)$(PREFIX)/bin/jake && \
+ rm -fr $(DESTDIR)$(PREFIX)/lib/node_modules/jake/ && \
echo 'Jake uninstalled.'
Please sign in to comment.
Something went wrong with that request. Please try again.