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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

tonyp
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
 

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

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

leledumbo
Administrator
> 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.
Reply | Threaded
Open this post in threaded view
|

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

tonyp
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?

-----Original Message-----
From: leledumbo
Sent: Sunday, September 28, 2014 6:16 PM
To: [hidden email]
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 archive at Nabble.com.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

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

leledumbo
Administrator
> 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?

No, that's how -Fu is designed.
Reply | Threaded
Open this post in threaded view
|

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

wkitty42
In reply to this post by tonyp
On 9/29/2014 5:00 AM, Tony Papadimitriou wrote:

> 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal