Re: libtoolize bugs in HEAD

2005-03-29 Thread Gary V. Vaughan
Hallo Ralf!

Ralf Wildenhues wrote:
 No time for looking now, but libtoolize HEAD contains
 
 # Massage a value for pkgvltdl_files from the value used in Makefile.am
 for my_filename in make[1]: Entering directory 
 `/tmp/build-x86_64/libltdl' COPYING.LIB README Makefile.am Makefile.in 
 configure.ac configure ltdl.c ltdl.h lt_error.c libltdl/lt_error.h 
 libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_system.h lt__alloc.c 
 libltdl/lt__alloc.h libltdl/lt__glibc.h libltdl/lt__dirent.h slist.c 
 libltdl/slist.h lt_dlloader.c libltdl/lt_dlloader.h loaders/preopen.c 
 lt__dirent.c libltdl/lt__dirent.h lt__strl.c libltdl/lt__strl.h argz_.h 
 argz.c loaders/Makefile.am loaders/Makefile.in loaders/dld_link.c 
 loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c 
 loaders/shl_load.c make[1]: Leaving directory `/tmp/build-x86_64/libltdl'; do

I can't reproduce this:

] cvs -d `cat libtool--devo--1.0/CVS/Root` co -d HEAD libtool
...
] cd HEAD
] ./bootstrap
...
] mkdir +build  cd +build
] ../configure
...
] make
...
] fgrep COPYING.LIB libtoolize
for my_filename in COPYING.LIB README Makefile.am Makefile.in configure.ac
configure ltdl.c ltdl.h lt_error.c libltdl/lt_error.h libltdl/lt__private.h
libltdl/lt__strl.h libltdl/lt_system.h lt__alloc.c libltdl/lt__alloc.h
libltdl/lt__glibc.h libltdl/lt__dirent.h slist.c libltdl/slist.h lt_dlloader.c
libltdl/lt_dlloader.h loaders/preopen.c lt__dirent.c libltdl/lt__dirent.h
lt__strl.c libltdl/lt__strl.h argz_.h argz.c loaders/Makefile.am
loaders/Makefile.in loaders/dld_link.c loaders/dlopen.c loaders/dyld.c
loaders/load_add_on.c loaders/loadlibrary.c loaders/shl_load.c; do
] cd ..
] rm -rf +build
] ./configure
...
] make
...
] fgrep COPYING.LIB libtoolize
for my_filename in COPYING.LIB README Makefile.am Makefile.in configure.ac
configure ltdl.c ltdl.h lt_error.c libltdl/lt_error.h libltdl/lt__private.h
libltdl/lt__strl.h libltdl/lt_system.h lt__alloc.c libltdl/lt__alloc.h
libltdl/lt__glibc.h libltdl/lt__dirent.h slist.c libltdl/slist.h lt_dlloader.c
libltdl/lt_dlloader.h loaders/preopen.c lt__dirent.c libltdl/lt__dirent.h
lt__strl.c libltdl/lt__strl.h argz_.h argz.c loaders/Makefile.am
loaders/Makefile.in loaders/dld_link.c loaders/dlopen.c loaders/dyld.c
loaders/load_add_on.c loaders/loadlibrary.c loaders/shl_load.c; do

Perhaps you have out of date Makefile.in or mismatched bootstrap script?

 and thus breaks horribly.  That fixed, an installed version moans about
 
 /tmp/install/libtool-2.1/bin/libtoolize --copy --force --install -I m4

This is telling libtoolize to find the master sources in ./m4 rather than
$prefix/share/libtool-2.1a.  The macros will be installed to whichever
directory is specified as an argument of option -I in ACLOCAL_AMFLAGS in
Makefile.am, or else in AC_CONFIG_MACRO_DIR if ACLOCAL_AMFLAGS is not defined.

 /tmp/install/libtool-2.1/bin/libtoolize: line 644: cd: m4/libltdl: No such 
 file or directory

libtoolize is warning that the new master source directory doesn't seem to
contain the libltdl dir.  This might mean that your tmp/install libtoolize
script has pkgvdatadir et. al. pointing at a non-existent directory.

 libtoolize: copying file `./config.guess'
 libtoolize: copying file `./config.sub'

Although it is copying files from somewhere... can you investigate this please?

 libtoolize: warning: no serial number in 
 `/tmp/install/libtool-2.1/share/libtool-2.1a/install-sh', not copying.

Hmmm... seems like the version timestamp variable in install-sh has a
different name to the one I tested with.  I'll post a patch presently.

Do you want me to make any changes to gary--1.0--patch-11 before committing
to HEAD btw?

 libtoolize: copying file `./ltmain.sh'
 
 of which at least the second one looks quite fishy.

Good catch.

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


fix libtoolize serial comparisons [libtool--gary--1.0--patch-12]

2005-03-29 Thread Gary V. Vaughan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Patch against HEAD -- actually against my dev branch which already has
- --patch-11 applied, so this patch may not apply cleanly directly to
HEAD (sans --patch-11).

