Giter Site home page Giter Site logo

Weird Makefile logic? about coqutil HOT 8 CLOSED

ejgallego avatar ejgallego commented on July 29, 2024
Weird Makefile logic?

from coqutil.

Comments (8)

ejgallego avatar ejgallego commented on July 29, 2024 1

Yes, that'd be fine. Tho relative paths and fixing your emacs setup seems like a much better solution to me.

from coqutil.

samuelgruetter avatar samuelgruetter commented on July 29, 2024 1

According to the documentation of the compilation-directory-matcher variable, its default value should work... except that it doesn't, and I can't figure out why. Absolute paths look like a much more stable solution to me, so I changed _CoqProject to be autogenerated with absolute paths.

from coqutil.

ejgallego avatar ejgallego commented on July 29, 2024

I am not expert, but I think the right fix is to teach your compilation buffer about submake and update current-directory accordingly. That's more robust, but indeed, nested makefiles are a pain.

from coqutil.

ejgallego avatar ejgallego commented on July 29, 2024

Note how today, the .d dependency file doesn't contain absolute paths due to this hack, so it is not relocatable in the way you'd expect.

from coqutil.

ejgallego avatar ejgallego commented on July 29, 2024

Note that I understand how this is a pain, and I'd suggest setting compilation-search-path in the right way for your project.

Another choice that could work is that you use absolute paths in _CoqProject for the directory in -R.

I'm willing to be convinced otherwise, but I'm afraid there is a lot of fragile path magic that could would have to do to support a different path scheme in _CoqProject and in the input for coq_makefile.

What do you think?

from coqutil.

ejgallego avatar ejgallego commented on July 29, 2024

Another choice is to set your compilation-directory-matcher properly.

from coqutil.

samuelgruetter avatar samuelgruetter commented on July 29, 2024

In our other makefiles, eg here:

https://github.com/mit-plv/bedrock2/blob/99b86e974bdaf0ed2ffd893b42cf60d980669000/bedrock2/Makefile#L37-L38

we autogenerate _CoqProject so that it contains absolute paths. Would that solve the issue?

from coqutil.

ejgallego avatar ejgallego commented on July 29, 2024

That's weird ... Maybe you can open an issue in the Coq repos for coq_makefile?

Thanks for the fix, I will document the coq_makefile constraints.

Dune-based Coq modes actually understand composition better, so coqc is called from the base directory and emacs compilation buffer does work without the change directory hackery.

from coqutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.