libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bootstrap update; pdksh specialties (was: the ltdl issue(s))


From: Ralf Wildenhues
Subject: bootstrap update; pdksh specialties (was: the ltdl issue(s))
Date: Fri, 2 Sep 2005 16:39:27 +0200
User-agent: Mutt/1.4.1i

Hi Patrick, others,

* Patrick Welche wrote on Thu, Sep 01, 2005 at 08:22:12PM CEST:
> On Thu, Sep 01, 2005 at 03:51:08PM +0200, Ralf Wildenhues wrote:
> > 
> > Even better: MAKE=gmake /bin/sh -vx ./bootstrap
> 
> You know my setup too well ;-)

For the other readers:  Patrick and I have been going over a couple of
issues off-list, as I did not want to spam the list with numerous mails
not knowing what was going on and asking random questions.  Here is a
summary of the findings and a patch.

> > One with a broken `make', and a `find' without `-path', I guess.
> > The rest should be followup failures.
> 
> My find claims to have -path, but I also cvs updated in the meantime
> which meant I have your patch anyway.
> 
> End result: all happy, and I have built a libtool.. now back to that
> demo-noinst-link.test ;-)

This was the first issue we stumbled over: demo-noinst-link.test failed
mysteriously on a NetBSD box.  We could trace that part down to a local
modification of Autoconf's _AS_BOURNE_COMPATIBLE: it disabled posix mode
for pdksh instead of enabling it, to work around the pdksh bug described
in "info Autoconf Shellology".  I'm describing this because it causes
subtly different behavior at random places, and had me stunned for a
while.

The second issue is a SHELL-related one: when /bin/csh is the user
shell, "make check" tries to execute "/bin/csh tests/demo/configure..",
which is obviously bogus, and fixed by setting SHELL in
TESTS_ENVIRONMENT.  The same issue needs overriding in bootstrap, and I
think allowing the user an override of our "SHELL=/bin/sh" by setting
CONFIG_SHELL is a sane choice here.

In order to work with NetBSD make, bootstrap needs to call the targets
it builds with the names as listed, i.e., leading "$srcdir/" aka "./".

The "rm -rf" change is more or less to avoid warnings, when no arguments
are given (use of -exec), and the tree is walked in correct order (use
of -depth).

The last issue is that the "bootstrap" script is supposed to be usable
on tarballs, and thus needs to also generate the fake "libtoolize"
there, unlike the commit and mailnotify scripts.  (I believe the
previous test of clcommit.m4sh at this point was simply an error: the
following chmod of the script was not conditionalized on this test.)

OK to commit?

Cheers,
Ralf

        * Makefile.am (TESTS_ENVIRONMENT): Export SHELL.
        * bootstrap (SHELL): Set to $CONFIG_SHELL or /bin/sh.
        Name `make' targets in portable fashion.  Work around `rm'
        warnings.  Unconditionally create fake `libtoolize'.
        Reported by Patrick Welche <address@hidden>.

Index: Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/Makefile.am,v
retrieving revision 1.159
diff -u -r1.159 Makefile.am
--- Makefile.am 29 Aug 2005 14:37:56 -0000      1.159
+++ Makefile.am 2 Sep 2005 14:19:18 -0000
@@ -480,7 +480,8 @@
 TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
        CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
        LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
-       OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" CONFIG_SHELL="$(SHELL)" \
+       OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
+       SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \
        CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CXXCPP="$(CXXCPP)" \
        F77="$(F77)" FFLAGS="$(FFLAGS)" \
        FC="$(FC)" FCFLAGS="$(FCFLAGS)" \
Index: bootstrap
===================================================================
RCS file: /cvsroot/libtool/libtool/bootstrap,v
retrieving revision 1.67
diff -u -r1.67 bootstrap
--- bootstrap   1 Sep 2005 14:15:29 -0000       1.67
+++ bootstrap   2 Sep 2005 14:19:18 -0000
@@ -24,6 +24,8 @@
 # better features, and configure.ac documents oldest version of each
 # required for bootstrap (AC_PREREQ, and AM_INIT_AUTOMAKE).
 
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
 : ${AUTORECONF=autoreconf}
 : ${AUTOM4TE=autom4te}
 : ${MAKE=make}
@@ -63,7 +65,8 @@
 WARNING: `lt~obsolete.m4').  After that, retry this bootstrap.
 EOF
 
-rm -rf `find . -name '{arch}' -prune -o \( -name autom4te.cache -o -name 
libtool \) -print`
+find . -name '{arch}' -prune -o \( -name autom4te.cache -o -name libtool \) \
+       -depth -exec rm -rf \{\} \;
 
 # Delete stale files from previous libtool versions.
 rm -f acinclude.m4 libltdl/config.h
@@ -95,27 +98,27 @@
 # configure, and ltversion.m4 to generate configure in the first place:
 rm -f $auxdir/ltmain.sh $m4dir/ltversion.m4
 
-$MAKE $auxdir/ltmain.sh $m4dir/ltversion.m4 ./doc/notes.txt \
+$MAKE ./$auxdir/ltmain.sh ./$m4dir/ltversion.m4 ./doc/notes.txt \
     ./libtoolize.in ./tests/defs.in ./tests/package.m4 \
     ./tests/testsuite ./libltdl/Makefile.am \
     srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" \
     PACKAGE_BUGREPORT="address@hidden" M4SH="$AUTOM4TE --language=m4sh" \
     AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO"
 
-test -f clcommit.m4sh && $MAKE -f Makefile.maint commit \
+test -f clcommit.m4sh && $MAKE -f Makefile.maint ./commit \
     srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="$AUTOM4TE -l m4sh" \
     SED="$SED" GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"
 
 rm -f Makefile
 
 # Make a dummy libtoolize script for autoreconf:
-test -f clcommit.m4sh && cat > $auxdir/libtoolize <<'EOF'
+cat > $auxdir/libtoolize <<'EOF'
 #! /bin/sh
 # This is a dummy file for bootstrapping CVS libtool.
 echo "$0: Bootstrap detected, no files installed." | sed 's,^.*/,,g'
 exit 0
 EOF
 chmod 755 $auxdir/libtoolize
 
 # Running the installed `libtoolize' will trash the local (newer) libtool.m4
 # among others.  Call the dummy script we made earlier.
@@ -152,7 +150,7 @@
 WARNING: of \`sed', \`grep' etc. like this:
 WARNING:
 WARNING:      rm -f commit $auxdir/mailnotify
-WARNING:      make -f Makefile.maint commit $auxdir/mailnotify
+WARNING:      make -f Makefile.maint ./commit ./$auxdir/mailnotify
 EOF
 
 exit 0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]