Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] scons equivalent of coq_makefile

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] scons equivalent of coq_makefile


Chronological Thread 
  • From: Rudi Grinberg <rudi.grinberg AT gmail.com>
  • To: coq-club <coq-club AT inria.fr>, coq-club AT inria.fr
  • Subject: Re: [Coq-Club] scons equivalent of coq_makefile
  • Date: Mon, 31 Aug 2020 11:51:49 -0700
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=rudi.grinberg AT gmail.com; spf=Pass smtp.mailfrom=rudi.grinberg AT gmail.com; spf=None smtp.helo=postmaster AT mail-pj1-f49.google.com
  • Ironport-phdr: 9a23:Sq8SCBbg4Pf0qi8q2hgckrj/LSx+4OfEezUN459isYplN5qZrsS9bnLW6fgltlLVR4KTs6sC17OI9fm6BSdQuN6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vLRi6txjdutcZjIdtKas91wbCr2dVdehR2W5mP0+YkQzm5se38p5j8iBQtOwk+sVdT6j0fLk2QKJBAjg+PG87+MPktR/YTQuS/XQcSXkZkgBJAwfe8h73WIr6vzbguep83CmaOtD2TawxVD+/4apnVAPkhSEaPDM/7WrZiNF/jLhDrRyvpxJx3Y3ab4ObNPRjcazSYcgXSnBdUstLTSFNHp+wYokJAuEcPehYtY79p14WoBWiGAmjGeLvwSJJiH/s3K061f8uHh/c3AwvAtkDt27UrMjoO6cTS+y1w7PIzTTFb/xNxzj98ofIfwsuofGJR71wcM7RxVMzGAPCi1WdsIroNC6a2eoRqWaU9fZgVf6xhG49rQF8ujihyMkoh4TIm44bxEzI+Dh6zYsoONC2SEx2bN2mHZVeqS2XK4R4T90jTm9otyg3zr4LtJq5cSYK1Zgq2h7SZvKBfoOV7BzjU+ORLi15hHJjYL+wmxGy8VKmyuLiUsm01ExGoTRYndnRrnwN1hrT6tKGSvRn5Euh1yyP2xjJ6u5aO087iLbbK54/zbEtkZocrV/DEjX3mEXxlKOZa0Qk+vO05OTgf7XmvIScOJFuhgHxKKQundG/Afw+PwMTXGab4fyx2KP/8UD9WrlHjf07nrPHvJzHJMkXvKG0DgtN3osh9xqzFTmr3dUCkXQHKF9JYg+LgozoNlzIPfv2F+2wg062nzdu3/3GPqPuApHKLnXblbfuZ7d960pFxAorz9BT+otYCr8OLf/3QEPxu9vYDhg2Mwyw3enrEsly1oQbWW6XA6+ZNr3dsUOQ6+4xP+WBYJUZtTX9JvQ/+fLikH40lUUScKStxZcXbWq3HvViI0WXe3rshdIBHH8QvgojUePqiUeOUTFJZ3azWaIz/S80CJipDYrYSYCthaaO3Ca/HpFMem9GDVWMHW/yd4qYQ/cMdD6SIsh5nzMYUrihUpYt2g2qtA/n0LVqNfHU+y0dtZL7ztd5/ezTlRco9Tx1FcuRyW+NT3sn1l8PEjQxxeV0pVF3ggOI1rE9iPhFH/RS4elIW0E0L8iYh+d9EpX5Xh/LVtaPUlevBNu8Uh8rSddk+cICYg5SAdSkhB3Z0GL+GaIZlvqEHp0y+K/G0FD+Is98zzDN06x33ApueddGKWDz3v03zAPUHYOcyxzFxZbvTrwV2Wv2zEnG1XCH5RgKXwt5UKGDVncaNBOP/IbJo3jaRrrrMowJdw5IyMqMMKxPM4S7glBPRfOlM9PbMTvoxjWAQC2Qz7bJV7LEPmUQ2CKHVRoBmgEXuG6EbE0wWnbnrGXZAzhjU1noZhG0/A==

Dune never executes build rules eagerly. It only executes them when the targets of a rule are needed as dependencies of another rule, or the user requested them to be built.

Regarding coqdep, the coqdep rule for a theory in dune depends on all .v files for that theory. So indeed the behavior should be like coq_makefile’s.
On Aug 31, 2020, 11:44 AM -0700, Abhishek Anand <abhishek.anand.iitg AT gmail.com>, wrote:
would dune then eagerly invoke cpp2v on everything before building even 1 .vo file? coq_makefile's Makefile builds all .v files before invoking coqdep, which makes sense given the current implementation of coqdep.

On Mon, Aug 31, 2020 at 11:40 AM Rudi Grinberg <rudi.grinberg AT gmail.com> wrote:
I think you’re looking for a rule like this:

(rule
 (deps foo.v)
 (targets foo.cpp)
 (action (cpp2v %{deps} -o %{targets)))

Usually, there’s a straightforward way to port any make rule to a dune rule. Sometimes this will require writing a lot more boilerplate, but it should be doable.
On Aug 31, 2020, 10:22 AM -0700, Gregory Malecha <gregory AT bedrocksystems.com>, wrote:
Does dune have a way to run pre-processors? For example, we have a tool, cpp2v, that takes a C++ file and generates a Coq file. I haven't found a way to get dune to do this for me.

On Sat, Aug 29, 2020 at 5:50 AM Théo Zimmermann <theo AT irif.fr> wrote:
Dear Abhishek,

If you are looking for a way to get away from the limitations of make,
why not try the experimental Dune support for Coq instead?

See:
- https://coq.inria.fr/refman/practical-tools/utilities.html#building-a-coq-project-with-dune
- https://dune.readthedocs.io/en/stable/dune-files.html#coq-theory
- https://coq.discourse.group/t/a-guide-to-building-your-coq-libraries-and-plugins-with-dune/20

Cheers,
Théo

Le jeu. 20 août 2020 à 21:37, Abhishek Anand
<abhishek.anand.iitg AT gmail.com> a écrit :
>
> Has someone written a tool to produce scons declarations (SConstruct) from a _CoqProject?
> I find it advantageous over make, especially in cross-server CI settings, because it uses hashes instead of timestamps to decide whether to rebuild a .vo file.


--

Gregory Malecha

Mail: gregory AT bedrocksystems.com

BedRock

Systems Inc
UNBREAKABLE FOUNDATION FOR

FORMALLY SECURED COMPUTING



Archive powered by MHonArc 2.6.19+.

Top of Page