bug-m4
[Top][All Lists]
Advanced

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

Re: [search path] behavior difference.


From: Eric Blake
Subject: Re: [search path] behavior difference.
Date: Fri, 20 Sep 2013 12:11:34 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 09/20/2013 11:33 AM, serge wrote:
> 
> hello
> 
> There is a difference in the way "search path" is handle between
> m4-1.4.2  and  m4-1.4.14.
> 
>   - With m4-1.4.2   each m4 file that is include will be search by
> default in the current path and each path include by -I option.
> 
>   - With m4-1.14   only the first m4 file will be search in current and
> path include by -I option,  all other m4 file will be search in the path
> match by the first include m4 file.

Thanks for the report; however, I cannot reproduce it with only trivial
files, whether by command line usage or by inclusion via include:

$ m4 --version | head -n1
m4 (GNU M4) 1.4.16
$ mkdir a b
$ echo hi > b/f
$ echo bye > b/g
$ strace -e trace=open m4 -I a -I b f g
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("f", O_RDONLY)                     = -1 ENOENT (No such file or
directory)
open("a/f", O_RDONLY)                   = -1 ENOENT (No such file or
directory)
open("b/f", O_RDONLY)                   = 3
hi
open("g", O_RDONLY)                     = -1 ENOENT (No such file or
directory)
open("a/g", O_RDONLY)                   = -1 ENOENT (No such file or
directory)
open("b/g", O_RDONLY)                   = 3
bye
+++ exited with 0 +++
$ echo 'include(./f)include(./g)dnl' | strace -e trace=open m4 -I a -I b
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("./f", O_RDONLY)                   = -1 ENOENT (No such file or
directory)
open("a/./f", O_RDONLY)                 = -1 ENOENT (No such file or
directory)
open("b/./f", O_RDONLY)                 = 3
hi
open("./g", O_RDONLY)                   = -1 ENOENT (No such file or
directory)
open("a/./g", O_RDONLY)                 = -1 ENOENT (No such file or
directory)
open("b/./g", O_RDONLY)                 = 3
bye
+++ exited with 0 +++



> DEBIAN-SQUEEZE:strace -e trace=open  m4 -DconfOLEANE_OS=linux  -I../
> -I/usr/share/sendmail-dev/cf/  m4/cf.m4  cluster/mx-daemon.mc >
> cluster/mx-daemon.cf
> open("m4/cf.m4", O_RDONLY)              = -1 ENOENT (No such file or
> directory)
> open("../m4/cf.m4", O_RDONLY)           = -1 ENOENT (No such file or
> directory)
> open("/usr/share/sendmail-dev/cf/m4/cf.m4", O_RDONLY) = 3
> 
> open("/usr/share/sendmail-dev/cf/feature/oleane-name.m4", O_RDONLY) = -1
> ENOENT (No such file or directory)

I further note that 'feature/oleane-name.m4' is not specified on the
command line, but that you didn't list the contents of m4/cf.m4; if
there is any caching, it is most likely happening in the m4 code
embedded in m4/cf.m4 has changed between the two machines you are
testing on, rather than a bug in m4 itself.  I'm going to have to assume
this is not an m4 bug if you cannot provide more details to convince me
otherwise.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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