From 181d0e325f8384273150a0535980f6bd0bcb35a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Sun, 3 Nov 2013 12:21:01 +0100
Subject: [PATCH] Dependencies: Support modules stopping use of acconfig.h

When a module stops using acconfig.h, the corresponding dependencies
file will still contain a dependency on it, so we add an empty rule
for it to keep make(1) happy.

NB: To solve the CritBit dependency problem with an old dependencies
    file, touch post_modules/CritBit/acconfig.h, and rerun make depend.
---
 bin/fixdepends.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/fixdepends.sh b/bin/fixdepends.sh
index 5859ecc0a0..b0437346a4 100755
--- a/bin/fixdepends.sh
+++ b/bin/fixdepends.sh
@@ -69,11 +69,14 @@ sed <"$1/dependencies" -e '/^[ 	]*\\$/d' | sed \
   mv "$1/dependencies.tmp" "$1/dependencies"
 
 if test -f "$1/acconfig.h"; then
-# Add suitable dependencies for regenerating $(CONFIG_HEADERS).
+    # Add suitable dependencies for regenerating $(CONFIG_HEADERS).
+    # Note that we have to have a rule for an acconfig.h in case
+    # it has gone away to avoid make(1) complaining.
     cat <<EOF
 # Regenerate \$(CONFIG_HEADERS) from \$(SRCDIR)/acconfig.h
 \$(CONFIG_HEADERS): \$(SRCDIR)/\$(CONFIG_HEADERS).in
 \$(SRCDIR)/\$(CONFIG_HEADERS).in \$(SRCDIR)/configure: \$(SRCDIR)/acconfig.h
+\$(SRCDIR)/acconfig.h:
 EOF
 fi >>$1/dependencies
 
-- 
GitLab