Use new mLib function annotations.
[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 =
b5d0a3db 31man_MANS =
f6b4ffdc
MW
32
33EXTRA_DIST =
b5d0a3db 34EXTRA_PROGRAMS =
f6b4ffdc
MW
35CLEANFILES =
36DISTCLEANFILES =
37
38AM_CFLAGS = $(mLib_CFLAGS)
39
40###--------------------------------------------------------------------------
41### Substitution of configuration data.
42
43confsubst = $(top_srcdir)/config/confsubst
44EXTRA_DIST += config/confsubst
45
46SUBSTVARS = \
47 PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \
48 BASH="$(BASH)" PYTHON="$(PYTHON)" \
49 sysconfdir="$(sysconfdir)" \
50 mntbkpdir="$(mntbkpdir)" \
51 fshashdir="$(fshashdir)" \
a8447303 52 pkglocalstatedir="$(localstatedir)/lib/bkp" \
f6b4ffdc
MW
53 logdir="$(logdir)"
54
55V_SUBST = $(V_SUBST_$V)
56V_SUBST_= $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
57V_SUBST_0 = @printf " SUBST %s\n" $@;
58
59SUBST = $(V_SUBST)$(confsubst)
60
61###--------------------------------------------------------------------------
62### Programs and scripts.
63
b5d0a3db 64EXTRA_PROGRAMS += rfreezefs
f6b4ffdc
MW
65rfreezefs_SOURCES = rfreezefs.c
66rfreezefs_LDADD = $(mLib_LIBS)
b5d0a3db
MW
67EXTRA_DIST += rfreezefs.8
68if HAVE_MLIB
69sbin_PROGRAMS += rfreezefs
70man_MANS += rfreezefs.8
71endif
f6b4ffdc
MW
72
73sbin_SCRIPTS += rsync-backup
69305044 74dist_man_MANS += rsync-backup.8
f6b4ffdc
MW
75CLEANFILES += rsync-backup
76EXTRA_DIST += rsync-backup.in
77rsync-backup: rsync-backup.in Makefile
78 $(SUBST) >rsync-backup.new \
79 $(srcdir)/rsync-backup.in $(SUBSTVARS) && \
80 chmod +x rsync-backup.new && \
81 mv rsync-backup.new rsync-backup
82
a8447303
MW
83sbin_SCRIPTS += update-bkp-index
84dist_man_MANS += update-bkp-index.8
85CLEANFILES += update-bkp-index
86EXTRA_DIST += update-bkp-index.in
87update-bkp-index: update-bkp-index.in Makefile
88 $(SUBST) >update-bkp-index.new \
89 $(srcdir)/update-bkp-index.in $(SUBSTVARS) && \
90 chmod +x update-bkp-index.new && \
91 mv update-bkp-index.new update-bkp-index
92
f6b4ffdc 93bin_SCRIPTS += fshash
69305044 94dist_man_MANS += fshash.1
f6b4ffdc
MW
95CLEANFILES += fshash
96EXTRA_DIST += fshash.in
97fshash: fshash.in Makefile
98 $(SUBST) >fshash.new \
99 $(srcdir)/fshash.in $(SUBSTVARS) && \
100 chmod +x fshash.new && \
101 mv fshash.new fshash
102
103###--------------------------------------------------------------------------
104### Contributed scripts.
105
106## Some simple scripts showing how one might create and manage backup
107## volumes. Assume the distorted.org.uk key management machinery.
108dist_noinst_SCRIPTS += create-backup-volume
109dist_noinst_SCRIPTS += mount-backup-volume
110dist_noinst_SCRIPTS += umount-backup-volume
111
112###--------------------------------------------------------------------------
113### Release machinery.
114
115EXTRA_DIST += config/auto-version
116
117dist-hook:
118 echo $(VERSION) >$(distdir)/RELEASE
119
06e71670
MW
120###--------------------------------------------------------------------------
121### Debian packaging.
122
123EXTRA_DIST += debian/copyright debian/changelog
124EXTRA_DIST += debian/control debian/rules
125EXTRA_DIST += debian/compat
126
f6b4ffdc 127###----- That's all, folks --------------------------------------------------