1# Maintainer rules.
2#
3# Copyright (C) 2013-2015 Gary V. Vaughan
4# Written by Gary V. Vaughan, 2013
5#
6# This program is free software; you can redistribute it and/or modify it
7# under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 3, or (at your option)
9# any later version.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14# General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19ME = GNUmakefile
20
21# If the user runs GNU make but didn't ./configure yet, do it for them.
22dont-forget-to-bootstrap = $(wildcard Makefile.in)
23
24ifeq ($(dont-forget-to-bootstrap),)
25
26## Don't redo any pedantic rock version checks, incase they derail
27## a subdirectory bootstrap of slingshot.
28
29%::
30	@echo '$(ME): rebootstrap'
31	@test -f Makefile.in || ./bootstrap --skip-rock-checks
32	@test -f Makefile || ./configure
33	$(MAKE) $@
34
35else
36
37
38include build-aux/release.mk
39include build-aux/sanity.mk
40
41# Run sanity checks as part of distcheck.
42distcheck: $(local-check)
43
44
45## ------------------------- ##
46## Copyright Notice Updates. ##
47## ------------------------- ##
48
49# If you want to set UPDATE_COPYRIGHT_* environment variables,
50# for the build-aux/update-copyright script: set the assignments
51# in this variable in local.mk.
52update_copyright_env ?=
53
54# Run this rule once per year (usually early in January)
55# to update all FSF copyright year lists in your project.
56# If you have an additional project-specific rule,
57# add it in local.mk along with a line 'update-copyright: prereq'.
58# By default, exclude all variants of COPYING; you can also
59# add exemptions (such as ChangeLog..* for rotated change logs)
60# in the file .x-update-copyright.
61.PHONY: update-copyright
62update-copyright:
63	$(AM_V_GEN)grep -l -w Copyright \
64	$$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
65	| $(update_copyright_env) xargs $(srcdir)/build-aux/$@
66
67
68## ------ ##
69## Specl. ##
70## ------ ##
71
72# Use 'make check V=1' for verbose output, or set SPECL_OPTS to
73# pass alternative options to specl command.
74
75SPECL_OPTS     ?=
76SPECL_OPTS     += $(specl_verbose_$(V))
77specl_verbose_  = $(specl_verbose_$(AM_DEFAULT_VERBOSITY))
78specl_verbose_0 =
79specl_verbose_1 = --verbose --formatter=report
80
81
82endif
83