summaryrefslogtreecommitdiff
path: root/GNUmakefile
blob: 3c781e6a6fb6a9527e06c622ff79d8f256d88a34 (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
# This makefile is used only if you run GNU Make.
# This provides a convenience of automatically running configure
# if it has not previously been run.

# Systems where /bin/sh is not the default shell need this.  The $(shell)
# command below won't work with e.g. stock DOS/Windows shells.
SHELL = /bin/sh

have-Makefile := $(shell test -f Makefile && echo yes)
have-configure := $(shell test -f configure && echo yes)

# If the user runs GNU make but has not yet run ./configure,
# give them a diagnostic.
ifeq ($(have-Makefile),yes)

include Makefile

else

ifeq ($(have-configure),yes)

all:
	@echo There seems to be no Makefile in this directory.
	@echo "Running ./configure before running 'make'."
	sh ./configure
	@$(MAKE)

else

all:
	@echo There seems to be no Makefile in this directory.
	@echo There also does not seem to be a configure script yet.
	@echo "Running 'autoreconf --install' before running 'make'."
	autoreconf --install
	@$(MAKE)

endif

endif

# Tell version 3.79 and up of GNU make to not build goals in this
# directory in parallel.  This is necessary in case someone tries to
# build multiple targets on one command line.
.NOTPARALLEL: