Use a @configure_input@ comment at the start of generated Makefiles
[bpt/emacs.git] / doc / lispref / Makefile.in
index 32a241e..8e6d034 100644 (file)
@@ -1,6 +1,6 @@
-# Makefile for the GNU Emacs Lisp Reference Manual.
+### @configure_input@
 
-# Copyright (C) 1990-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1990-1996, 1998-2013 Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -19,6 +19,9 @@
 
 SHELL = /bin/sh
 
+# NB If you add any more configure variables,
+# update the sed rules in the dist target below.
+
 # Standard configure variables.
 srcdir = @srcdir@
 
@@ -163,7 +166,12 @@ dist:
          -e 's/^\(buildinfodir *=\).*/\1 ./' \
          -e 's/^\(clean:.*\)/\1 infoclean/' \
          -e "s/@ver[s]ion@/${version}/" \
+         -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
+         -e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
          ${srcdir}/Makefile.in > emacs-lispref-${version}/Makefile
+       @if grep '@[a-zA-Z_]*@' emacs-lispref-${version}/Makefile; then \
+         echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
+       fi
        tar -cf emacs-lispref-${version}.tar emacs-lispref-${version}
        rm -rf emacs-lispref-${version}