summaryrefslogtreecommitdiff
path: root/GNUmakefile
blob: 06766187d4cdfc91d2af52e79f9988d77810e13c (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
# Maintainer makefile for Automake.  Requires GNU make.

# Copyright (C) 2012 Free Software Foundation, Inc.
#
# This program 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 2, or (at your option)
# any later version.
#
# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.

ifeq ($(wildcard Makefile),)
  ifeq ($(filter bootstrap,$(MAKECMDGOALS)),bootstrap)
    # Allow the user (or more likely the developer) to ask for a bootstrap
    # of the package; of course, this can happen before configure is run,
    # and in fact even before it is created.
  else
    # Else, If the user runs GNU make but has not yet run ./configure,
    # give them an helpful diagnostic instead of a cryptic error.
    $(warning There seems to be no Makefile in this directory.)
    $(warning You must run ./configure before running 'make'.)
    $(error Fatal Error)
  endif
else
  include ./Makefile
  include $(srcdir)/syntax-checks.mk
endif

# To allow bootstrapping also in an unconfigured tree.
srcdir ?= .
am__cd ?= CDPATH=. && unset CDPATH && cd
AM_DEFAULT_VERBOSITY ?= 0
V ?= $(AM_DEFAULT_VERBOSITY)

ifeq ($(V),0)
  AM_V_BOOTSTRAP = @echo "  BOOTSTRAP";
  AM_V_CONFIGURE = @echo "  CONFIGURE";
  AM_V_REMAKE    = @echo "  REMAKE";
else
  AM_V_BOOTSTRAP =
  AM_V_CONFIGURE =
  AM_V_REMAKE    =
endif

# Must be phony, not to be confused with the 'bootstrap' script.
.PHONY: bootstrap
bootstrap:
	$(AM_V_BOOTSTRAP)$(am__cd) $(srcdir) && ./bootstrap.sh
	$(AM_V_CONFIGURE)set -e; \
	am__bootstrap_configure () { \
	  $(srcdir)/configure $${1+"$$@"} $(BOOTSTRAP_CONFIGURE_FLAGS); \
	}; \
	if test -f $(srcdir)/config.status; then \
	  : config.status should return a string properly quoted for eval; \
	  old_configure_flags=`$(srcdir)/config.status --config`; \
	else \
	  old_configure_flags=""; \
	fi; \
	eval am__bootstrap_configure "$$old_configure_flags"
	# The "make check" below is to ensure all the testsuite-required
	# files are rebuilt.
	$(AM_V_REMAKE)$(MAKE) clean && $(MAKE) check TESTS=t/get-sysconf