[1300] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Autoconf (2.10) feature addition to AC_OUTPUT

daemon@ATHENA.MIT.EDU (Tom Yu)
Wed Jun 12 19:44:25 1996

Date: Wed, 12 Jun 1996 19:43:12 -0400
To: djm@gnu.ai.mit.edu
Cc: bug-gnu-utils@gnu.ai.mit.edu
Cc: krbdev@MIT.EDU, marc@MIT.EDU, raeburn@cygnus.com
From: Tom Yu <tlyu@MIT.EDU>

I have implemented a feature addition to AC_OUTPUT.  This allows an
output file to be constructed from more than one input file.  In the
Kerberos 5 project, it is useful to prepend and append pieces (each of
which needs substitution) to the individual Makefile.in files that are
common to all directories.

Allowing a general mechanism for having configure create a file from
multiple sources that are concatenated before substitution seemed like
a good idea.  Basically in addition to having outfile[:infile] it is
now possible to have outfile[:infile1[+infile2[+infile3...]]] in the
call to AC_OUTPUT in a configure.in file.

Please consider these changes for a future release of Autoconf.  We
find this change to be useful in the Kerberos 5 project and believe
that others will find them to be useful as well.  The diffs are
included below.

Thank you

---Tom

Index: ChangeLog
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/krbdev/.cvsroot/src/util/autoconf/ChangeLog,v
retrieving revision 1.12
diff -u -r1.12 ChangeLog
--- ChangeLog	1996/05/20 22:07:19	1.12
+++ ChangeLog	1996/06/12 22:17:40
@@ -1,3 +1,14 @@
+Wed Jun 12 18:17:17 1996  Tom Yu  <tlyu@voltage-multiplier.mit.edu>
+
+	* autoconf.texi (Output): document changes to AC_OUTPUT
+
+Tue Jun 11 23:41:10 1996  Tom Yu  <tlyu@mit.edu>
+
+	* acgeneral.m4 (AC_OUTPUT_FILES): allow for multiple files in
+		AC_OUTPUT; this is done via
+		AC_OUTPUT(outfile[:infile1[+infile2[+infile3...]]]).  The
+		source files are concatenated and substituted over.
+
 Tue May  7 13:20:33 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>
 
 	* acgeneral.m4: Verion 2.10 released.
Index: acgeneral.m4
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/krbdev/.cvsroot/src/util/autoconf/acgeneral.m4,v
retrieving revision 1.12
diff -u -r1.12 acgeneral.m4
--- acgeneral.m4	1996/05/20 22:07:32	1.12
+++ acgeneral.m4	1996/06/12 21:46:35
@@ -1987,7 +1987,19 @@
 ])dnl
   echo creating "$ac_file"
   rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  # allow for outfile[:infile1[+infile2[+infile3...]]] syntax
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}+"
+  ac_files_in=
+  for ac_file_name in $ac_file_in
+  do
+    ac_files_in="$ac_files_in $ac_given_srcdir/$ac_file_name"
+  done
+  IFS="$ac_save_ifs"
+  configure_input=`echo $ac_files_in | sed 's%/./%/%g
+s%  *./%%g
+s%  *%+%g
+s%^%Generated automatically from %
+s%$% by configure.%'`
   case "$ac_file" in
   *Makefile*) ac_comsub="1i\\
 # $configure_input" ;;
@@ -1999,7 +2011,7 @@
 s%@top_srcdir@%$top_srcdir%g
 ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
 ])dnl
-" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+" -f conftest.subs $ac_files_in > $ac_file
 dnl This would break Makefile dependencies.
 dnl  if cmp -s $ac_file conftest.out 2>/dev/null; then
 dnl    echo "$ac_file is unchanged"
Index: autoconf.texi
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/krbdev/.cvsroot/src/util/autoconf/autoconf.texi,v
retrieving revision 1.6
diff -u -r1.6 autoconf.texi
--- autoconf.texi	1996/05/20 22:07:59	1.6
+++ autoconf.texi	1996/06/12 21:34:39
@@ -817,6 +817,12 @@
 AC_OUTPUT(Makefile:templates/top.mk lib/Makefile:templates/lib.mk)
 @end example
 
+You can also generate an output file from multiple input files by
+separating the input files by a plus sign.  For example,
+@example
+AC_OUTPUT(Makefile:templates/pre.in+Makefile.in+templates/post.in)
+@end example
+
 If you pass @var{extra-cmds}, those commands will be inserted into
 @file{config.status} to be run after all its other processing.  If
 @var{init-cmds} are given, they are inserted just before

home help back first fref pref prev next nref lref last post