]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
explicitly manage .depend and .depend.bak
authorDamien Miller <djm@mindrot.org>
Wed, 13 May 2020 02:08:34 +0000 (12:08 +1000)
committerDamien Miller <djm@mindrot.org>
Wed, 13 May 2020 02:08:34 +0000 (12:08 +1000)
Bring back removal of .depend to give the file a known state before
running makedepend, but manually move aside the current .depend file
and restore it as .depend.bak afterwards so the stale .depend check
works as expected.

Makefile.in

index 275d4dd78d53665e72efd17ed88734335cd20b4b..7c5ed0bd69ab5c1b096b794bba4fcf0ae3cf25e5 100644 (file)
@@ -350,12 +350,15 @@ depend: depend-rebuild
        rm -f .depend.bak
 
 depend-rebuild:
-       rm -f config.h
+       mv .depend .depend.old
+       rm -f config.h .depend
        touch config.h .depend
        makedepend -w1000 -Y. -f .depend *.c 2>/dev/null
        (echo '# Automatically generated by makedepend.'; \
         echo '# Run "make depend" to rebuild.'; sort .depend ) >.depend.tmp
        mv .depend.tmp .depend
+       rm -f .depend.bak
+       mv .depend.old .depend.bak
        rm -f config.h
 
 depend-check: depend-rebuild