From: Sam Ravnborg <sam@ravnborg.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [GIT PULL] x86/build change for v3.6
Date: Wed, 25 Jul 2012 22:15:11 +0200 [thread overview]
Message-ID: <20120725201511.GA888@merkur.ravnborg.org> (raw)
In-Reply-To: <20120722142204.GA9085@gmail.com>
>
> No, the reason for the odd looking diff is that lots of lines in
> arch/x86/Makefile have 8-space tabs for histerical reasons but
> new code (such as this one) has proper tabs.
Use of tabs for indent in a Makefile is just asking for trouble.
Consider following simple Makefile:
$ cat Makefile
bar:
#bla bla
foo = war
love:
@echo make love, not $(foo)
If you execute:
$make love
make love, not war
But if you replace the 8 spaces in front of the assignment
with a tab then suddenly the output looks like this:
$make love
make love, not
This is not as expected....
In this silly example it is maybe obvious but I have lost hours tracking
down bugs due to this.
You add a new target and suddenly someting unrelated breaks.
What happens is that make consider the assignment a command due to the leading
tab - and because is follows a target (or other commands).
I hope this makes it clear why many makefiles in the kernel uses tabs for indent.
Sam
next prev parent reply other threads:[~2012-07-25 20:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-22 13:44 [GIT PULL] x86/build change for v3.6 Ingo Molnar
2012-07-22 13:58 ` Kirill A. Shutemov
2012-07-22 14:22 ` Ingo Molnar
2012-07-23 9:35 ` Kirill A. Shutemov
2012-07-25 20:15 ` Sam Ravnborg [this message]
2012-07-25 20:18 ` H. Peter Anvin
2012-07-26 6:55 ` Ingo Molnar
2012-07-29 20:42 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120725201511.GA888@merkur.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).