forked from rkd77/elinks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (58 loc) · 2.16 KB
/
Makefile
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
69
70
top_builddir=.
-include $(top_builddir)/Makefile.config
SUBDIRS = doc src
SUBDIRS-$(CONFIG_NLS) += po
CLEAN = features.log
calltest = $1-$1
all-recursive: config.h
# Automagically rerun autotools
$(top_builddir)/config.status: $(top_srcdir)/configure
cd $(top_builddir) && $(SHELL) ./config.status --recheck
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
$(ACLOCAL_M4): $(top_srcdir)/configure.ac
cd $(top_srcdir) && $(ACLOCAL)
$(top_srcdir)/configure: $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOCONF)
# Makefile.config doesn't need a separate timestamp file because
# touching it doesn't directly cause other files to be rebuilt.
$(top_builddir)/Makefile.config: $(top_srcdir)/Makefile.config.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=Makefile.config CONFIG_HEADERS= \
$(SHELL) ./config.status
$(top_builddir)/config.h: $(top_builddir)/stamp-h
@cd $(top_builddir) && \
if test ! -f $@; then \
rm -f stamp-h; \
$(MAKE) stamp-h; \
else :; fi
$(top_builddir)/stamp-h: $(top_srcdir)/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
$(SHELL) ./config.status
@echo timestamp > stamp-h 2> /dev/null
$(top_srcdir)/config.h.in: $(top_srcdir)/stamp-h.in
@if test ! -f $@; then \
rm -f $(top_srcdir)/stamp-h.in; \
$(MAKE) $(top_srcdir)/stamp-h.in; \
else :; fi
$(top_srcdir)/stamp-h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(top_srcdir)/stamp-h.in 2> /dev/null
# Makefile.lib heavily uses $(call ...), which was added in GNU Make 3.78.
# An elinks-users post on 2007-12-04 reported trouble with GNU Make 3.68.
# Detect this situation and give an error message. $(MAKECMDGOALS) is
# only defined by 3.76 and later, so specify the "all" target as well.
# This check has been tested with GNU Make 3.68, 3.77, 3.78.1, and 3.81.
ifneq ($(call calltest,ok),ok-ok)
$(MAKECMDGOALS) default all:
@echo >&2 "You need GNU Make 3.78 or later"
@false
else
ifeq ($(wildcard Makefile.config),)
# Catch all
$(MAKECMDGOALS) default:
@echo "You need to first run ./configure"
else
include $(top_srcdir)/Makefile.lib
endif
endif