bugmake - Bugs: bug #39943, Add an alternative parsing mode...

 
 

bug #39943: Add an alternative parsing mode that regards space and tab as identical tokens

Submitter:  Byron Hawkins <byronhawkins>
Submitted:  Wed 04 Sep 2013 08:09:21 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  None Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 04 Sep 2013 08:42:04 PM UTC, comment #1: 

IMO any editor which automatically replaces TABs with spaces should never be considered to be a useful programming tool.  But YMMV of course.

Please see the NEWS file for the current release (GNU make 3.82):


* New special variable: .RECIPEPREFIX allows you to reset the recipe
  introduction character from the default (TAB) to something else.  The
  first character of this variable value is the new recipe introduction
  character.  If the variable is set to the empty string, TAB is used again.
  It can be set and reset at will; recipes will use the value active when
  they were first parsed.  To detect this feature check the value of
  $(.RECIPEPREFIX).


Regarding creating a new mode that allows both TAB characters and space characters: that would break so many makefiles that I don't believe it would be used enough to warrant the complications it would introduce.

As for your suggestion regarding the term "hard tab", when I wrote that message I'd never heard this term.  I'm still not sure why the prefix "hard" is added; what is being distinguished by this?  A TAB is a TAB, and there's only one TAB character.  There's no such thing as a "soft tab": I don't really know what that means.  However, I'm willing to change the message text if people think it will be significantly clearer.

Paul D. Smith <psmith>
Group administrator
Wed 04 Sep 2013 08:09:21 PM UTC, original submission:  

Many popular text editors replace tabs with space automatically. This makes it a tremendous hassle to create makefiles that differentiate between the tab and space characters. Please consider adding a new parsing mode which regards space and tab as identical, and introduce a new (visible) token to the syntax for delimiting rules and commands.

At the very least, it is effectively cruel to print an error message about the lack of hard tabs without using the exact text string "hard tab". Tell the user that the error is all about a "hard tab" missing.

Byron Hawkins <byronhawkins>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by byronhawkins (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code