
GNU Make 4.2 - lelf
http://lists.gnu.org/archive/html/info-gnu/2016-05/msg00013.html
======
AceJohnny2
One misfeature I discovered recently and I wished got fixed is .SECONDARY vs
.PRECIOUS [1]. Both are used to tell Make to keep intermediate products of
chains of rules. However, .SECONDARY does not accept wildcards (%.o patterns
for example), only .PRECIOUS does. However, .PRECIOUS also adds the guard that
an incomplete intermediate product is kept in case Make is interrupted, which
you would only ever want for a trivial stamp file. In any other case, you risk
ending up with a runt file that breaks your next build.

So if, like any significant project I know, your build specifies lots of
wildcard ("implicit") rules, you're stuck using .PRECIOUS, in which case you
can never interrupt the build for risk of leaving it in a broken state.

FWIW, djb's "redo" concept [2] is based centrally around atomicity to avoid
such a problem.

[1]
[https://www.gnu.org/software/make/manual/html_node/Special-T...](https://www.gnu.org/software/make/manual/html_node/Special-
Targets.html)

[2] [https://github.com/apenwarr/redo](https://github.com/apenwarr/redo)

~~~
cnvogel
You get the same problem whenever you build up things piece by piece. So most
often I work around this by atomically mv'ing a temporary file to the final
product.

    
    
        %.foo : %.bar
            echo blubb >$@.tmp
            cat $^ >$@.tmp
            mv $@.tmp $@

------
elsherbini
If you find yourself using make for data analysis workflows, consider
snakemake[0], like make but with the ability to use python and R directly in
the rules.

[0]
[https://bitbucket.org/snakemake/snakemake/wiki/Home](https://bitbucket.org/snakemake/snakemake/wiki/Home)

~~~
jjoonathan
Nice, I've been on the lookout for a good make-for-data-analysis ever since I
saw Drake, fell in love with its feature set, gave it a spin, and discovered
that it took several seconds just to start up! I would love to get away from
my make-based workflow, hopefully this is the one that does it :)

------
dahart
Awesome! How long before this comes to darwin? Is the native version stuck on
3.81 forever?

The $(file ...) function seems like it could be powerful. Are people using
that for dynamic dependencies, without needing to use includes?

~~~
teamhappy
3.81 is the last release under GPLv2. Apple doesn't ship GPLv3 code.

[https://savannah.gnu.org/forum/forum.php?forum_id=4932](https://savannah.gnu.org/forum/forum.php?forum_id=4932)

~~~
jordigh
> Apple doesn't ship GPLv3 code.

I wish Apple would stop being so pig-headed about this. They're about the only
major tech company that refuses to touch GPLv3. Google, Microsoft, Facebook;
they've all got some contact with GPLv3 code without having their empires
crumble. In the meantime, Apple's refusal to ship GPLv3 is doing nothing but
making it more inconvenient for its customers to get modern software.

But ever since Steve Jobs got pwned by GPLv2 and thus gcc got an ObjC
frontend, Apple has been vowing, "nevar forget".

~~~
mwfunk
I'm not sure pwned is the right word:

(1) The ObjC/GCC thing happened in the '80s, and didn't prevent them from
doing things like shipping (and updating) plenty of GPLv2 software with OS X
when it first came out in the late '90s/early 2000s. Additionally, WebKit came
out in 2005, and was forked from KHTML, which was LGPL. They didn't have to
choose KHTML, they could've written something from scratch or used something
else. Their issue is obviously with GPLv3, not the GPL in general.

(2) Many, many, many people, including many people in what you would consider
the hacker community, have serious issues with GPLv3. One might even say that
for those people, GPLv3 is "doing nothing but making it more inconvenient for
its customers to get modern software." And it's not like GPL < v3 was a
universally beloved and accepted license either, it's pretty much been a font
of endless flamewars since its inception decades ago. I personally think it's
a great license as long as developers and users understand its requirements,
but let's not kid ourselves that it's something everyone should universally
embrace and use regardless of their own goals and ideals, or without fully
understanding what requirements it imposes.

(3) Back in the '80s, Jobs asked RMS if the ObjC front end could be
distributed separately and linked by the user, and therefore not fall under
the linkage requirement of the GPL. RMS said he'd ask his lawyers. He did, and
his lawyers said it was a gray area that could potentially be abused. RMS
decided to tell Jobs that he would not be OK with that arrangement. Jobs said
"OK", et voila. GPL'd ObjC front end. That sounds more like grownups resolving
a disagreement than pwnage, but whatever.

~~~
jordigh
I think the GPLv3 is more widely feared than understood. Most of the
objections raised in the flamewars come from misunderstandings of its terms
(e.g. the belief that it forbids encryption or it has patent anti-retaliation
clauses worse than the Apache license), or from objections to early drafts of
it. For example, the Linux devs refused to upgrade to GPLv3 after reading an
early draft, and never reconsidered the question after the final draft was
out.

And yeah, I would consider what happened to Jobs to be "pwning". He was trying
very hard to not have to give gcc any source code, and he failed. If he was
happy with the GPL, we would have seen more contributions to gcc after that,
but they never happened again.

~~~
sheepleherd
The GPL protects users; if you use software, a GPL license protects your right
to make changes to the software via the source code to correct problems and
make it suit your needs. I understand that many developers and suits to not
wish to give this right to users, but trying to never mention that and calling
yourself or anybody "pwned" by the GPL that other developers granted to you is
quite simply propaganda.

Protecting users' rights is not getting pwned, it's a failure to pwn your
users with software that you don't have pwnership of.

------
CameronBanga
It's a tragedy that the changelog isn't titled "What's GNU:".

~~~
J_Darnley
Oh come on people. That would be an excellent pun if the word "gnu" followed
usual English pronunciation.

