Vincent Driessen | d72acba | 2010-04-04 16:10:17 +0200 | [diff] [blame] | 1 | # |
| 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 Innes | ca475ab | 2011-04-26 00:15:01 +0100 | [diff] [blame] | 29 | |
| 30 | # Determine if we're inside a debian build .. |
| 31 | ifdef DEB_BUILD_ARCH |
| 32 | prefix=$(DESTDIR)/usr/ |
| 33 | else |
| 34 | prefix=/usr/local |
| 35 | endif |
Benedikt Böhm | a93a535 | 2010-01-26 14:52:49 +0100 | [diff] [blame] | 36 | |
Vincent Driessen | c3b7db9 | 2010-02-02 22:50:13 +0100 | [diff] [blame] | 37 | # files that need mode 755 |
| 38 | EXEC_FILES=git-flow |
| 39 | |
| 40 | # files that need mode 644 |
Vincent Driessen | c7ea9b2 | 2010-02-04 10:22:13 +0100 | [diff] [blame] | 41 | SCRIPT_FILES =git-flow-init |
| 42 | SCRIPT_FILES+=git-flow-feature |
Vincent Driessen | c3b7db9 | 2010-02-02 22:50:13 +0100 | [diff] [blame] | 43 | SCRIPT_FILES+=git-flow-hotfix |
| 44 | SCRIPT_FILES+=git-flow-release |
| 45 | SCRIPT_FILES+=git-flow-support |
| 46 | SCRIPT_FILES+=git-flow-version |
Vincent Driessen | c3607ac | 2010-02-05 19:53:45 +0100 | [diff] [blame] | 47 | SCRIPT_FILES+=gitflow-common |
| 48 | SCRIPT_FILES+=gitflow-shFlags |
Vincent Driessen | c3b7db9 | 2010-02-02 22:50:13 +0100 | [diff] [blame] | 49 | |
Vincent Driessen | c7bbfcf | 2010-01-26 20:18:10 +0100 | [diff] [blame] | 50 | all: |
Vincent Driessen | e9d2d04 | 2010-02-01 16:03:07 +0100 | [diff] [blame] | 51 | @echo "usage: make install" |
| 52 | @echo " make uninstall" |
Vincent Driessen | c7bbfcf | 2010-01-26 20:18:10 +0100 | [diff] [blame] | 53 | |
Benedikt Böhm | a93a535 | 2010-01-26 14:52:49 +0100 | [diff] [blame] | 54 | install: |
Vincent Driessen | 13c9482 | 2010-02-15 20:09:02 +0100 | [diff] [blame] | 55 | @test -f gitflow-shFlags || (echo "Run 'git submodule init && git submodule update' first." ; exit 1 ) |
Vincent Driessen | e0b54c0 | 2010-03-19 19:27:38 +0100 | [diff] [blame] | 56 | install -d -m 0755 $(prefix)/bin |
| 57 | install -m 0755 $(EXEC_FILES) $(prefix)/bin |
| 58 | install -m 0644 $(SCRIPT_FILES) $(prefix)/bin |
Benedikt Böhm | a93a535 | 2010-01-26 14:52:49 +0100 | [diff] [blame] | 59 | |
Vincent Driessen | 67f781f | 2010-01-27 00:13:32 +0100 | [diff] [blame] | 60 | uninstall: |
Vincent Driessen | e0b54c0 | 2010-03-19 19:27:38 +0100 | [diff] [blame] | 61 | test -d $(prefix)/bin && \ |
| 62 | cd $(prefix)/bin && \ |
Vincent Driessen | c3b7db9 | 2010-02-02 22:50:13 +0100 | [diff] [blame] | 63 | rm -f $(EXEC_FILES) $(SCRIPT_FILES) |