caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jeff Henrikson <jehenrik@yahoo.com>
To: caml-list@inria.fr
Subject: [Caml-list] OCamlMakefile mly/mll interdependency
Date: Mon, 25 Aug 2003 17:40:24 -0700	[thread overview]
Message-ID: <E1442CE0-D75D-11D7-A290-00039375801A@yahoo.com> (raw)


To help me with the aforementioned release, anybody want to help me 
figure out why my OCamlMakefile isn't doing well on compling frontc?  
No ordering of the source files seems to work:


> ocamlc -c cabs.mli
> ocamlc -c cabs.ml
> ocamlc -c cparser.mli
> ocamlc -c clexer.ml
> File "clexer.mll", line 378, characters 1-16:
> Warning: this expression should have type unit.
> ocamlc -c cparser.ml
> ocamlc -c frontc.mli
> ocamlc -c frontc.ml
> ocamlc -c cprint.mli
> ocamlc -c cprint.ml
> ocamlc -a             \
>                           -o frontc.cma  cabs.cmo cparser.cmo 
> clexer.cmo frontc.cmo cprint.cmo


However, when I run a toplevel


> bash on ttyp4, ~/src/forklift/frontc$ ocaml
>         Objective Caml version 3.06
>
> # #load "frontc.cma";;
> Reference to undefined global `Clexer'
> #


I can work around by shelling this:


> ocamlc -a                                       -o frontc.cma  
> cabs.cmo clexer.cmo cparser.cmo frontc.cmo cprint.cmo


But if I try to correct this in the Makefile:


> OCAMLMAKEFILE = OCamlMakefile
>
> SOURCES =  cabs.ml clexer.mll cparser.mly frontc.ml cprint.ml cabs.mli 
> cprint.m\
> li frontc.mli
> RESULT = frontc
> all: byte-code-library
>
> -include $(OCAMLMAKEFILE)


Then it causes the build to break:


> bash on ttyp4, ~/src/forklift/frontc$ make
> ocamllex clexer.mll
> 125 states, 1674 transitions, table size 7446 bytes
> ocamlyacc  cparser.mly
> making ._bcdi/cparser.di from cparser.mli
> making ._bcdi/frontc.di from frontc.mli
> making ._bcdi/cprint.di from cprint.mli
> making ._bcdi/cabs.di from cabs.mli
> making ._d/cparser.d from cparser.ml
> making ._d/clexer.d from clexer.ml
> making ._d/cprint.d from cprint.ml
> making ._d/frontc.d from frontc.ml
> making ._d/cabs.d from cabs.ml
> ocamlc -c cabs.mli
> ocamlc -c cabs.ml
> ocamlc -c clexer.ml
> File "clexer.mll", line 22, characters 0-12:
> Unbound module Cparser
> make[1]: *** [clexer.cmi] Error 2
> make: *** [byte-code-library] Error 2


Thanks for any help,


Jeff Henrikson

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2003-08-26  0:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-26  0:40 Jeff Henrikson [this message]
2003-08-27 10:01 ` Markus Mottl
2003-08-27 18:27   ` [Caml-list] Re: cyclic modules (was: OCamlMakefile mly/mll interdependency) Michal Moskal
2003-08-27 18:53     ` Ville-Pertti Keinonen
2003-08-27 19:03       ` Ville-Pertti Keinonen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1442CE0-D75D-11D7-A290-00039375801A@yahoo.com \
    --to=jehenrik@yahoo.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).