[Top][All Lists]

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

Re: [bug-cflow] query on running cflow recursively on sub directories

From: Sergey Poznyakoff
Subject: Re: [bug-cflow] query on running cflow recursively on sub directories
Date: Wed, 28 Nov 2018 11:07:25 +0200

Hi Bish,

> I wanted to know if there is a way to run cflow recursively over
> sub-directorates.

There is no special command line option for that (and none is defined
by the POSIX standard, for what it matters). However, various approaches
exist to make this possible. One of them is used in GNU mailutils[1]. I'll
describe it in detail below.

This approach uses the macro features of GNU Make program. A special
subdirectory maint/ contains several makefiles for various maintenance
tasks. One of them is maint/flowgraph.mk, which defines the goal for
recursive traversal of all directories in the project[2]. The file is
included from the top-level maintainer makefile[3]. It is essential that
the main projet's makefile be included before it. If all the prerequisites
are satisfied, one can request creation of flowgraphs in each subdirectory
(accessible from the main makefile) by running

   make flowgraph

from the top-level directory.

The same approach should work with any makefile-controlled project,
provided that GNU Make is used.

Hope this helps.


[1] The project's git repository can be found at
[2] The file is available at
[3] <http://git.savannah.gnu.org/cgit/mailutils.git/plain/GNUmakefile>

reply via email to

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