]> arthur.barton.de Git - servertools.macosx.git/blob - Makefile
Added .PHONY targets to Makefile
[servertools.macosx.git] / Makefile
1 #
2 # servertools.macosx Makefile
3 # Copyright (c)2008,2009 Barton IT-Consulting, Alexander Barton
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE.
12 # See the GNU General Public License for more details.
13 #
14
15 TOOLS = odbackup
16
17 PREFIX = /usr/local
18
19 all: $(TOOLS)
20
21 clean:
22
23 distclean: clean
24
25 maintainer-clean: distclean
26
27 install: all install-odbackup
28
29 check: all
30
31 dist:
32
33 odbackup:
34
35 install-odbackup:
36         mkdir -p $(PREFIX)/sbin
37         install -c -m 755 -o root -g wheel \
38          odbackup/odbackup $(PREFIX)/sbin
39         launchctl list de.maccc.odbackup >/dev/null 2>&1 \
40          && launchctl unload -w /Library/LaunchDaemons/de.maccc.odbackup.plist \
41          || true
42         install -c -m 644 -o root -g wheel \
43          odbackup/de.maccc.odbackup.plist /Library/LaunchDaemons
44         [ -x /usr/sbin/slapconfig ] \
45          && launchctl load -w /Library/LaunchDaemons/de.maccc.odbackup.plist \
46          || echo "\n *** 'slapconfig' not found, not enabling odbackup!\n"
47
48 .PHONY: all clean distclean maintainer-clean install check dist distcheck \
49          $(TOOLS)