Why Use Make
21–30 of 248 posts
Re: Why Use Make
#22 .ONESHELL:
SHELL = /usr/bin/python
VAR := lorem ipsum
all:
@
import re
n = 3
print('make variable: $(VAR)')
print('local variable n: {}'.format(n))
rx = re.compile('\d+')
s = 'foo 17'
m = rx.search(s)
if m:
print('has number: {}'.format(s))
else:
print('no number: {}'.format(s))Re: Why Use Make
#23can't I use js with Node.js instead?
Re: Why Use Make
#24Re: Why Use Make
#25You should use CMake.
CMake generates Makefiles and it really is only good for building software while Make can be used for any number of complex tasks. I agree that if you need a build system use CMake it will make your life easy.
At the expense of your users.
Okay, I know next to nothing about CMake. All I know is that it is extremely frustrating when I get the source to a project that uses CMake and then have to modify the CFLAGS or figure out why it can't find some include file. Of course, the same applies to makefiles generated by automake.
Let's just write our makefiles by hand, people.
Re: Why Use Make
#26There are many, many way better alternatives to make. Which one is better depends on the platform you're on. The majority of them throws in automatic dependency management for free.
Yes, I know that the essence of the post is "use a build system". I agree completely. In fact, script everything. Then script your scripts. Then refactor your scripts because they are getting messy. But don't give impressionable souls the idea that "make" is anywhere near an acceptable (generalised, default) choice today.
Re: Why Use Make
#27Earlier quoted context omitted.
Have you tried Waf? http://code.google.com/p/waf/ Seems like it might be a good fit.
How does Waf compare to SCons? I'm a big fan of SCons, although it annoyingly does not have transitive dependency resolution for libraries. Waf has this functionality, correct?
www.scons.org/wiki/SconsVsOtherBuildTools
Re: Why Use Make
#28Make is easy to learn.
It simplifies a slightly complex task.
Other build tools have a steeper learning curve. If they're more complex than the problem being solved, people won't want to adopt them.
When things get complex, there's the GNU make manual and libraries.
When you have to target multiple platforms, there's autotools, which is really complex and intimidating, but less complex than targeting multiple platforms.
Alternatives to make seem to fit in between make and autotools.
Make sucks. I've also heard that Unix sucks, and C sucks, too. Despite this alleged suckyness, these things not only persist, but accumulate improvements over the years.
Re: Why Use Make
#29If your project sports auto-generated code, or any sort of build targets that depend on inputs only known after generation -- Make simply cannot handle this. There are ugly workarounds but they don't work well. Make is: * Slow (e.g: when compared with tup[1]) * Very easy to get it wrong (under-specify dependencies), with cryptic bugs (or over-building) as a result. Pretty difficult to get it right (e.g: doing proper…
People sometimes talk about waf as an alternative. I took a look at waf awhile aback and I felt disappointed, I forget why. I think node.js switched off waf for some reason I don't recall; either that or they didn't like it.
Re: Why Use Make
#30can't I use js with Node.js instead?