AboutSummaryRefsLogTreeCommitDiffStats
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2018-03-20 01:16:35 +0100
committerMathieu Lirzin <mthl@gnu.org>2018-03-20 02:18:05 +0100
commit64ff2b1ddfff20df87ce4e7c13bd4f996d8948cb (patch)
treeeaec527d69c5d8835d982fb921bdc3ea4b30d6d5
parent624ceb44809f2be891f0af82df1d917d4a5aa9c1 (diff)
downloadmcron-64ff2b1ddfff20df87ce4e7c13bd4f996d8948cb.tar.gz
mcron-64ff2b1ddfff20df87ce4e7c13bd4f996d8948cb.tar.bz2
mcron-64ff2b1ddfff20df87ce4e7c13bd4f996d8948cb.zip
build: Support 'make installcheck'
* configure.ac: Pass 'std-options' to AM_INIT_AUTOMAKE to check that the "--help" and "--version" options can be passed to installed programs. * Makefile.am (installcheck-local): New rule which checks the programs presence and configuration.
-rw-r--r--Makefile.am16
-rw-r--r--configure.ac2
2 files changed, 17 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 6a01ec9..2b2f92e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -181,6 +181,22 @@ install-exec-hook:
chmod u+s $(DESTDIR)$(bindir)/$${tcrontab}
endif
+installcheck-local:
+## Check that only expected programs are installed and configured
+ tmcron=`echo mcron$(EXEEXT) | sed '$(transform_exe)'`; \
+ test -e $(DESTDIR)$(bindir)/$${tmcron}
+if MULTI_USER
+ tcrontab=`echo crontab$(EXEEXT) | sed '$(transform_exe)'`; \
+ test -u $(DESTDIR)$(bindir)/$${tcrontab}
+ tcron=`echo cron$(EXEEXT) | sed '$(transform_exe)'`; \
+ test -e $(DESTDIR)$(sbindir)/$${tcron}
+else !MULTI_USER
+ tcrontab=`echo crontab$(EXEEXT) | sed '$(transform_exe)'`; \
+ test ! -u $(DESTDIR)$(bindir)/$${tcrontab}
+ tcron=`echo cron$(EXEEXT) | sed '$(transform_exe)'`; \
+ test ! -f $(DESTDIR)$(sbindir)/$${tcron}
+endif !MULTI_USER
+
## --------------- ##
## Documentation. ##
## --------------- ##
diff --git a/configure.ac b/configure.ac
index d0d421c..29f9f60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_CONFIG_SRCDIR([src/mcron.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_REQUIRE_AUX_FILE([test-driver.scm])
AC_REQUIRE_AUX_FILE([git-version-gen])
-AM_INIT_AUTOMAKE([subdir-objects -Wall -Wno-override])
+AM_INIT_AUTOMAKE([subdir-objects -Wall -Wno-override std-options])
AM_SILENT_RULES([yes]) # enables silent rules by default
AC_CANONICAL_HOST