help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch which allows make to use leading spaces rather than tabs


From: Paul D. Smith
Subject: Re: Patch which allows make to use leading spaces rather than tabs
Date: Wed, 9 Mar 2005 09:23:19 -0500

%% Dave Hylands <address@hidden> writes:

  dh> Since I've already dived in, I created a patch which allows make
  dh> to accept leading spaces rather than tabs for the recipies (but
  dh> still preserves leading spaces for ifeq and friends).

Unfortunately there are ambiguities to the make language which are
widely used, and where patches like this cause very different behavior
(to the point of breaking makefiles).  For example:

foo: bar

    THIS = that
     FOO = bar
  BIZBAZ = boz

will be interpreted quite differently with a patch like this.  You can
add your patch to the Savannah page if you like, for others to use.  I
do have a change lying around that I made a while ago which allows the
user to set a different character (other than TAB) to be used to
introduce rules; so you could change it to ">" or whatever.  The
character still must be the first thing on a line to be recognized as
introducing a command script line.  This doesn't do the same thing your
patch does since it still requires a single character to be used (so you
could use SPACE, but not "either SPACE or TAB"), but you can use it to
cause makefiles to be easier to read.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]