Daiki Ueno wrote: > On a related note, this new test also fails when it is invoked as a > libtool wrapper script, because of the "lt-" prefix. > > $ ./gnulib-tool --create-testdir --dir t --libtool getprogname > $ cd t && ./configure > $ sed -i 's/^noinst_LTLIBRARIES +=/lib_LTLIBRARIES =/' gllib/Makefile.am > $ make && make check > > FAIL: test-getprogname > ====================== > > lt-test-getprogname: test-getprogname.c:29: main: Assertion `STREQ (p, > "test-getprogname" EXEEXT)' failed. > FAIL test-getprogname (exit status: 134)
This is not only a problem with the test. It's a problem with the deprecation of the 'progname' module. Previously, GNU gettext and other packages were using the idiom int main (int argc, char **argv) { set_program_name (argv[0]); ... if (...) { printf (_("Usage: %s [OPTION] ARGUMENT...), program_name); ... } ... } Now, the recommended idiom is int main (int argc, char **argv) { ... if (...) { printf (_("Usage: %s [OPTION] ARGUMENT...), getprogname ()); ... } ... } The consequence is that in packages that use GNU libtool, such programs will print "lt-prog" instead of "prog" in their usage message and other messages. This will disturb * the hacker who uses the programs before doing "make install", * the test suite. What are the possible solutions? I can see these: a) Modify the 'getprogname' module to strip a leading 'lt-' prefix (even on BSD and Cygwin platforms). b) Create a distinct module that is like 'getprogname' but also strips the 'lt-' prefix, and change the recommended idiom accordingly. c) Modify libtool to store the executables as .libs/lt/prog${EXEEXT} rather than .libs/lt-prog${EXEEXT}. Bruno -- Im memoriam Gisi Fleischmann <http://en.wikipedia.org/wiki/Gisi_Fleischmann>