blob: 764bd23b06502a716f91a92258bbffe6eecf1722 [file] [log] [blame]
Vincent Driessend72acba2010-04-04 16:10:17 +02001#
2# Copyright 2010 Vincent Driessen. All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are met:
6#
7# 1. Redistributions of source code must retain the above copyright notice,
8# this list of conditions and the following disclaimer.
9#
10# 2. Redistributions in binary form must reproduce the above copyright
11# notice, this list of conditions and the following disclaimer in the
12# documentation and/or other materials provided with the distribution.
13#
14# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR
15# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
17# EVENT SHALL VINCENT DRIESSEN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24#
25# The views and conclusions contained in the software and documentation are
26# those of the authors and should not be interpreted as representing official
27# policies, either expressed or implied, of Vincent Driessen.
28#
Kiall Mac Innesca475ab2011-04-26 00:15:01 +010029
30# Determine if we're inside a debian build ..
31ifdef DEB_BUILD_ARCH
32 prefix=$(DESTDIR)/usr/
33else
34 prefix=/usr/local
35endif
Benedikt Böhma93a5352010-01-26 14:52:49 +010036
Vincent Driessenc3b7db92010-02-02 22:50:13 +010037# files that need mode 755
38EXEC_FILES=git-flow
39
40# files that need mode 644
Vincent Driessenc7ea9b22010-02-04 10:22:13 +010041SCRIPT_FILES =git-flow-init
42SCRIPT_FILES+=git-flow-feature
Vincent Driessenc3b7db92010-02-02 22:50:13 +010043SCRIPT_FILES+=git-flow-hotfix
44SCRIPT_FILES+=git-flow-release
45SCRIPT_FILES+=git-flow-support
46SCRIPT_FILES+=git-flow-version
Vincent Driessenc3607ac2010-02-05 19:53:45 +010047SCRIPT_FILES+=gitflow-common
48SCRIPT_FILES+=gitflow-shFlags
Vincent Driessenc3b7db92010-02-02 22:50:13 +010049
Vincent Driessenc7bbfcf2010-01-26 20:18:10 +010050all:
Vincent Driessene9d2d042010-02-01 16:03:07 +010051 @echo "usage: make install"
52 @echo " make uninstall"
Vincent Driessenc7bbfcf2010-01-26 20:18:10 +010053
Benedikt Böhma93a5352010-01-26 14:52:49 +010054install:
Vincent Driessen13c94822010-02-15 20:09:02 +010055 @test -f gitflow-shFlags || (echo "Run 'git submodule init && git submodule update' first." ; exit 1 )
Vincent Driessene0b54c02010-03-19 19:27:38 +010056 install -d -m 0755 $(prefix)/bin
57 install -m 0755 $(EXEC_FILES) $(prefix)/bin
58 install -m 0644 $(SCRIPT_FILES) $(prefix)/bin
Benedikt Böhma93a5352010-01-26 14:52:49 +010059
Vincent Driessen67f781f2010-01-27 00:13:32 +010060uninstall:
Vincent Driessene0b54c02010-03-19 19:27:38 +010061 test -d $(prefix)/bin && \
62 cd $(prefix)/bin && \
Vincent Driessenc3b7db92010-02-02 22:50:13 +010063 rm -f $(EXEC_FILES) $(SCRIPT_FILES)