chiark / gitweb /
changelog: start ~iwj again
[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,2007
9 #                     Ian Jackson <ian@chiark.greenend.org.uk>
10 #  Copyright (C) 1999 Peter Maydell <pmaydell@chiark.greenend.org.uk>
11 #
12 # This is free software; you can redistribute it and/or modify it under the
13 # terms of the GNU General Public License as published by the Free Software
14 # Foundation; either version 3, or (at your option) any later version.
15 #
16 # This is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
19 # details.
20 #
21 # You should have received a copy of the GNU General Public License along
22 # with this program; if not, consult the Free Software Foundation's
23 # website at www.fsf.org, or the GNU Project website at www.gnu.org.
24
25 us=     chiark-backup
26
27 include ../settings.make
28
29 BINSCRIPTS=     checkallused loaded driver takedown whatsthis labeltape \
30                 snaprsync
31 SHARESCRIPTS=   bringup full increm snap-drop
32 SHAREFILES=     backuplib.pl snap-common
33 SNAPKINDS=      lvm remount remountrocp nosnap
34
35 EXAMPLES=       relativity chiark
36
37 all:
38
39 install:                all
40                 $(INSTALL_DIRECTORY) $(confdir) $(confdir)/snap $(bindir) \
41                         $(sharedir) $(vardir) $(man1dir)
42                 set -e; for s in $(BINSCRIPTS); do \
43                         $(INSTALL_SCRIPT) $$s $(bindir)/backup-$$s; done
44                 $(INSTALL_SHARE) $(SHAREFILES) $(sharedir)
45                 $(INSTALL_SCRIPT) $(SHARESCRIPTS) $(sharedir)
46                 set -e; for s in $(SNAPKINDS); do \
47                         d=$(confdir)/snap/$$s; \
48                         test ! -f $$d || d=$$d.dist; \
49                         $(INSTALL_SCRIPT) $$s $$d; done
50
51 install-docs:
52                 $(INSTALL_DIRECTORY) $(txtdocdir)
53                 $(INSTALL_SHARE) iwjbackup.txt $(txtdocdir)/README
54
55 install-examples:
56                 set -e; for e in $(EXAMPLES); do \
57                         cd examples/$$e; \
58                         $(INSTALL_DIRECTORY) $(exampledir)/$$e; \
59                         $(INSTALL_SHARE) [!A-Z]*[!~] $(exampledir)/$$e; \
60                         if test -f SYMLINKS.tar; then \
61                                 exec <SYMLINKS.tar; \
62                                 (set -e; cd $(exampledir)/$$e && tar -xf -); \
63                         fi; \
64                         cd ../..; \
65                 done
66
67 clean:
68                 rm -f *~ ./#*# *.o
69
70 distclean realclean:    clean