Subject: [PATCH 7] autoconf: configure.ac uses variables to set in, out and temp files

From: Jakub Narebski <[email-masked]>
Date: Fri, 30 Jun 2006 02:11:18 +0200

configure.ac now uses variables to set input file (containing strings
substituted by ./configure script), temporary file (for appending
lines to output file) and output file (with the result configuration).

This is preparation to using other file than config.mak for output.

Signed-off-by: Jakub Narebski <[email-masked]>
---
 configure.ac |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index f48307c..58ec57a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,14 +6,18 @@ AC_INIT([git], [1.4.0], [[email-masked]
 
 AC_CONFIG_SRCDIR([git.c])
 
-echo "# config.mak.append.  Generated by configure." >> config.mak.append
+config_file=config.mak
+config_append=config.mak.append
+config_in=config.mak.in
+
+echo "# ${config_append}.  Generated by configure." >> "${config_append}"
 
 # Definitions of macros
 # MY_APPEND_LINE(LINE)
 # --------------------
-# Append LINE to file config.mak.append
+# Append LINE to file ${config_append}
 AC_DEFUN([MY_APPEND_LINE],
-[[echo "$1" >> config.mak.append]])# MY_APPEND_LINE
+[[echo "$1" >> "${config_append}"]])# MY_APPEND_LINE

 # Checks for libraries.
@@ -46,6 +50,6 @@ AC_CHECK_FUNC(setenv,,MY_APPEND_LINE(NO_

 # Output files
-AC_CONFIG_FILES([config.mak:config.mak.in:config.mak.append], 
-[rm -f config.mak.append])
+AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"], 
+[rm -f "${config_append}"])
 AC_OUTPUT
-- 
1.4.0