Subject: Re: 26.0.50; automake-1.15: error: cannot open < lib/../nt/gnulib.mk: No such file or directory

From: Paul Eggert <[email-masked]>
Date: Wed, 4 Jan 2017 00:55:08 -0800

We should not be seeing this problem at all on Darwin, as lib/Makefile.am's 
include directive is protected inside an 'if BUILDING_FOR_WINDOWSNT'.... Oh, I 
see, the problem is that we are using a Automake conditional -- these days we 
assume GNU make so this should just be an ordinary GNU make conditional, which 
would have avoided the problem.

Anyway, I installed the attached patch to work around the immediate issue; 
please give it a try.
From c18a524602e02afaf63ab2083b350f3d69fb8ccb Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Wed, 4 Jan 2017 00:44:45 -0800
Subject: [PATCH] Port recent autogen.sh changes to Darwin

Problem reported by Sam Steingold (Bug#25347).
* autogen.sh: Don't assume 'sed -f-' reads a script from stdin, as
POSIX does not require it and it does not work on Darwin.
---
 autogen.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/autogen.sh b/autogen.sh
index 91e1e2c..f6bfde6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -223,7 +223,10 @@ do_git=
 
   ## Create nt/gnulib.mk if it doesn't exist, as autoreconf will need it.
   if test ! -f nt/gnulib.mk; then
-      sed '/^[^#]/s|^.*$|/^## begin  *gnulib module &/,/^## end  *gnulib module &/c ## gnulib module & removed|' nt/gnulib-modules-to-delete.cfg | sed -f- lib/gnulib.mk > nt/gnulib.mk
+      echo 'Inferring nt/gnulib.mk from lib/gnulib.mk ...'
+      metascript='/^[^#]/s|^.*$|/^## begin  *gnulib module &/,/^## end  *gnulib module &/c ## gnulib module & removed|'
+      script=`sed "$metascript" nt/gnulib-modules-to-delete.cfg` || exit
+      sed "$script" lib/gnulib.mk > nt/gnulib.mk || exit
   fi
 
   echo "Running 'autoreconf -fi -I m4' ..."
-- 
2.7.4