libtool-patches
[Top][All Lists]
Advanced

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

Re: 319-gary-refactor-m4sh-rules


From: Gary V. Vaughan
Subject: Re: 319-gary-refactor-m4sh-rules
Date: Wed, 7 Mar 2007 00:31:58 -0800

On 6 Mar 2007, at 14:23, Ralf Wildenhues wrote:
Hello Gary,

Hallo Ralf,

Thanks for the review.

* Gary V. Vaughan wrote on Tue, Mar 06, 2007 at 08:33:50PM CET:
This makes code sharing with forthcoming func_version test cases easier.

Okay to commit?

IMHO this is definitely post 2.0: it doesn't fix an important bug.

It is not touching much code at all though, and without doing it this
way, I'll need to copy and paste the m4sh -> in -> sh rules into the test case, which will mean manually keeping it all in synch, and that the test
itself won't actually exercise the live code.  (Not to mention that
without the patch we already have to manually synch several copies of
the same code in the existing Makefile.am implementation).

Moreover it's wrong, too: the $(srcdir) are there for a reason.
Sorry.

It was my understanding that the $(srcdir) are required on the left
of the ':' in a rule, but not on the right.  From Autoconf manual
11.13.5:

  It seems the sole solution that would please every `make'
  implementation is to never rely on `VPATH' searches for targets.  In
  other words, `VPATH' should be reserved to unbuilt sources.

If I'm correct, then I've just removed a little unnecessary fluff
from the right hand sides.  If I'm wrong, then there was already
enough inconsistency that things would have already been broken by
missing $(srcdir) on the right in other rules.  In either case, I'd
still like to commit the factoring parts of the patch.

If you're out to relax the requirement for GNU make, then I suggest
you give some information as to which make implementations you have
successfully tested with.

Nope.  Although now you mention it, I believe we're already requiring
GNU make for VPATH builds, no?  In which case, we can remove the
$(srcdir) fluff and repeated associated comments from the left side
of ':' in several rules.  The first non-GNU system I tried (on irix,
which has a SYSV4 based make) with a fresh HEAD checkout (bootstrapped
with automake-1.10, autoconf-2.60) blows up pretty fast from a VPATH
build, failing to find a source file:

  $ cd +mips-sgi-irix6.5
  $ ../configure
  [[...]]
  $ make
  [[...]]
/bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H - I. -I.. -DLT_CONFIG_H='<config.h>' -DLTDL -I. -I.. -Ilibltdl -I../ libltdl -I../libltdl/libltdl -g -c -o libltdl/loaders/dlopen.lo libltdl/loaders/dlopen.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. "- DLT_CONFIG_H=<config.h>" -DLTDL -I. -I.. -Ilibltdl -I../libltdl -I../ libltdl/libltdl -g -c libltdl/loaders/dlopen.c -DPIC -o libltdl/ loaders/.libs/dlopen.o
  cc ERROR:  file does not exist:  libltdl/loaders/dlopen.c
  *** Error code 1 (bu21)
  *** Error code 1 (bu21)
  *** Error code 1 (bu21)
  $ ls libltdl/loaders
  libltdl_libltdl_la-preopen.lo  libltdl_libltdl_la-preopen.o
  $ ls ../libltdl/loaders
  CVS            dlopen.c       load_add_on.c  preopen.c
  dld_link.c     dyld.c         loadlibrary.c  shl_load.c

Compared to an otherwise identical in-tree build:

  $ cd ..
  $ ./configure
  [[...]]
  $ make
  [[...]]
  $ echo $?
  0
  $ gmake MAKE=gmake
  gmake  all-recursive
gmake[1]: Entering directory `/home/gary/devel/savannah/libtool-- devo--0' gmake[2]: Entering directory `/home/gary/devel/savannah/libtool-- devo--0' gmake[2]: Leaving directory `/home/gary/devel/savannah/libtool-- devo--0' gmake[1]: Leaving directory `/home/gary/devel/savannah/libtool-- devo--0'

I did test pretty thoroughly with gmake from a fresh checkout with only
this patch applied and in my dev tree with just this patch applied and
leaving all the file debris from previous builds still laying around, with
both in-tree and VPATH builds, and I haven't introduced any regressions.

  from  Gary V. Vaughan  <address@hidden>
        Factorize make rules used for m4sh sources:

        * Makefile.am (EXTRA_DIST, libtoolize, libtool):  No need to
        explicitly name $(srcdir) in dependencies, VPATH will look there
        automatically.
        (SUFFIXES, .m4sh.in, .m4sh.sh): New suffix rules...
        ($(srcdir)/tests/defs, $(srcdir)/$(auxdir)/ltmain.sh): ...factored
        out from here...
        ($(srcdir)/tests/defs.in): ...and here.
        * Makefile.maint (.SUFFIXES): Add explicitly for bootstrap, as
        bootstrap's quick-n-dirty Makefile doesn't have the correct
        syntax.
        (.in.tmp): New suffix rule...
        ($(srcdir)/commit, $(srcdir)/mailnotify): ...factored out from
        here.

Cheers,
        Gary
--
  ())_.              Email me: address@hidden
  ( '/           Read my blog: http://blog.azazil.net
  / )=         ...and my book: http://sources.redhat.com/autobook
`(_~)_ Join my AGLOCO Network: http://www.agloco.com/r/BBBS7912




Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

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