Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why tabs in make action lines?

30 views
Skip to first unread message

Erland Sommarskog

unread,
Feb 2, 1994, 10:46:48 AM2/2/94
to
One of the things I've never understood is why most make:s require
the action lines to be preceeded by a tab and barf if any of them
starts with a space.

I have difficulties to see that there are any problems with the
grammar of make. DEC's MMS permits spaces, and it's a half-line
patch to get GNU-Make to do it. (Although a side effect of my very
simple-minded patch, seems to be that macro definitions which do
not start in column one are lost.)

From the user-interface point of view I can only see drawbacks.
Unless you have an editor like TPU, you can't tell a tab from a
series of spaces. And while fiddling around in a file, a tab can
easily become a series of spaces without any notice. (I use the
picture-mode of Emacs, which might aggravate the situation.) If
the makefile you corrupt is an include file used by everyone, it's
not trivial for the next guy to find out what is wrong, because
the file *looks* OK.

So, is there any good reasons for requiring the tab?
--
Erland Sommarskog, som...@enea.se, Stockholm
Not spokesman for ENEA Data AB

Tim Dugan

unread,
Feb 3, 1994, 11:45:00 AM2/3/94
to
In article <1994Feb2.1...@enea.se>, som...@enea.se (Erland Sommarskog)
writes...

>One of the things I've never understood is why most make:s require
>the action lines to be preceeded by a tab and barf if any of them
>starts with a space.
> [...]

>So, is there any good reasons for requiring the tab?

Probably not--it's probably a legacy from the first make. Does someone have
a BNF for make? May be it should be standardized?

- tim d.

Jim Carden

unread,
Feb 5, 1994, 5:50:44 PM2/5/94
to
In article <3FEB199410455637@uhcl2> CSCI...@CL.UH.EDU writes:
>In article <1994Feb2.1...@enea.se>, som...@enea.se (Erland Sommarskog)
>writes...
>>One of the things I've never understood is why most make:s require
>>the action lines to be preceeded by a tab

The story I heard is that make's author decided the day after
make was released that the tab requirement is a bad idea.

It makes a good story, whatever its accuracy.

Erland Sommarskog

unread,
Feb 6, 1994, 6:27:54 AM2/6/94
to
Jim Carden (ji...@tekcae.cax.tek.com) writes:
>The story I heard is that make's author decided the day after
>make was released that the tab requirement is a bad idea.

If there is any grain of salt in this story - and there seems to be
since no one has come to defend the darned tabs - I cannot escape
from wondering, why has so few of the many make implementations
floating around abandoned this idea? (Or, have in fact most of
them done, and I am left with few that still insist on the tabs?)

Christopher Lott

unread,
Feb 8, 1994, 4:30:45 AM2/8/94
to
In article <1994Feb2.1...@enea.se>, som...@enea.se (Erland Sommarskog)
>>writes...
>>>One of the things I've never understood is why most make:s require
>>>the action lines to be preceeded by a tab

In article <52...@tekgen.bv.tek.com> ji...@tekcae.cax.tek.com (Jim Carden) writes:
>The story I heard is that make's author decided the day after
>make was released that the tab requirement is a bad idea.

Well, I believe that Stuart Feldman was the original author of
Make and I know that he is alive, well, and still working for AT&T.
I'll try to forward this note to him, but no promises, because
I have to guess at the email address.

chris...
--
"Christopher Lott / Email: lo...@informatik.uni-kl.de / Tel: +49 (631) 205-3334"
"Adresse: FB Informatik - Bau 57 / Universitaet KL / D--67653 Kaiserslautern"

Geoffrey Clemm

unread,
Feb 9, 1994, 4:13:42 PM2/9/94
to
In article <1994Feb8.0...@uklirb.informatik.uni-kl.de> lo...@bogner.informatik.uni-kl.de (Christopher Lott) writes:
From: lo...@bogner.informatik.uni-kl.de (Christopher Lott)

Well, I believe that Stuart Feldman was the original author of
Make and I know that he is alive, well, and still working for AT&T.

2 out of 3. Alive, well, but hasn't worked for AT&T for a number
of years now. In fact, he works for Bellcore, which is basically
the part of Bell Labs that stayed with the phone companies when
ATT split up into the phone companies and what is now ATT.

ATT got to keep the name Bell Labs, and we got the good people
(just kidding, all you guys at ATT :-).

As for the tabs, yes, Stu regrets that decision. Not the day after
it was released, but pretty soon after the point at which there were
too many Makefile's to change without an uproar, as I recall.
I'll verify this with Stu.

By the way, Odin commands are *not* preceded by tabs (:-).

Cheers,

Geoff
--
ge...@bellcore.com

Erland Sommarskog

unread,
Feb 12, 1994, 9:00:19 AM2/12/94
to
Geoffrey Clemm (ge...@wodehouse.bellcore.com) writes:
>As for the tabs, yes, Stu regrets that decision. Not the day after
>it was released, but pretty soon after the point at which there were
>too many Makefile's to change without an uproar, as I recall.
>I'll verify this with Stu.

Here is something I don't understand. If he had change make at this
stage to permit spaces as well as tabs, how would this have caused
an uproar?

And it doesn't explain why makes which have many other incompatibilities
like GNU make, still insist on keeping the tab requirement.

>By the way, Odin commands are *not* preceded by tabs (:-).

Good!

Peter Miller

unread,
Feb 15, 1994, 4:58:22 PM2/15/94
to
ge...@wodehouse.bellcore.com (Geoffrey Clemm) writes:
> By the way, Odin commands are *not* preceded by tabs (:-).

neither are "cook" commands (posted to comp.sources.unix recently)

Peter Miller UUCP uunet!munnari!bmr.gov.au!pmiller
/\/\* Internet pmi...@bmr.gov.au
Disclaimer: The views expressed here are personal and do not necessarily
reflect the view of my employer or the views of my colleagues.

Geoffrey Clemm

unread,
Feb 16, 1994, 12:06:30 AM2/16/94
to
In article <1994Feb12....@enea.se> som...@enea.se (Erland Sommarskog) writes:
Here is something I don't understand. If he had change make at this
stage to permit spaces as well as tabs, how would this have caused
an uproar?

OK, I checked with Stu. The reason for using tabs to indicate an
action line was that yacc was not working (at least not for Stu) at
this point, but lex was, and recognizing leading tabs was something
easy for lex to do.

As for why he didn't carefully consider the ramifications of having
leading tabs vs. spaces, the important thing to remember is that this
was a little program he cooked up for his own convenience, and that
of a few of his buddies.

If he had guessed that Make would take over the known universe,
as is now the case, he probably would have spent more time on
the syntax.

Cheers,

Geoff

--
ge...@bellcore.com

0 new messages