Comments (6)
Thank you for the nudge, should be solved! Please let me know if there's anything that's still unclear.
from makefiletutorial.
Yes, the new explanation of the purpose of makefiles helps tremendously. A few things:
- The code references file
foobar
but the target is calledhello
- "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.
Fixed/clarified, thank you! 5c03f15
from makefiletutorial.
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 firstwhere 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.
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.
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)
- Point out that this is GNU make HOT 1
- a typo error HOT 1
- Error in cookbook example HOT 1
- Static Pattern Rules and Filter --- errors: are they intentional HOT 4
- Confusing tabs and spaces indent use HOT 1
- Prerequisite target for compiling % wildcard HOT 3
- Error in multiple target eaxmple HOT 1
- Add pointer to the referenced Makefile Cookbook
- Mention .PHONY in make clean section HOT 1
- Correct mistake in the tutorial related to the use of "define"
- Static Pattern Rules and Filter -- Errors and naive fix HOT 1
- Comment error in the cookbook. HOT 1
- Cookbook string substitution HOT 3
- Add small caveat about compilation for pedantic JavaScript developers HOT 1
- Slightly confusing command in hello world example HOT 1
- Infinite redirects prevent access to site HOT 2
- In this part is supose to be "ifeq" instead "ifneq"? Thanks for tutorial helps me a lot 😁
- Mobile version of the site has no side margins
- Automatic pattern $< is used but never explained
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from makefiletutorial.