Re: FYI: loop in libtool m4 macros
Hi, On Mon, Jun 27, 2005 at 06:21:48PM +0200, Ralf Wildenhues wrote: > > ... where reasonable submit documentation patches to the > > Autoconf folks. > > > > m4sugar.m4 at least should have a documented API that libtool and others > > can use... > > Surely. I'm not volunteering for the documentation patches, no one is, that's the problem. ;-) > a preliminary list of macros used by Libtool macros [...] > not defined in autoconf.texi: Let me comment on some of them: > m4_bmatch This (and m4_bregexp and m4_bpatsubst) is an unfortunate name. The intention was like this: in future versions, m4 should use ERE (Extended Reg. Expr., like in egrep), so lets rename the original ones to m4_b*, as BRE (Basic R. E., like in grep). But m4 regular expressions are not BRE, even though they use \( \) for grouping. Unfortunately, this mistake was introduced in 2.53, and since then many people read the error message ``Don't use m4_patsubst, use patsubst or m4_bpatsubst instead.'' I don't know how to get out of this confusion. Perhaps we have to leave it as it is; m4_b* will denote the traditional m4 regexp versions, and m4_* will be the ERE versions. > m4_defun > m4_require Why do you use these and not AC_DEFUN and AC_REQUIRE? But I agree that these should be documented, for the non-Autoconf applications of m4sugar and m4sh. All other macros you netion in the first list should be documented, including: > mentioned in autoconf.texi, but not defined: > m4_default > not defined in autoconf.texi, but listed in m4.texi (renamed m4 builtins): > m4_ifdef > m4_pushdef These are documented implicitly, and in the latest CVS version they even go to the index, search for [EMAIL PROTECTED]''. So these are OK. Have a nice day, Stepan Kasal
Re: documenting m4sugar.m4 [WAS: loop in libtool m4 macros]
Stepan Kasal wrote: Hi, Howdy! On Mon, Jun 27, 2005 at 06:21:48PM +0200, Ralf Wildenhues wrote: > m4_defun > m4_require Why do you use these and not AC_DEFUN and AC_REQUIRE? But I agree that these should be documented, for the non-Autoconf applications of m4sugar and m4sh. In order to hide some of our internal macros from aclocal, they are defined with m4_defun. m4_defun and AC_REQUIRE don't play together, so we have to m4_require m4_defun'ed macros... Cheers, Gary. -- Gary V. Vaughan ())_. [EMAIL PROTECTED],gnu.org} Research Scientist ( '/ http://tkd.kicks-ass.net GNU Hacker / )= http://www.gnu.org/software/libtool Technical Author `(_~)_ http://sources.redhat.com/autobook signature.asc Description: OpenPGP digital signature
Re: documenting m4sugar.m4 [WAS: loop in libtool m4 macros]
Hello Gary, On Tue, Jun 28, 2005 at 10:58:05AM +0100, Gary V. Vaughan wrote: > In order to hide some of our internal macros from aclocal, they are > defined with m4_defun. Thanks for explanation. Interesting. Since aclocal doesn't do any tracing, the following could work too: m4_copy([AC_DEFUN], [LT_DEFUN]) > m4_defun and AC_REQUIRE don't play together, Well, actually they do, as the AC_* macros are just an aliases, but I see what you mean. Yet another solution might be to m4_define the macros and then use m4_expand_once. But yes, m4_defun and m4_reauire should be documented, so there is no need to change the current code. Regards, Stepan
Re: FYI: loop in libtool m4 macros
Hi Stepan, * Stepan Kasal wrote on Tue, Jun 28, 2005 at 11:22:00AM CEST: > On Mon, Jun 27, 2005 at 06:21:48PM +0200, Ralf Wildenhues wrote: > > > ... where reasonable submit documentation patches to the > > > Autoconf folks. > > > > > > m4sugar.m4 at least should have a documented API that libtool and others > > > can use... > > > > Surely. I'm not volunteering for the documentation patches, > > no one is, that's the problem. ;-) Well, part of my refusal is that I am both not very good at writing documentation in general, then also in English, the other part is that I don't understand the stuff well enough. > > a preliminary list of macros used by Libtool macros [...] > > not defined in autoconf.texi: > > Let me comment on some of them: > > > m4_bmatch > > This (and m4_bregexp and m4_bpatsubst) is an unfortunate name. *snip* > I don't know how to get out of this confusion. > Perhaps we have to leave it as it is; m4_b* will denote the traditional m4 > regexp versions, and m4_* will be the ERE versions. Just to put this into perspective: Libtool branch-1-5 merely makes use of: m4_define m4_ifdef m4_ifndef So, if Autoconf has any macros in that list which Libtool should not use at all/under that name, nothing is really lost before we release 2.0. > > m4_defun > > m4_require > > Why do you use these and not AC_DEFUN and AC_REQUIRE? Gary? > But I agree that these should be documented, for the non-Autoconf applications > of m4sugar and m4sh. > > All other macros you netion in the first list should be documented, including: *snip* Thanks, Ralf
A few tiny patches
Hi all, the following three tiny patches still waited on my disk. Stepan 2005-06-28 Stepan Kasal <[EMAIL PROTECTED]> * clcommit.m4sh: "grep|sed" can be replaced by mere "sed". * m4/libtool.m4 (_LT_LIBTOOL_TAGS): Remove unnnecessary "[]". * m4/lt~obsolete.m4: Use m4_ifndef. Index: clcommit.m4sh === RCS file: /cvsroot/libtool/libtool/clcommit.m4sh,v retrieving revision 1.9 diff -u -r1.9 clcommit.m4sh --- clcommit.m4sh 22 Apr 2005 10:10:29 - 1.9 +++ clcommit.m4sh 28 Jun 2005 10:51:12 - @@ -409,7 +409,7 @@ sleep 1 # give the user some time for a ^C - subject=`cvs -nq up 2>/dev/null | grep '^[[MAD]] ' | $SED 's/^. //'` + subject=`cvs -nq up 2>/dev/null | $SED -n 's/^[[MAD]] //p'` test $# -gt 0 && subject="$@" fi Index: m4/libtool.m4 === RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v retrieving revision 1.197 diff -u -r1.197 libtool.m4 --- m4/libtool.m4 18 Jun 2005 16:49:52 - 1.197 +++ m4/libtool.m4 28 Jun 2005 10:51:13 - @@ -406,7 +406,7 @@ # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="[]_LT_TAGS[]"dnl +available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) Index: m4/lt~obsolete.m4 === RCS file: /cvsroot/libtool/libtool/m4/lt~obsolete.m4,v retrieving revision 1.8 diff -u -r1.8 lt~obsolete.m4 --- m4/lt~obsolete.m4 8 Jan 2005 21:17:57 - 1.8 +++ m4/lt~obsolete.m4 28 Jun 2005 10:51:13 - @@ -29,33 +29,33 @@ # Anytime we withdraw an AC_DEFUN or AU_DEFUN, but still refer to it, # remember to add it here. -m4_ifdef([AC_LIBTOOL_LINKER_OPTION],, [AU_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifdef([AC_PROG_EGREP],, [AU_DEFUN([AC_PROG_EGREP])]) -m4_ifdef([_LT_AC_PROG_ECHO_BACKSLASH],, [AU_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifdef([_LT_AC_SHELL_INIT],, [AU_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifdef([_LT_AC_SYS_LIBPATH_AIX],,[AU_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifdef([_LT_PROG_LTMAIN],, [AU_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifdef([_LT_AC_TAGVAR],, [AU_DEFUN([_LT_AC_TAGVAR])]) -m4_ifdef([AC_LTDL_ENABLE_INSTALL],,[AU_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifdef([AC_LTDL_PREOPEN],, [AU_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifdef([_LT_AC_SYS_COMPILER],, [AU_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifdef([_LT_AC_LOCK],, [AU_DEFUN([_LT_AC_LOCK])]) -m4_ifdef([AC_LIBTOOL_SYS_OLD_ARCHIVE],, [AU_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifdef([_LT_AC_TRY_DLOPEN_SELF],,[AU_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifdef([AC_LIBTOOL_PROG_CC_C_O],,[AU_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifdef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],, [AU_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifdef([AC_LIBTOOL_OBJDIR],, [AU_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifdef([AC_LTDL_OBJDIR],,[AU_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifdef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],, [AU_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifdef([AC_LIBTOOL_SYS_LIB_STRIP],, [AU_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifdef([AC_PATH_MAGIC],, [AU_DEFUN([AC_PATH_MAGIC])]) -m4_ifdef([AC_PROG_LD_GNU],,[AU_DEFUN([AC_PROG_LD_GNU])]) -m4_ifdef([AC_PROG_LD_RELOAD_FLAG],,[AU_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifdef([AC_DEPLIBS_CHECK_METHOD],, [AU_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifdef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],, [AU_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifdef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],, [AU_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifdef([AC_LIBTOOL_PROG_COMPILER_PIC],, [AU_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifdef([AC_LIBTOOL_PROG_LD_SHLIBS],, [AU_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifdef([AC_LIBTOOL_POSTDEP_PREDEP],, [AU_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifdef([LT_AC_PROG_EGREP],, [AU_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifdef([LT_AC_PROG_SED],,[AU_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AU_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AU_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AU_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AU_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],[AU_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AU_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AU_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL],[AU_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AU_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER