Re: Code coverage report for groff 1.24.0pre -- thanks, gnulib!

Collin Funk <[email protected]>
Newsgroups gmane.comp.printing.groff.general,gmane.comp.lib.gnulib.bugs
Message-ID <[email protected]>
Hi Branden,

"G. Branden Robinson" <[email protected]> writes:

> Nope.
>
> $ make -C build TAGS
> make: Entering directory '/home/branden/src/GIT/groff/build'
> make[1]: Entering directory '/home/branden/src/GIT/groff/build'
> make[1]: *** No rule to make target 'src/utils/pfbtops/dummy.cpp', needed by 'tags-am'.  Stop.
> make[1]: Leaving directory '/home/branden/src/GIT/groff/build'
> make: *** [Makefile:13257: tags-recursive] Error 1
> make: Leaving directory '/home/branden/src/GIT/groff/build'
>
> Is seems like there is _some_ sort of infrastructure there; I didn't ask
> for no "tags-am" prerequisite.  Is this a bug?

"tags-am" is an internal target used by Automake. The "TAGS" target
conditionally depends on "tags-am" or another target if SUBDIRS are
used.

Looking at this comment:

    $ grep -FB2 dummy.cpp src/utils/pfbtops/pfbtops.am 
    # We use the following trick to force the use of C++ compiler
    # See the Automake manual, "Libtool Convenience Libraries"
    nodist_EXTRA_pfbtops_SOURCES = src/utils/pfbtops/dummy.cpp

It looks like this trick also breaks all of the different tags targets,
since it adds a non-existent file to $(am__tagged_files).

You can probably fix it by creating an empty file
src/utils/pfbtops/dummy.cpp.

>> I like GNU global. :)
>
> You're the first person I've heard mention it beyond GNU release
> announcements, which I generally file away for later investigation and
> then never get around to.  Give me the elevator pitch, as it applies to
> you.  :)

Truthfully, I probably use 'grep -r' a bit more. But global is nice when
that catches too many irrelevant matches.

In coreutils:

    $ $ make GTAGS
    here=`CDPATH="${ZSH_VERSION+.}:" && cd . && pwd` \
      && CDPATH="${ZSH_VERSION+.}:" && cd . \
      && gtags -i  "$here"

Finding references to the find_mount_point function:

    $ global -rx find_mount_point
    find_mount_point 1426 src/df.c               char *mp = find_mount_point (point, statp);
    find_mount_point   19 src/find-mount-point.h extern char *find_mount_point (char const *, struct stat const *)
    find_mount_point 1020 src/stat.c         if ((mp = find_mount_point (filename, statp)))

Finding the definition:

    $ global -dx find_mount_point
    find_mount_point   30 src/find-mount-point.c find_mount_point (char const *file, struct stat const *file_stat)

That is all I need 99% of the time. There are integrations for Emacs and
other editors, but typing them in a terminal isn't slow enough for me to
be motivated enough to figure out keybinds for them. :)

Collin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.