Browse thread
Re: pb with ocamldep
- Gerard Huet
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Gerard Huet <Gerard.Huet@i...> |
| Subject: | Re: pb with ocamldep |
At 16:21 07/06/00 +0200, Christophe Raffalli wrote: > >It would be nice ocamldep coud also accept the -pp option to call a >preprocessor. > >I have some problems with files that are not syntacticaly correct before >preprocessing ! >So I can not use ocamldep on these files and this is annoying. > >-- >Christophe Raffalli This is an instance of a general problem, the design of a programming environment for the Caml family of languages with the various tools operating on abstract syntax rather than concrete syntax, so that they can be used for all dialects through proper preprocessing. If you use an Emacs editing support tool such as Tuareg you will have problems if you try to adopt non-archaic syntax. For ocamldep the problem may be circumvented by some magic "pr_depend" module written by Daniel for use with camlp4. Here is my own Makefile depend entry, which should be adaptable to other syntax variants : depend: $(SOURCES) > .depend.new for i in $(SOURCES); do \ camlp4r my_own_syntax_extension.cmo pr_depend.cmo -- -I . $$i >> .depend.new ; \ done mv .depend.new .depend Gérard