[openssh-commits] [openssh] 01/01: Move stale-configure check as early as possible.
git+noreply at mindrot.org
git+noreply at mindrot.org
Wed Jul 27 18:35:06 AEST 2022
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 722a56439aa5972c830e4a9a724cf52aff4a950a
Author: Darren Tucker <dtucker at dtucker.net>
Date: Wed Jul 27 18:31:14 2022 +1000
Move stale-configure check as early as possible.
We added a check in Makefile to catch the case where configure needs to
be rebuilt, however this did not happen until a build was attempted in
which case all of the work done by configure was wasted. Move this check
to the start of configure to catch it as early as possible. ok djm@
---
Makefile.in | 7 +------
configure.ac | 8 ++++++++
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 668eeb89..778c66cf 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -185,16 +185,11 @@ FIXPATHSCMD = $(SED) $(PATHSUBS)
FIXALGORITHMSCMD= $(SHELL) $(srcdir)/fixalgorithms $(SED) \
@UNSUPPORTED_ALGORITHMS@
-all: configure-check $(CONFIGFILES) $(MANPAGES) $(TARGETS)
+all: $(CONFIGFILES) $(MANPAGES) $(TARGETS)
$(LIBSSH_OBJS): Makefile.in config.h
$(SSHOBJS): Makefile.in config.h
$(SSHDOBJS): Makefile.in config.h
-configure-check: $(srcdir)/configure
-
-$(srcdir)/configure: configure.ac $(srcdir)/m4/*.m4
- @echo "ERROR: configure is out of date; please run ${AUTORECONF} (and configure)" 1>&2
- @exit 1
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
diff --git a/configure.ac b/configure.ac
index 33f9b5f9..87fad708 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,14 @@
AC_INIT([OpenSSH], [Portable], [openssh-unix-dev at mindrot.org])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([ssh.c])
+
+# Check for stale configure as early as possible.
+for i in $srcdir/configure.ac $srcdir/m4/*.m4; do
+ if test "$i" -nt "$srcdir/configure"; then
+ AC_MSG_ERROR([$i newer than configure, run autoreconf])
+ fi
+done
+
AC_LANG([C])
AC_CONFIG_HEADERS([config.h])
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list