[DGD]path_include

E. Harte harte at xs4all.nl
Tue Jun 13 11:16:43 CEST 2000


On Tue, 13 Jun 2000 birgit.schulte at philips.com wrote:

> Hi again,

:-)

> my question today is:
> Is it the intention that path_include(string from, string path) in the
> driver is only called with a path of an existing file?

No, it is possible to work with 'virtual' include files that are in
practice redirected to different directories/files depending on for
instance what object is being compiled.  (The only two objects for which
this won't work are the driver and auto object.)

This is useful if for instance you want to implement including files from
wizard directories using "~foo/include/bar.h", because DGD has no
understanding of what "~foo/" could mean.

> If so, then I found a case where this does not happen. I have more than
> one path given as include_dir in the .ini. When referencing an
> include-file with <file>, which is on the second given path,
> path_include is called twice, once with /path1/file (does not exist) and
> the second time with the (correct) /path2/file.
> 
> So, do I have to check myself if the file exists?

Yes and no.  Yes, it is probably a good idea to check, but if you
don't and _all_ path_include() calls (for the different include- 
directories) fail to return an existing file then it will finally give up
and abort the compilation.

Erwin.
P.S: Your line-length appears to be set at 100+, 72 or so is preferred.
-- 
Erwin Harte  -  Forever September, 2478 and counting  -  harte at xs4all.nl
[ 9:05am  up 1 day, 21:44, 12 users,  load average: 0.00, 0.08, 0.08 ]


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list