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 Priority:  5 - 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

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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>

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-2753.
    Corresponding source code