From 64ff2b1ddfff20df87ce4e7c13bd4f996d8948cb Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Tue, 20 Mar 2018 01:16:35 +0100 Subject: 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. --- Makefile.am | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Makefile.am') 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. ## ## --------------- ## -- cgit v1.2.3