bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking software build tries for “commands.cmo”


From: SF Markus Elfring
Subject: Re: Checking software build tries for “commands.cmo”
Date: Sat, 17 Jun 2017 09:09:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

>> I needed another moment to become really aware that this software module
>> is a bit special. It seems that it is intended that it will be compiled
>> without a corresponding interface description file (suffix “mli”).
> 
> Well, I'm totally lost.  Here's why:
> 
> You told make ".cmo files can be built from *THE COMBINATION OF* the 
> matching .cmi and .ml files, but *only* if both the files exist or can be 
> built via some other rule".  That is what this rule says:
> 
> %.cmo: %.ml %.cmi
>        $(OCAMLC_CMD) -c $<

Your repetition is correct according to the development situation where
I started another try to update build scripts for an other evolving software.


> Now you're saying that commands.cmo could be built from *just* 
> commands.cmi without commands.ml!

My previous attempt was incomplete for the description of the dependency chain
“(mli ⇒ cmi ⇒)? ml ⇒ cmo”. I suggest to take another look.

The OCaml programming language is also working with interface description files.
These should be compiled when they are available at all.
But they can be optional.


I added a corresponding make rule then.

commands.cmo: commands.ml
        $(OCAMLC_CMD) -c $<


This pattern corresponds to a general development challenge:
For which software modules can you depend on interface descriptions in a safe 
way?

Regards,
Markus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]