Skip to content

Commit

Permalink
Strip the GIT_EXEC_PATH Makefile parameter. Replaced it by the more U…
Browse files Browse the repository at this point in the history
…nixy

``prefix''. There is no need to install git-flow inside git's libexec dir by
default. It just needs to be *somewhere* on the PATH.
  • Loading branch information
nvie committed Mar 19, 2010
1 parent 133c43c commit e0b54c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
AUTO_DETECTED_GIT_EXEC_PATH := $(shell git --exec-path 2>/dev/null || echo /usr/libexec/git-core)
GIT_EXEC_PATH=$(AUTO_DETECTED_GIT_EXEC_PATH)
prefix=/usr/local

# files that need mode 755
EXEC_FILES=git-flow
Expand All @@ -20,11 +19,11 @@ all:

install:
@test -f gitflow-shFlags || (echo "Run 'git submodule init && git submodule update' first." ; exit 1 )
install -d -m 0755 $(GIT_EXEC_PATH)
install -m 0755 $(EXEC_FILES) $(GIT_EXEC_PATH)
install -m 0644 $(SCRIPT_FILES) $(GIT_EXEC_PATH)
install -d -m 0755 $(prefix)/bin
install -m 0755 $(EXEC_FILES) $(prefix)/bin
install -m 0644 $(SCRIPT_FILES) $(prefix)/bin

uninstall:
test -d $(GIT_EXEC_PATH) && \
cd $(GIT_EXEC_PATH) && \
test -d $(prefix)/bin && \
cd $(prefix)/bin && \
rm -f $(EXEC_FILES) $(SCRIPT_FILES)
11 changes: 3 additions & 8 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@ Then, you can install `git-flow`, using:

$ sudo make install

By default, this will look for the directory where Git is already installed,
and install the git-flow extension alongside the other Git subcommands. If git
is not on the system's `PATH`, it tries `/usr/libexec/git-core`. To explicitly
override this setting in case you have installed Git in another location, use:
By default, git-flow will be installed in /usr/local. To change the prefix
where git-flow will be installed, simply specify it explicitly, using:

$ sudo make GIT_EXEC_PATH=/your/custom/path install

You rarely need to override this manually, the default 'make install' should do
fine.
$ sudo make prefix=/opt/local install

Or simply point your `PATH` environment variable to your git-flow checkout
directory.
Expand Down

0 comments on commit e0b54c0

Please sign in to comment.