]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
1999-10-31 Akim Demaille <akim@epita.fr>
authorAkim Demaille <akim@epita.fr>
Fri, 14 Jan 2000 17:57:52 +0000 (17:57 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 14 Jan 2000 17:57:52 +0000 (17:57 +0000)
* acgeneral.m4 (AC_CONFIG_LINKS): Allow a second argument,
commands to run, as AC_CONFIG_FILES and HEADERS.
(AC_LIST_LINKS_COMMANDS): New growing string.  Initialize.
(AC_OUTPUT_LINKS): Use it.
(AC_OUTPUT_FILES, AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS): Don't
pretend to have arguments: you don't depend upon it.
(AC_OUTPUT): Call the previous macros without arguments.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index 1c15898fb657a0173c308a8f22794f04fb574774..3d3acc730b934875e82fd1bdacbbbc047d813250 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+1999-10-31  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (AC_CONFIG_LINKS): Allow a second argument,
+       commands to run, as AC_CONFIG_FILES and HEADERS.
+       (AC_LIST_LINKS_COMMANDS): New growing string.  Initialize.
+       (AC_OUTPUT_LINKS): Use it.
+       (AC_OUTPUT_FILES, AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS): Don't
+       pretend to have arguments: you don't depend upon it.
+       (AC_OUTPUT): Call the previous macros without arguments.
+
 1999-10-31  Akim Demaille  <akim@epita.fr>
 
        * acgeneral.m4 (AC_PREFIX_PROGRAM): Don't use define/undefine, but
index 5936096301a31c7553a78e99dbf76408197419f5..5856bba3868a39263a8076324ab2fa5363f4300d 100644 (file)
@@ -3021,22 +3021,35 @@ AC_DEFUN(AC_CONFIG_HEADER,
 [AC_CONFIG_HEADERS([$1])])
 
 
-dnl AC_CONFIG_LINKS(DEST:SOURCE...)
-dnl -------------------------------
+dnl AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS])
+dnl -------------------------------------------
 dnl Specify that config.status should establish a (symbolic if possible)
 dnl link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
 dnl Reject DEST=., because it is makes it hard for ./config.status
 dnl to guess the links to establish (`./config.status .').
 dnl This macro may be called multiple times.
+dnl
+dnl The commands are stored in a growing string AC_LIST_LINKS_COMMANDS
+dnl which should be used like this:
+dnl
+dnl      case $ac_file in
+dnl        AC_LIST_LINKS_COMMANDS
+dnl      esac
 AC_DEFUN(AC_CONFIG_LINKS,
 [AC_CONFIG_UNIQUE([$1])dnl
 ifelse(regexp([$1], [^\.:\| \.:]), -1,,
         [AC_FATAL([$0: invalid destination: `.'])])dnl
 m4_append([AC_LIST_LINKS], [$1])dnl
-])
+dnl Register the commands
+ifelse([$2],,, [AC_FOREACH([AC_File], [$1],
+[m4_append([AC_LIST_LINKS_COMMANDS],
+[    ]patsubst(AC_File, [:.*])[ ) $2 ;;
+])])])dnl
+])dnl
 
 dnl Initialize the list.
 define([AC_LIST_LINKS])
+define([AC_LIST_LINKS_COMMANDS])
 
 
 dnl AC_LINK_FILES(SOURCE..., DEST...)
@@ -3371,14 +3384,14 @@ dnl Because AC_OUTPUT_FILES is in charge of undiverting the AC_SUBST
 dnl section, it is better to divert it to void and *call it*, rather
 dnl than not calling it at all
 ifset([AC_LIST_FILES],
-      [AC_OUTPUT_FILES(AC_LIST_FILES)],
+      [AC_OUTPUT_FILES()],
       [AC_DIVERT_PUSH(AC_DIVERSION_KILL)dnl
-       AC_OUTPUT_FILES(AC_LIST_FILES)dnl
+       AC_OUTPUT_FILES()dnl
        AC_DIVERT_POP()])dnl
 ifset([AC_LIST_HEADERS],
-      [AC_OUTPUT_HEADERS(AC_LIST_HEADERS)])dnl
+      [AC_OUTPUT_HEADERS()])dnl
 ifset([AC_LIST_LINKS],
-      [AC_OUTPUT_LINKS(AC_LIST_LINKS)])dnl
+      [AC_OUTPUT_LINKS()])dnl
 ifset([AC_LIST_COMMANDS],
       [AC_OUTPUT_COMMANDS_COMMANDS()])dnl
 
index 5936096301a31c7553a78e99dbf76408197419f5..5856bba3868a39263a8076324ab2fa5363f4300d 100644 (file)
@@ -3021,22 +3021,35 @@ AC_DEFUN(AC_CONFIG_HEADER,
 [AC_CONFIG_HEADERS([$1])])
 
 
-dnl AC_CONFIG_LINKS(DEST:SOURCE...)
-dnl -------------------------------
+dnl AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS])
+dnl -------------------------------------------
 dnl Specify that config.status should establish a (symbolic if possible)
 dnl link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
 dnl Reject DEST=., because it is makes it hard for ./config.status
 dnl to guess the links to establish (`./config.status .').
 dnl This macro may be called multiple times.
+dnl
+dnl The commands are stored in a growing string AC_LIST_LINKS_COMMANDS
+dnl which should be used like this:
+dnl
+dnl      case $ac_file in
+dnl        AC_LIST_LINKS_COMMANDS
+dnl      esac
 AC_DEFUN(AC_CONFIG_LINKS,
 [AC_CONFIG_UNIQUE([$1])dnl
 ifelse(regexp([$1], [^\.:\| \.:]), -1,,
         [AC_FATAL([$0: invalid destination: `.'])])dnl
 m4_append([AC_LIST_LINKS], [$1])dnl
-])
+dnl Register the commands
+ifelse([$2],,, [AC_FOREACH([AC_File], [$1],
+[m4_append([AC_LIST_LINKS_COMMANDS],
+[    ]patsubst(AC_File, [:.*])[ ) $2 ;;
+])])])dnl
+])dnl
 
 dnl Initialize the list.
 define([AC_LIST_LINKS])
+define([AC_LIST_LINKS_COMMANDS])
 
 
 dnl AC_LINK_FILES(SOURCE..., DEST...)
@@ -3371,14 +3384,14 @@ dnl Because AC_OUTPUT_FILES is in charge of undiverting the AC_SUBST
 dnl section, it is better to divert it to void and *call it*, rather
 dnl than not calling it at all
 ifset([AC_LIST_FILES],
-      [AC_OUTPUT_FILES(AC_LIST_FILES)],
+      [AC_OUTPUT_FILES()],
       [AC_DIVERT_PUSH(AC_DIVERSION_KILL)dnl
-       AC_OUTPUT_FILES(AC_LIST_FILES)dnl
+       AC_OUTPUT_FILES()dnl
        AC_DIVERT_POP()])dnl
 ifset([AC_LIST_HEADERS],
-      [AC_OUTPUT_HEADERS(AC_LIST_HEADERS)])dnl
+      [AC_OUTPUT_HEADERS()])dnl
 ifset([AC_LIST_LINKS],
-      [AC_OUTPUT_LINKS(AC_LIST_LINKS)])dnl
+      [AC_OUTPUT_LINKS()])dnl
 ifset([AC_LIST_COMMANDS],
       [AC_OUTPUT_COMMANDS_COMMANDS()])dnl