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