delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/26/07:57:18

Date: Mon, 26 Apr 1999 12:16:23 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Why are tabs required in makefiles?
In-Reply-To: <8D53104ECD0CD211AF4000A0C9D60AE301330CCD@probe-2.acclaim-euro.net>
Message-ID: <Pine.SUN.3.91.990426121150.15084Y-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 26 Apr 1999, Shawn Hargreaves wrote:

> I wonder how many things would break if make automatically collapsed
> 8 leading spaces into a tab character?

Too much, it turns out.

In addition to be a Posix requirement, it turns out that many Makefiles 
use the following style of defining variables:

                  foo = bar
               foobar = barfoo
             yadayada = dayadaya

etc.--you get the idea.

Significantly the entire X project uses this style, and the imake utility 
produces it.  It is obvious that collapsing 8 spaces into a TAB will 
break those Makefiles.

The next version of Make will output a more explicit message when 8 
spaces are seen at the beginning of the line, suggesting that perhaps
the luser meant a TAB.  I hope this will serve as a stopgap.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019