ford
ford copied to clipboard
including source from include files
I have a number of procedures each in their own file of the form NAME.inc which are all components of a module, that includes them all. I can specify the include directories with include: and the documentation for the routines appears to be correct (a lot were missing without using include: ). I get the source to show if I add "inc" as an extension, but then I get duplicates, one from the INCLUDE in the module, one from the .inc file and the diagrams become confused). So it does not look like duplicates are reduced before processing. I wanted the include files to be able to show the source with the procedure documentation. Is there a combination that would work for this? I have not found an option combination that does what I want. I want to not use a suffix like .f90 for the .inc files as that confuses the build system I am using, at least using the current file layout. I am placing this as an issue instead of a usage question as I believe there is not a way to do it currently, but that if the files were reduced to get rid of the duplicates it might work.
The project I am trying this with can be found at
https://github.com/jacobwilliams/odepack
I'm a bit surprised that the source for procedures in include
d files isn't shown -- that sounds like a bug. I'll try and investigate
I don't think that squashing these as duplicates is an option though, I'm afraid, as it's perfectly possible to have procedures with the same name, one in a module and one in a non-module file. It might cause problems at link-time, but ford doesn't know about that.
The problem is that while include
statements are processed when building up the documentation, when it comes to include the source, only the unprocessed source files are read and searched for the relevant procedure.
We'll have to think about how to deal with that. One could imagine not wanting to always read include
files
This is unlikely to change until we have a new parser which can provide accurate source location information. Unfortunately a recent application for funding to develop such a parser was unsuccessful. We'll have to see if other opportunities arise.
On Mon, Feb 7, 2022 at 10:49 AM Peter Hill @.***> wrote:
The problem is that while include statements are processed when building up the documentation, when it comes to include the source, only the unprocessed source files are read and searched for the relevant procedure.
We'll have to think about how to deal with that. One could imagine not wanting to always read include files
— Reply to this email directly, view it on GitHub https://github.com/Fortran-FOSS-Programmers/ford/issues/386#issuecomment-1031329285, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6ESPJG65JGZ5ECR7Q3NZ3UZ6PS5ANCNFSM5NVNOEGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Chris MacMackin