chiark / gitweb /
remove debugging and cruft; size window more sensibly
[chiark-utils.git] / sync-accounts / Makefile
1 # Makefile
2
3 # This file is part of chiark-utils, a collection of useful programs
4 # used on chiark.greenend.org.uk.
5 #
6 # This file is:
7 #  Copyright 2001-2002 Ian Jackson <ian@chiark.greenend.org.uk>
8 #
9 # This is free software; you can redistribute it and/or modify it under the
10 # terms of the GNU General Public License as published by the Free Software
11 # Foundation; either version 2, or (at your option) any later version.
12 #
13 # This is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
16 # details.
17 #
18 # You should have received a copy of the GNU General Public License along
19 # with this program; if not, write to the Free Software Foundation, Inc.,
20 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
22 SYSTEM_GROUP=   root
23
24 INSTALL=                install -c
25 INSTALL_SHARE=          $(INSTALL) -m 644 -o root -g $(SYSTEM_GROUP)
26 INSTALL_SCRIPT=         $(INSTALL) -m 755 -o root -g $(SYSTEM_GROUP)
27 INSTALL_DIRECTORY=      $(INSTALL) -m 2755 -o root -g $(SYSTEM_GROUP) -d
28
29 prefix=/usr/local
30 bindir=$(prefix)/bin
31 mandir=${prefix}/man
32 man5dir=${mandir}/man5
33 man8dir=${mandir}/man8
34 txtdocdir=$(prefix)/share/doc/sync-accounts
35 exampledir=$(txtdocdir)/examples
36
37 SCRIPTS=        sync-accounts sync-accounts-createuser grab-account
38 MANPAGES5=      sync-accounts
39 MANPAGES8=      sync-accounts sync-accounts-createuser grab-account
40 EXAMPLES=       linux bsd
41
42 all:
43
44 install:
45                 $(INSTALL_DIRECTORY) $(bindir)
46                 set -e; for f in $(SCRIPTS); do \
47                         $(INSTALL_SCRIPT) $$f $(bindir)/$$f; done
48
49 install-docs:
50                 $(INSTALL_DIRECTORY) $(man5dir) $(man8dir)
51                 set -e; for f in $(MANPAGES5); do \
52                         $(INSTALL_SHARE) $$f.5 $(man5dir)/$$f.5; done
53                 set -e; for f in $(MANPAGES8); do \
54                         $(INSTALL_SHARE) $$f.8 $(man8dir)/$$f.8; done
55
56 install-examples:
57                 $(INSTALL_DIRECTORY) $(exampledir)
58                 set -e; for e in $(EXAMPLES); do \
59                         $(INSTALL_SHARE) sync-accounts.example-$$e \
60                                 $(exampledir)/sync-accounts.$$e; \
61                         done
62
63 clean:
64                 rm -f *~ ./#*#
65
66 distclean realclean:    clean