[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Recursive #include problem
- From: Gilles Lamiral <nospam@thanx>
- Date: Tue, 14 Dec 1999 01:46:32 +0100
Hello,
Consider this problem:
O) make directories top/dir1/dir2/
1) make a empty file named top/ancestors
2) make a file named top/dir1/ancestors with the content:
#include '../ancestors'
3) make a file named top/dir1/dir2/ancestors with the content:
#include '../ancestors'
4) go into the top/dir1/dir2/ directory and type:
$ wml ancestors
wml goes in deep recursion in the first phase. It should not. It
should if the include directive were #include './ancestors'.
Recursion is not well treated. The phase 1 is just like the cpp job.
cpp, the C preprocessor, does not have this problem and resolve the
recursion as intended (it includes top/ancestors which is empty. Of
course, this example is just a purified one. My need comes from a
useful example.
It's a pity because I need this feature to solve elegantly a problem.
Can someone fix it easyly? If so, I will throw out cpp from my tools
(just for this problem, not for life).
Thanks in advance.
--
au revoir,
Gilles Lamiral. France, Rennes (35).
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com