autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flattening config_files


From: Pavel Roskin
Subject: Flattening config_files
Date: Fri, 15 Dec 2000 02:01:55 -0500 (EST)

Hello!

I tried to make Autoconf deal with something like this:

AC_CONFIG_FILES([divert/Makefile])

I actually know a project that has the "divert" directory. Unfortunately,
it is very hard to do, so I abandoned this idea.

This is a side effect of my efforts. the only useful part of a bigger
patch.

Different projects separate files in AC_CONFIG_FILES (or in AC_OUTPUT,
since AC_CONFIG_FILES is new) in a different way, using spaces, newlines
and even backslashes, e.g.

AC_OUTPUT([file1
file2 file3 \
   file4])

`configure' adds this test without modifications to ac_config_files, then
it becomes config_files in `config.status'. The later uses it only to
display help, so the original formatting affects the help text:

$ ./config.status --help
,,,
Configuration files:
 file1
file2 file3    file4

Not nice. After my patch we get

Configuration files:
 file1 file2 file3 file4


ChangeLog:
        * acgeneral.m4 (AC_CONFIG_FILES): Add files to ac_config_files
        using AC_FOREACH to ensure that it's flat and has no extra spaces.

___________________
--- acgeneral.m4
+++ acgeneral.m4
@@ -3690,7 +3690,8 @@
 ])])])
 _AC_CONFIG_COMMANDS_INIT([$3])
 m4_divert_pop()dnl
-ac_config_files="$ac_config_files $1"
+ac_config_files="$ac_config_files[]AC_FOREACH([AC_File],
+                                             [$1], [ AC_File])"
 ])dnl

 # Initialize the lists.
___________________

Regards,
Pavel Roskin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]