chiark / gitweb /
a8c767e14b12b97a1e964ff8a64a131ac035e98e
[chiark-utils.git] / backup / Makefile
1 # Makefile
2 # simple make settings
3 #
4 # This file is part of chiark backup, a system for backing up GNU/Linux and
5 # other UN*X-compatible machines, as used on chiark.greenend.org.uk.
6 #
7 # chiark backup is:
8 #  Copyright (C) 1997-1998,2000-2001 Ian Jackson <ian@chiark.greenend.org.uk>
9 #  Copyright (C) 1999 Peter Maydell <pmaydell@chiark.greenend.org.uk>
10 #
11 # This is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2, or (at your option) any later version.
14 #
15 # This is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
18 # details.
19 #
20 # You should have received a copy of the GNU General Public License along
21 # with this program; if not, write to the Free Software Foundation, Inc.,
22 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24 us=     chiark-backup
25
26 include ../settings.make
27
28 BINSCRIPTS=     checkallused loaded driver takedown whatsthis labeltape \
29                 snap-drop
30 SHARESCRIPTS=   bringup full increm
31 SHAREFILES=     backuplib.pl
32 SNAPKINDS=      lvm remount
33
34 EXAMPLES=       relativity chiark
35
36 all:
37
38 install:                all
39                 $(INSTALL_DIRECTORY) $(confdir) $(confdir)/snap $(bindir) \
40                         $(sharedir) $(vardir) $(man1dir)
41                 set -e; for s in $(BINSCRIPTS); do \
42                         $(INSTALL_SCRIPT) $$s $(bindir)/backup-$$s; done
43                 $(INSTALL_SHARE) $(SHAREFILES) $(sharedir)
44                 $(INSTALL_SCRIPT) $(SHARESCRIPTS) $(sharedir)
45                 $(INSTALL_SCRIPT) $(SNAPKINDS) $(confdir)/snap
46
47 install-docs:
48                 $(INSTALL_DIRECTORY) $(txtdocdir)
49                 $(INSTALL_SHARE) iwjbackup.txt $(txtdocdir)/README
50
51 install-examples:
52                 set -e; for e in $(EXAMPLES); do \
53                         cd examples/$$e; \
54                         $(INSTALL_DIRECTORY) $(exampledir)/$$e; \
55                         $(INSTALL_SHARE) [^A-Z]*[^~] $(exampledir)/$$e; \
56                         if test -f SYMLINKS.tar; then \
57                                 exec <SYMLINKS.tar; \
58                                 (set -e; cd $(exampledir) && tar -xf -); \
59                         fi; \
60                         cd ../..; \
61                 done
62
63 clean:
64                 rm -f *~ ./#*# *.o
65
66 distclean realclean:    clean