Giter Site home page Giter Site logo

Comments (6)

theicfire avatar theicfire commented on June 1, 2024

Thank you for the nudge, should be solved! Please let me know if there's anything that's still unclear.

from makefiletutorial.

jxu avatar jxu commented on June 1, 2024

Yes, the new explanation of the purpose of makefiles helps tremendously. A few things:

  • The code references file foobar but the target is called hello
  • "commands" should not be in inline-code font
  • I still think the echo C code into file is a little contrived for a tutorial but maybe other people can understand it well.

from makefiletutorial.

theicfire avatar theicfire commented on June 1, 2024

Fixed/clarified, thank you! 5c03f15

from makefiletutorial.

jxu avatar jxu commented on June 1, 2024

After going through the tutorial again, I still think the echo into blah.c example is too contrived. What I suggested before is much more representative of a real project:

and then maybe just two rules with one dependency, for example

blah: blah.o
	cc blah.o -o blah # Runs second

blah.o: blah.c
	cc -c blah.c -o blah.o # Runs first

where blah.c exists; the echo is confusing because blah.c source would normally exist already.

We created blah.c previously in the tutorial too in "The essence of Make". I can open a PR if you'd like.

from makefiletutorial.

jxu avatar jxu commented on June 1, 2024

Maybe also worth mentioning for those that are familiar that makefiles are a form of declarative programming, in that the exact order of execution is not explicitly specified but figured out by the make implementation.

from makefiletutorial.

theicfire avatar theicfire commented on June 1, 2024

Thanks for the thoughts!

Although the example is contrived, I don't think it's confusing because of the comment. I think it's helpful to keep because people can easily delete blah.c and have it recreated quickly.

I think the "declarative programming" point does not help teach Makefiles. I think it helps people that might want to connect concepts together (useful!), but I have a strong value for the project of being as succinct as possible, so I'm ok with keeping these pieces out.

from makefiletutorial.

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.