]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* m4sugar.m4 (m4_normalize): New macro - superposition of
authorPavel Roskin <proski@gnu.org>
Wed, 17 Jan 2001 15:23:31 +0000 (15:23 +0000)
committerPavel Roskin <proski@gnu.org>
Wed, 17 Jan 2001 15:23:31 +0000 (15:23 +0000)
m4_flatten and m4_strip.
(m4_join): Use m4_normalize.
* acgeneral.m4 (AC_FOREACH): Use m4_normalize.
(AC_CONFIG_HEADERS): Normalize the first argument.
(AC_CONFIG_LINKS): Likewise.
(AC_CONFIG_SUBDIRS): Likewise.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4
lib/m4sugar/m4sugar.m4
m4sugar.m4

index c785a4445ed94aa144cfb432ece00daafdeada09..d006581e1fcb856fb74255cec3576be3d37c4a73 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-01-17  Pavel Roskin  <proski@gnu.org>
+
+       * m4sugar.m4 (m4_normalize): New macro - superposition of
+       m4_flatten and m4_strip.
+       (m4_join): Use m4_normalize.
+       * acgeneral.m4 (AC_FOREACH): Use m4_normalize.
+       (AC_CONFIG_HEADERS): Normalize the first argument.
+       (AC_CONFIG_LINKS): Likewise.
+       (AC_CONFIG_SUBDIRS): Likewise.
+
 2001-01-17  Tim Van Holder  <tim.van.holder@pandora.be>
 
        * acgeneral.m4 (_AC_OUTPUT_SUBDIRS): Quote $ac_sub_srcdir in case
index e6922679a8333e520323b597e388f98e424888a0..b74943e6963365e7d66745c97af5516eaadbf8fc 100644 (file)
@@ -503,7 +503,7 @@ m4_define([AC_TR_SH],
 #    ive  ], [-Var-])end
 #    => -active--b--active-end
 m4_define([AC_FOREACH],
-[m4_foreach([$1], m4_split(m4_strip(m4_flatten([$2]))), [$3])])
+[m4_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
 
 
 
@@ -3589,7 +3589,7 @@ m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
 ])])])
 _AC_CONFIG_COMMANDS_INIT([$3])
 m4_divert_pop()dnl
-ac_config_headers="$ac_config_headers $1"
+ac_config_headers="$ac_config_headers m4_normalize([$1])"
 ])dnl
 
 # Initialize to empty.  It is much easier and uniform to have a config
@@ -3626,7 +3626,7 @@ m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
 ])])])
 _AC_CONFIG_COMMANDS_INIT([$3])
 m4_divert_pop()dnl
-ac_config_links="$ac_config_links $1"
+ac_config_links="$ac_config_links m4_normalize([$1])"
 ])dnl
 
 
@@ -3697,7 +3697,7 @@ m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
 ])])])
 _AC_CONFIG_COMMANDS_INIT([$3])
 m4_divert_pop()dnl
-ac_config_files="$ac_config_files $1"
+ac_config_files="$ac_config_files m4_normalize([$1])"
 ])dnl
 
 # Initialize the lists.
@@ -3723,7 +3723,8 @@ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 m4_append([_AC_LIST_SUBDIRS], [ $1])dnl
 AS_LITERAL_IF([$1], [],
               [AC_DIAGNOSE(syntax, [$0: you should use literals])])
-m4_divert_text([DEFAULTS], [ac_subdirs_all="$ac_subdirs_all $1"])
+m4_divert_text([DEFAULTS],
+               [ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
 AC_SUBST(subdirs, "$subdirs $1")dnl
 ])
 
index e6922679a8333e520323b597e388f98e424888a0..b74943e6963365e7d66745c97af5516eaadbf8fc 100644 (file)
@@ -503,7 +503,7 @@ m4_define([AC_TR_SH],
 #    ive  ], [-Var-])end
 #    => -active--b--active-end
 m4_define([AC_FOREACH],
-[m4_foreach([$1], m4_split(m4_strip(m4_flatten([$2]))), [$3])])
+[m4_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
 
 
 
@@ -3589,7 +3589,7 @@ m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
 ])])])
 _AC_CONFIG_COMMANDS_INIT([$3])
 m4_divert_pop()dnl
