]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Move stale-configure check as early as possible.
authorDarren Tucker <dtucker@dtucker.net>
Wed, 27 Jul 2022 08:31:14 +0000 (18:31 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Wed, 27 Jul 2022 08:31:14 +0000 (18:31 +1000)
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
configure.ac

index 668eeb892492db6da1109a1d1aa7752a9aae7183..778c66cff5a06519682f3938b77c2d7d629727b2 100644 (file)
@@ -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 $@
index 33f9b5f9ed881cd4125d46c9cf66ec5f55144547..87fad7084de9f6a7331d78d4bf145a55a3801341 100644 (file)
 AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@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])