]> arthur.barton.de Git - pt.git/blob - Makefile
Make sure TMPDIR is initialized to the empty string
[pt.git] / Makefile
1 # pt -- the MacPorts port tool"
2 # Copyright (c)2007 Alexander Barton, alex@barton.de
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 # Please read the file COPYING, README and AUTHORS for more information.
9 #
10 # $Id$
11 #
12
13 all: pt
14
15 pt:
16         chmod 755 bin/pt
17
18 distclean: clean
19         find . -name '.DS_Store' -exec rm -f {} ";"
20
21 clean:
22
23 check: all
24         @echo "Checking \"pt\" script ... \c"
25         @bin/pt --version >/dev/null 2>&1; if [ $$? -eq 0 ]; then \
26          echo "OK."; else echo "Failed!"; exit 1; fi
27
28 install: all
29         install -d -o root -g wheel -m 755 /usr/local/bin
30         install -v -o root -g wheel -m 755 bin/pt /usr/local/bin
31         [ -e /etc/pt.conf ] || install -v -o root -g wheel -m 644 etc/pt.conf /etc
32
33 dist: distclean
34         name=`basename $$PWD`; \
35          version=`grep "VERSION=" bin/pt | cut -d'"' -f2`; \
36           ditto --norsrc . "/tmp/$$$$/$$name-$$version"; \
37           tar cvzf "$$name-$$version.tar.gz" -C "/tmp/$$$$" \
38            --exclude '*.tar*' --exclude '.git' "$$name-$$version"; \
39           rm -rf "/tmp/$$$$"
40
41 distcheck: distclean check dist
42
43 .PHONY: all install
44
45 # -eof-