-ac_config_headers="$ac_config_headers $1"
+ac_config_headers="$ac_config_headers m4_normalize([$1])"
 ])dnl
 
 # Initialize to empty.  It is much easier and uniform to have a config
@@ -3626,7 +3626,7 @@ m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
 ])])])
 _AC_CONFIG_COMMANDS_INIT([$3])
 m4_divert_pop()dnl
-ac_config_links="$ac_config_links $1"
+ac_config_links="$ac_config_links m4_normalize([$1])"
 ])dnl
 
 
@@ -3697,7 +3697,7 @@ m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
 ])])])
 _AC_CONFIG_COMMANDS_INIT([$3])
 m4_divert_pop()dnl
-ac_config_files="$ac_config_files $1"
+ac_config_files="$ac_config_files m4_normalize([$1])"
 ])dnl
 
 # Initialize the lists.
@@ -3723,7 +3723,8 @@ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 m4_append([_AC_LIST_SUBDIRS], [ $1])dnl
 AS_LITERAL_IF([$1], [],
               [AC_DIAGNOSE(syntax, [$0: you should use literals])])
-m4_divert_text([DEFAULTS], [ac_subdirs_all="$ac_subdirs_all $1"])
+m4_divert_text([DEFAULTS],
+               [ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
 AC_SUBST(subdirs, "$subdirs $1")dnl
 ])
 
index 35825c7c2166eba8b2016703b31b2448b823f85e..5375f496738a1b2bb8c0db4e81b670d63184f605 100644 (file)
@@ -1377,6 +1377,22 @@ m4_define([m4_strip],
           [ \(.\)$], [\1])])
 
 
+# m4_normalize(STRING)
+# --------------------
+# Apply m4_flatten and m4_strip to STRING.
+#
+# The argument is quoted, so that the macro is robust to active symbols:
+#
+#    m4_define(active, ACTIVE)
+#    m4_normalize([  act\
+#    ive
+#    active ])end
+#    => active activeend
+
+m4_define([m4_normalize],
+[m4_strip(m4_flatten([$1]))])
+
+
 
 # m4_join(SEP, ARG1, ARG2...)
 # ---------------------------
@@ -1495,7 +1511,7 @@ m4_Prefix1[]dnl
 m4_if(m4_eval(m4_Cursor > m4_len(m4_Prefix)),
       1, [m4_define([m4_Cursor], m4_len(m4_Prefix))
 m4_Prefix])[]dnl
-m4_foreach_quoted([m4_Word], (m4_split(m4_strip(m4_flatten([$1])))),
+m4_foreach_quoted([m4_Word], (m4_split(m4_normalize([$1]))),
 [m4_define([m4_Cursor], m4_eval(m4_Cursor + len(m4_Word) + 1))dnl
 dnl New line if too long, else insert a space unless it is the first
 dnl of the words.
index 35825c7c2166eba8b2016703b31b2448b823f85e..5375f496738a1b2bb8c0db4e81b670d63184f605 100644 (file)
@@ -1377,6 +1377,22 @@ m4_define([m4_strip],
           [ \(.\)$], [\1])])
 
 
+# m4_normalize(STRING)
+# --------------------
+# Apply m4_flatten and m4_strip to STRING.
+#
+# The argument is quoted, so that the macro is robust to active symbols:
+#
+#    m4_define(active, ACTIVE)
+#    m4_normalize([  act\
+#    ive
+#    active ])end
+#    => active activeend
+
+m4_define([m4_normalize],
+[m4_strip(m4_flatten([$1]))])
+
+
 
 # m4_join(SEP, ARG1, ARG2...)
 # ---------------------------
@@ -1495,7 +1511,7 @@ m4_Prefix1[]dnl
 m4_if(m4_eval(m4_Cursor > m4_len(m4_Prefix)),
       1, [m4_define([m4_Cursor], m4_len(m4_Prefix))
 m4_Prefix])[]dnl
-m4_foreach_quoted([m4_Word], (m4_split(m4_strip(m4_flatten([$1])))),
+m4_foreach_quoted([m4_Word], (m4_split(m4_normalize([$1]))),
 [m4_define([m4_Cursor], m4_eval(m4_Cursor + len(m4_Word) + 1))dnl
 dnl New line if too long, else insert a space unless it is the first
 dnl of the words.