Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-09

Is it possible to use top directory of subtree with -Fu -Fi -Fl options?

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi all,

(I just registered in this list, so I don’t know if this question has come up before, and the list archives do not seem seem to a search capability.)

I have a long list of subdirectories for ‘include’ and ‘units’ but they all are organized under a single subdirectory. For example,

\progs\pascal\units\a
\progs\pascal\units\b
\progs\pascal\units\c
\progs\pascal\units\d
\progs\pascal\units\e

Is it possible to somehow tell FPC to look into every subdirectory of \progs\pascal\units rather than specify the full path of each subdirectory separately?

For example, could something equivalent to \progs\pascal\units\* be used to? (This I tried, it didn’t work.)

TIA

leledumbo
to Unknown author
For example, could something equivalent to \progs\pascal\units\* be used

to? (This I tried, it didn’t work.)

It should. Try compiling with -vt, you'll see how the compiler looks for files. My fpc.cfg only has single line of -Fu, yet the unit directories are organized exactly the way your layout looks like. I even works for all my cross targets as well.

Tony Papadimitriou
to leledumbo

OK, I think I realized what the problem is. The * will apparently search in all subdirectories but (apparently again) one level deep. So, if you have something like:

\progs\pascal\units\a
\progs\pascal\units\a\b

and you give -Fu\progs\pascal\units\*
it will look in \progs\pascal\units\a but not in \progs\pascal\units\a\b

So, is there a way to do this, i.e., specify the 'root' director for your units/includes and have it look at all files underneath regardless of nesting level?

Earlier message 23 lines
-----Original Message----- From: leledumbo Sent: Sunday, September 28, 2014 6:16 PM To: Subject: Re: [fpc-pascal] Is it possible to use top directory of subtree with -Fu -Fi -Fl options? > For example, could something equivalent to \progs\pascal\units\* be used to? (This I tried, it didn’t work.) It should. Try compiling with -vt, you'll see how the compiler looks for files. My fpc.cfg only has single line of -Fu, yet the unit directories are organized exactly the way your layout looks like. I even works for all my cross targets as well. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Is-it-possible-to-use-top-directory-of-subtree-with-Fu-Fi-Fl-options-tp5720176p5720182.html Sent from the Free Pascal - General mailing list fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
waldo kitty
to Tony Papadimitriou: OK, I think I realized what the problem is. The * will apparently search in all…
Tony Papadimitriou wrote 13 lines
OK, I think I realized what the problem is. The * will apparently search in all subdirectories but (apparently again) one level deep. So, if you have something like: \progs\pascal\units\a \progs\pascal\units\a\b and you give -Fu\progs\pascal\units\* it will look in \progs\pascal\units\a but not in \progs\pascal\units\a\b So, is there a way to do this, i.e., specify the 'root' director for your units/includes and have it look at all files underneath regardless of nesting level?

perhaps

-Fu\progs\pascal\units\*
-Fu\progs\pascal\units\*\*
-Fu\progs\pascal\units\*\*\*
-Fu\progs\pascal\units\*\*\*\*
-Fu\progs\pascal\units\*\*\*\*\*
-Fu\progs\pascal\units\*\*\*\*\*\*

yeah, that's not "regardless of nesting level" because you have to manually add the next level... but i just also had a thought that the last line at your maximum level may be all that's needed if each directory represented by a * is searched for unit files...

NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted.