Initial commit.
[rsync-backup] / Makefile.am
CommitLineData
f6b4ffdc
MW
1### -*-makefile-*-
2###
3### Build script for rsync-backup
4###
5### (c) 2012 Mark Wooding
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of the `rsync-backup' program.
11###
12### rsync-backup is free software; you can redistribute it and/or modify
13### it under the terms of the GNU General Public License as published by
14### the Free Software Foundation; either version 2 of the License, or
15### (at your option) any later version.
16###
17### rsync-backup is distributed in the hope that it will be useful,
18### but WITHOUT ANY WARRANTY; without even the implied warranty of
19### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20### GNU General Public License for more details.
21###
22### You should have received a copy of the GNU General Public License
23### along with rsync-backup; if not, write to the Free Software Foundation,
24### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26bin_SCRIPTS =
27sbin_SCRIPTS =
28sbin_PROGRAMS =
29dist_noinst_SCRIPTS =
30dist_man_MANS =
31
32EXTRA_DIST =
33CLEANFILES =
34DISTCLEANFILES =
35
36AM_CFLAGS = $(mLib_CFLAGS)
37
38###--------------------------------------------------------------------------
39### Substitution of configuration data.
40
41confsubst = $(top_srcdir)/config/confsubst
42EXTRA_DIST += config/confsubst
43
44SUBSTVARS = \
45 PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \
46 BASH="$(BASH)" PYTHON="$(PYTHON)" \
47 sysconfdir="$(sysconfdir)" \
48 mntbkpdir="$(mntbkpdir)" \
49 fshashdir="$(fshashdir)" \
50 logdir="$(logdir)"
51
52V_SUBST = $(V_SUBST_$V)
53V_SUBST_= $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
54V_SUBST_0 = @printf " SUBST %s\n" $@;
55
56SUBST = $(V_SUBST)$(confsubst)
57
58###--------------------------------------------------------------------------
59### Programs and scripts.
60
61sbin_PROGRAMS += rfreezefs
62dist_man_MANS += rfreezefs.8
63rfreezefs_SOURCES = rfreezefs.c
64rfreezefs_LDADD = $(mLib_LIBS)
65
66sbin_SCRIPTS += rsync-backup
67CLEANFILES += rsync-backup
68EXTRA_DIST += rsync-backup.in
69rsync-backup: rsync-backup.in Makefile
70 $(SUBST) >rsync-backup.new \
71 $(srcdir)/rsync-backup.in $(SUBSTVARS) && \
72 chmod +x rsync-backup.new && \
73 mv rsync-backup.new rsync-backup
74
75bin_SCRIPTS += fshash
76CLEANFILES += fshash
77EXTRA_DIST += fshash.in
78fshash: fshash.in Makefile
79 $(SUBST) >fshash.new \
80 $(srcdir)/fshash.in $(SUBSTVARS) && \
81 chmod +x fshash.new && \
82 mv fshash.new fshash
83
84###--------------------------------------------------------------------------
85### Contributed scripts.
86
87## Some simple scripts showing how one might create and manage backup
88## volumes. Assume the distorted.org.uk key management machinery.
89dist_noinst_SCRIPTS += create-backup-volume
90dist_noinst_SCRIPTS += mount-backup-volume
91dist_noinst_SCRIPTS += umount-backup-volume
92
93###--------------------------------------------------------------------------
94### Release machinery.
95
96EXTRA_DIST += config/auto-version
97
98dist-hook:
99 echo $(VERSION) >$(distdir)/RELEASE
100
101###----- That's all, folks --------------------------------------------------