Okay to commit and backport to branch-2-0?

Fix problems with serial comparison sed scripts, and factor out
common code from similar serial comparison functions:

* libtoolize.m4sh (func_keyword_update): Common code factored out
of func_ltmain_update and func_config_update.
(func_ltmain_update, func_config_update): Adjust, and fix sed
expressions to not use unportable ? modifier.
(func_install_update): New serial number based file updater keyed
of 'scriptversion' variable in install-sh.  Adjust all callers.

- -- 
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
_
This patch notification generated by tlaapply version 0.9
http://tkd.kicks-ass.net/arch/[EMAIL PROTECTED]/cvs-utils--tla--1.0
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCSa2OFRMICSmD1gYRAqS/AJwOomUquE/I8QpUkNELOLqCyWtnhQCaAm3m
s8h62yzVEVsqG3L+asfCqOE=
=uLJr
-END PGP SIGNATURE-
* looking for [EMAIL PROTECTED]/libtool--gary--1.0--patch-11 to compare with
* comparing to [EMAIL PROTECTED]/libtool--gary--1.0--patch-11
M  libtoolize.m4sh
M  ChangeLog

* modified files

Index: Changelog
from  Gary V. Vaughan  [EMAIL PROTECTED]

	Fix problems with serial comparison sed scripts, and factor out
	common code from similar serial comparison functions:

	* libtoolize.m4sh (func_keyword_update): Common code factored out
	of func_ltmain_update and func_config_update.
	(func_ltmain_update, func_config_update): Adjust, and fix sed
	expressions to not use unportable ? modifier.
	(func_install_update): New serial number based file updater keyed
	of 'scriptversion' variable in install-sh.  Adjust all callers.

--- orig/libtoolize.m4sh
+++ mod/libtoolize.m4sh
@@ -678,24 +678,23 @@
 }
 
 
-# func_ltmain_update filename srcdir destdir
+# func_keyword_update filename srcdir destdir sed_script
 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
-# has a newer revision, or DESTFILE does not yet exist, or the user
-# specified `--force' at the command line.
-func_ltmain_update ()
+# has a newer revision according to the serial number extracted by
+# SED_SCRIPT, or DESTFILE does not yet exist, or the user specified
+# `--force' at the command line.
+func_keyword_update ()
 {
 $opt_debug
 my_filename=$1
 my_srcdir=$2
 my_destdir=$3
+my_sed_script=$4
 
 my_srcfile=$my_srcdir/$my_filename
 my_destfile=$my_destdir/$my_filename
 
-my_update_p=:
-my_sed_ltmain=['/^package_revision=[0-9][1-9.]*/ {
-  s,^package_revision=\([0-9.]*\)[ 	]*$,\1,; p;
-}; d']
+my_keyword_update_p=:
 
 test -f $my_srcfile || {
   func_error \`$my_srcfile' does not exist.
@@ -703,21 +702,21 @@
 }
 
 if test -f $my_destfile; then
-  my_src_serial=`$SED -e $my_sed_ltmain $my_srcfile`
+  my_src_serial=`$SED -e $my_sed_script $my_srcfile`
   test -z $my_src_serial  {
 func_error warning: no serial number in \`$my_srcfile', not copying.
 	return
   }
 
-  my_dest_serial=`$SED -e $my_sed_ltmain $my_destfile`
+  my_dest_serial=`$SED -e $my_sed_script $my_destfile`
   test -n $my_dest_serial || my_dest_serial=0
 
   func_serial_update_check \
  $my_srcfile $my_src_serial $my_destfile $my_dest_serial
-  my_update_p=$func_serial_update_check_result
+  my_keyword_update_p=$func_serial_update_check_result
 fi
 
-if $my_update_p || $opt_force; then
+if $my_keyword_update_p || $opt_force; then
   func_copy $my_srcfile $my_destfile
 elif test X$my_dest_serial = X$my_src_serial; then
   $opt_quiet \
@@ -726,6 +725,23 @@
 }
 
 
+# func_ltmain_update filename srcdir destdir
+# Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
+# has a newer revision, or DESTFILE does not yet exist, or the user
+# specified `--force' at the command line.
+func_ltmain_update ()
+{
+$opt_debug
+my_sed_ltmain=['/^package_revision='\''*[0-9][1-9.]*'\''*/ {
+  s,^package_revision='\''*\([0-9.]*\)'\''*[ 	]*$,\1,; p;
+}; d']
+
+func_keyword_update $1 $2 $3 $my_sed_ltmain
+
+return $my_return_status
+}
+
+
 # func_config_update filename srcdir destdir
 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
 # has a newer timestamp, or DESTFILE does not yet exist, or the user
@@ -733,44 +749,30 @@
 func_config_update ()
 {
 $opt_debug
-my_filename=$1
-my_srcdir=$2
-my_destdir=$3
-
-my_srcfile=$my_srcdir/$my_filename
-my_destfile=$my_destdir/$my_filename