caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Pre-processor sub-process
@ 2009-09-27 20:58 Matthieu Dubuget
  2009-09-28  8:33 ` [Caml-list] " Olivier Andrieu
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Dubuget @ 2009-09-27 20:58 UTC (permalink / raw)
  To: caml-list

Hello,

I'm trying to have bin-prot compiled with mingw version of OCaml with
the original OCamlMakefile.

This fails on my computer.

I reproduced the problem here:

On linux, there is no problem:
$ uname
Linux
$ echo $BIN_PROT_CPP
cpp
$ echo $pp
$BIN_PROT_CPP $ARCH_FLAGS
$ ocamlc -c -verbose -pp "echo $pp && $pp" write_ml.ml
+ echo $BIN_PROT_CPP $ARCH_FLAGS && $BIN_PROT_CPP $ARCH_FLAGS
'write_ml.ml' > /tmp/camlppf6e35a
cpp
File "write_ml.ml", line 33, characters 0-11:
Error: Unbound module Common

Ok. If I cat /tmp/camlppf6e35a, I can check that write_ml.ml was
actually pre-processed by cpp.

On cygwin:
$ uname
CYGWIN_NT-5.1
$ echo $BIN_PROT_CPP
cpp
$ echo $pp
$BIN_PROT_CPP $ARCH_FLAGS
$ ocamlc -c -verbose -pp "echo $pp && $pp" write_ml.ml
+ echo $BIN_PROT_CPP $ARCH_FLAGS && $BIN_PROT_CPP $ARCH_FLAGS
"write_ml.ml" > c:\DOCUME~1\matt\LOCALS~1\Temp\camlpp8a6978
$BIN_PROT_CPP $ARCH_FLAGS
'$BIN_PROT_CPP' n'est pas reconnu en tant que commande interne
ou externe, un programme excutable ou un fichier de commandes.
File "write_ml.ml", line 1, characters 0-1:
Error: Preprocessor error

It seems that when the pre-processor is called, the environment is not
given to the sub-process?

Can anybody reproduce this problem (or better: provide a solution), or
did I something bad?

P.S. Both tests are with a Godi installed 3.11.1 ocaml.

Thanks

Matt


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-28  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-27 20:58 Pre-processor sub-process Matthieu Dubuget
2009-09-28  8:33 ` [Caml-list] " Olivier Andrieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).