Debian Codegraph @

sync-accounts/Makefile

raw
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 <[email protected]>
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 3, 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, consult the Free Software Foundation's
20 # website at www.fsf.org, or the GNU Project website at www.gnu.org.
21
22 SYSTEM_USER= root
23 SYSTEM_GROUP= root
24
25 INSTALL= install -c
26 INSTALL_SHARE= $(INSTALL) -m 644 -o $(SYSTEM_USER) -g $(SYSTEM_GROUP)
27 INSTALL_SCRIPT= $(INSTALL) -m 755 -o $(SYSTEM_USER) -g $(SYSTEM_GROUP)
28 INSTALL_DIRECTORY= $(INSTALL) -m 2755 -o $(SYSTEM_USER) -g $(SYSTEM_GROUP) -d
29
30 prefix=/usr/local
31 bindir=$(prefix)/bin
32 mandir=${prefix}/man
33 man5dir=${mandir}/man5
34 man8dir=${mandir}/man8
35 txtdocdir=$(prefix)/share/doc/sync-accounts
36 exampledir=$(txtdocdir)/examples
37
38 SCRIPTS= sync-accounts sync-accounts-createuser grab-account
39 MANPAGES5= sync-accounts
40 MANPAGES8= sync-accounts sync-accounts-createuser grab-account
41 EXAMPLES= linux bsd
42
43 all:
44
45 install:
46 $(INSTALL_DIRECTORY) $(bindir)
47 set -e; for f in $(SCRIPTS); do \
48 $(INSTALL_SCRIPT) $$f $(bindir)/$$f; done
49
50 install-docs:
51 $(INSTALL_DIRECTORY) $(man5dir) $(man8dir)
52 set -e; for f in $(MANPAGES5); do \
53 $(INSTALL_SHARE) $$f.5 $(man5dir)/$$f.5; done
54 set -e; for f in $(MANPAGES8); do \
55 $(INSTALL_SHARE) $$f.8 $(man8dir)/$$f.8; done
56
57 install-examples:
58 $(INSTALL_DIRECTORY) $(exampledir)
59 set -e; for e in $(EXAMPLES); do \
60 $(INSTALL_SHARE) sync-accounts.example-$$e \
61 $(exampledir)/sync-accounts.$$e; \
62 done
63
64 clean:
65 rm -f *~ ./#*#
66
67 distclean realclean: clean