autoconf-patches
[Top][All Lists]
Advanced

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

Re: maintainer checks


From: Paul Eggert
Subject: Re: maintainer checks
Date: Tue, 04 Apr 2006 17:37:28 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

> -     @grep -nE '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] &&         \
> +     @grep -nE '\<free \(\('                                         \
> +         $(srcdir)/{lib,src}/*.[chly] /dev/null 2>/dev/null &&       \

How about if we use 'shopt -s nullglob' instead?  That way, we don't
have to have the '2>/dev/null', and we catch a problem if a file is
unreadable (e.g., dangling symlink).  shopt isn't portable, but surely
we can assume Bash here.

We can do this systematically, even for files that don't glob now.
For example, instead of:

        @sed -n '/^# *include /s///p' $(srcdir)/src/system.h            \
                /dev/null 2>/dev/null                                   \
        ...

we can have this:

        @shopt -s nullglob;                                             \
        sed -n '/^# *include /s///p' $(srcdir)/src/system.[h] /dev/null \
        ...

>  sc_changelog:
> -     @grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) &&    \
> +     @sed '/^-----/,$$d' $$(find . -maxdepth 2 -name ChangeLog)      \

Shouldn't there be a /dev/null here too, in case there are no ChangeLog
files at all?

> -     @sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
> -       | grep -Ev 'sys/(param|file)\.h' \
> +     @sed -n '/^# *include /s///p' $(srcdir)/src/system.h            \
> +             /dev/null 2>/dev/null                                   \

If you don't like my shopt -s nullglob suggestion above, then the
/dev/null is not needed here (and in similar places).




reply via email to

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