chapel-lang/chapel — pull request #267 by bradcray (2014-08-30 00:02:54+00:00)
Title: Fix runtime tasks/threads TAGS

This change replaces some catch-all glob patterns that we were using to
get source files from the tasking and threading libraries into the
emacs TAGS (or vim ctags) files. For tasks=qthreads, threads=none,
the globs didn't match anything resulting in warnings at TAGS creation
time.

The fix taken here is to

(a) push the glob patterns for header files from the top-level
Makefile.help file down into the task- and thread-specific
Makefile.include files so that they can be more precise
about pointing to the files in question (if any). The only
real downside of doing this is that TAGS files should generally
process source (.c) files before header (.h) files in order
to take a TAGS surfer to the definition of a symbol rather than
its prototype. The current approach has the downside of
mixing .c files and .h files in the ALL_SRCS variable used to
create the TAGS. However, since each tasking/threading layer
gives its .c files first and then its .h files, I expect things
will still work out OK. If they didn't we could create an
ALL_HEADERS variable that each layer contributes to and then
have the tags command name ALL_SRCS before ALL_HEADERS.

(b) Had Qthreads point to the sources in third-party

(c) Had threads=none not list any files (left the pattern in the
file, commented out)

The only testing I did on this was to make sure that the various
tasking configurations built and created TAGS without warnings.

Further TODOs:

* looking at this, it's apparent that we don't include any .h
files in ALL_SRCS beyond those in tasks/ and threads/ (such
as comm/, mem/, atomics/, etc. These should be added into
ALL_SRCS as well. I didn't do so here primarily because it's
5pm on a Friday holiday weekend.

* Sung had a request to rename ALL_SRCS something like ALL_RUNTIME_SRCS
or possibly ALL_RUNTIME_TAG_SRCS to make its role clearer. I
forgot about that until I was typing this up (see previous note
about 5pm on a holiday weekend)