aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
blob: c65a39d931d9191686a153cfbd3cfab5fad0f806 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# This file is part of BEAM
# Copyright (C) 2012 Sergey Poznyakoff
#
# BEAM is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# BEAM is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with BEAM.  If not, see <http://www.gnu.org/licenses/>.
SUBDIRS=. lib doc
if COND_S3MOUNT
 S3MOUNT=s3
 S3MOUNT_SH=s3.sh
endif
noinst_SCRIPTS=build.sed backup.sh restore.sh cleaner.sh list.sh $(S3MOUNT_SH)
bin_SCRIPTS=beam
CLEANFILES=beam beam.sh backup.sh restore.sh cleaner.sh list.sh $(S3MOUNT_SH)
install-exec-hook:
	test -z "$(DESTDIR)$(libexecdir)" || \
              $(mkdir_p) "$(DESTDIR)$(libexecdir)"; \
	for file in backup restore cleaner list $(S3MOUNT); \
	do \
		${INSTALL} $(top_builddir)/$$file.sh	\
	             $(DESTDIR)$(libexecdir)/beam-$$file;	\
	done
install-data-hook:
	test -z "$(DESTDIR)$(sysconfdir)" || \
	   $(mkdir_p) "$(DESTDIR)$(sysconfdir)"; \
	if test -f $(DESTDIR)$(sysconfdir)/beam.conf; then :; else \
	   ${INSTALL} -m 644 $(top_srcdir)/beam.conf $(DESTDIR)$(sysconfdir);\
	fi
uninstall-hook:
	for file in backup restore cleaner list $(S3MOUNT); \
	do \
		rm -f "$(DESTDIR)$(libexecdir)/beam-$$file";	\
	done
beam.sh backup.sh restore.sh cleaner.sh list.sh $(S3MOUNT_SH): build.sed
EXTRA_DIST=beam.in backup.in restore.in beam.conf cleaner.in list.in s3.in
distuninstallcheck_listfiles=find $(DESTDIR)$(prefix) -type f -not -wholename '$(DESTDIR)$(sysconfdir)/beam.conf'

$(top_builddir)/build.sed: Makefile
	$(AM_V_GEN){	\
	  echo 's|@''SYSCONFDIR''@|${sysconfdir}|g';\
	  echo 's|@''LIBDIR''@|${libdir}|g';	\
	  echo 's|@''BINDIR''@|${bindir}|g';	\
	  echo 's|@''LIBEXECDIR''@|${libexecdir}|g';	\
	  echo 's|@''LOCALSTATEDIR''@|${localstatedir}|g'; \
	  echo 's|@''DATAROOTDIR''@|${datarootdir}|g'; \
	  echo 's|@''PACKAGE_BUGREPORT''@|$(PACKAGE_BUGREPORT)|g'; \
	  echo 's|@''PACKAGE_NAME''@|$(PACKAGE_NAME)|g';\
	  echo 's|@''PACKAGE_STRING''@|$(PACKAGE_STRING)|g';\
	  echo 's|@''PACKAGE_TARNAME''@|$(PACKAGE_STRING)|g';\
	  echo 's|@''PACKAGE_URL''@|$(PACKAGE_URL)|g';\
	  echo 's|@''PACKAGE_VERSION''@|$(PACKAGE_VERSION)|g';\
	} > $(top_builddir)/build.sed
DISTCLEANFILES=build.sed backup.sh restore.sh list.sh
include $(top_srcdir)/Make.rules

.PHONY: ChangeLog
ChangeLog:
	$(AM_V_GEN)if test -d .git; then                                     \
          git log --pretty='format:%ct  %an  <%ae>%n%n%s%n%n%b%n' |          \
            awk -f $(top_srcdir)/git2chg.awk > ChangeLog.tmp;                \
          cmp ChangeLog ChangeLog.tmp > /dev/null 2>&1 ||                    \
            mv ChangeLog.tmp ChangeLog;                                      \
          rm -f ChangeLog.tmp;                                               \
	fi

Return to:

Send suggestions and report system problems to the System administrator.