Answer me this, does anyone have a good cross-platform method of writing Make files? I guess with Windows now having bash, I can actually just target bash scripts?
Make for hipsters
11–20 of 200 posts
Re: Make for hipsters
#12Here's a more in-depth and easy to read guide for beginners: http://www.computerhope.com/unix/umake.htm If you want to see some interesting/convoluted Makefiles, get a very complex, large piece of software (something from Gnome, possibly) and use autoconf & automake to generate the Makefiles, then pour through them to see how they tick.
Make is fine. Automake is horrific.
Re: Make for hipsters
#13Here's a more in-depth and easy to read guide for beginners: http://www.computerhope.com/unix/umake.htm If you want to see some interesting/convoluted Makefiles, get a very complex, large piece of software (something from Gnome, possibly) and use autoconf & automake to generate the Makefiles, then pour through them to see how they tick.
If you're decent with Make and want to learn advanced tricks, then by all means go right ahead, but 95% of Make users will never need to delve into such details.
Re: Make for hipsters
#14Do so many people who go on this site not know how to make makefiles? Also why is it for hipsters? Or is the article for hipsters? Why does the author call his own published notes factually inaccurate? Why is it hacky to use a makefile? Is this all a big ruse?
Re: Make for hipsters
#15Re: Make for hipsters
#16Do so many people who go on this site not know how to make makefiles? Also why is it for hipsters? Or is the article for hipsters? Why does the author call his own published notes factually inaccurate? Why is it hacky to use a makefile? Is this all a big ruse?
I dunno. Maybe it's a reaction to the myriad build tools developed for Javascript recently. Could they have been done with makefiles instead?
Re: Make for hipsters
#17Nope. You can say "make hello" and have make automatically use its default rules - which can be configured - to e.g. compile hello.c into a hello executable. I use this frequently.
Re: Make for hipsters
#18Answer me this, does anyone have a good cross-platform method of writing Make files? I guess with Windows now having bash, I can actually just target bash scripts?
Re: Make for hipsters
#19Earlier quoted context omitted.
I dunno. Maybe it's a reaction to the myriad build tools developed for Javascript recently. Could they have been done with makefiles instead?
I suppose so. But there are always many tools for everything. And everyone can select his favorite.
Re: Make for hipsters
#20This introduction neglects to mention that Makefile rules are primarily rules to derive files (usually from other files). Make will not re-run a rule when the target (file) generated by the rule is already up to date. From this perspective, a well structured Makefile can be thought of as a pipeline/graph of functions, that derive values (files) from previously known values (files). Expressing a build process in this…
The syntax is simple:
.PHONY: all clean install
marks "all", "clean" and "install" as phony. Even if the file "all" happens to exist, "make all" will still trigger the build.