Retry only for https protocol
[elinks.git] / Makefile
blob703616ada6c1519271b39f3293177bca462db6e7
1 top_builddir=.
2 -include $(top_builddir)/Makefile.config
4 SUBDIRS = doc src
5 SUBDIRS-$(CONFIG_NLS) += po
6 CLEAN = features.log
7 calltest = $1-$1
9 all-recursive: config.h
11 # Automagically rerun autotools
12 $(top_builddir)/config.status: $(top_srcdir)/configure
13 cd $(top_builddir) && $(SHELL) ./config.status --recheck
15 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
16 $(ACLOCAL_M4): $(top_srcdir)/configure.in $(top_srcdir)/acinclude.m4
17 cd $(top_srcdir) && $(ACLOCAL)
19 $(top_srcdir)/configure: $(top_srcdir)/configure.in $(ACLOCAL_M4)
20 cd $(top_srcdir) && $(AUTOCONF)
22 # Makefile.config doesn't need a separate timestamp file because
23 # touching it doesn't directly cause other files to be rebuilt.
24 $(top_builddir)/Makefile.config: $(top_srcdir)/Makefile.config.in $(top_builddir)/config.status
25 cd $(top_builddir) \
26 && CONFIG_FILES=Makefile.config CONFIG_HEADERS= \
27 $(SHELL) ./config.status
29 $(top_builddir)/config.h: $(top_builddir)/stamp-h
30 @cd $(top_builddir) && \
31 if test ! -f $@; then \
32 rm -f stamp-h; \
33 $(MAKE) stamp-h; \
34 else :; fi
36 $(top_builddir)/stamp-h: $(top_srcdir)/config.h.in $(top_builddir)/config.status
37 cd $(top_builddir) \
38 && CONFIG_FILES= CONFIG_HEADERS=config.h \
39 $(SHELL) ./config.status
40 @echo timestamp > stamp-h 2> /dev/null
42 $(top_srcdir)/config.h.in: $(top_srcdir)/stamp-h.in
43 @if test ! -f $@; then \
44 rm -f $(top_srcdir)/stamp-h.in; \
45 $(MAKE) $(top_srcdir)/stamp-h.in; \
46 else :; fi
48 $(top_srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
49 cd $(top_srcdir) && $(AUTOHEADER)
50 @echo timestamp > $(top_srcdir)/stamp-h.in 2> /dev/null
53 # Makefile.lib heavily uses $(call ...), which was added in GNU Make 3.78.
54 # An elinks-users post on 2007-12-04 reported trouble with GNU Make 3.68.
55 # Detect this situation and give an error message. $(MAKECMDGOALS) is
56 # only defined by 3.76 and later, so specify the "all" target as well.
57 # This check has been tested with GNU Make 3.68, 3.77, 3.78.1, and 3.81.
58 ifneq ($(call calltest,ok),ok-ok)
59 $(MAKECMDGOALS) default all:
60 @echo >&2 "You need GNU Make 3.78 or later"
61 @false
62 else
63 ifeq ($(wildcard Makefile.config),)
64 # Catch all
65 $(MAKECMDGOALS) default:
66 @echo "You need to first run ./configure"
67 else
68 include $(top_srcdir)/Makefile.lib
69 endif
70 endif