bugmake - Bugs: bug #64259, Regression in master: make ignores...

 
 

bug #64259: Regression in master: make ignores statements it should not ignore.

Submitter:  Dmitry Goncharov <dgoncharov>
Submitted:  Sat 27 May 2023 03:33:14 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  SCM Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 27 May 2023 03:44:30 PM UTC, comment #1: 

Commit 07fcee35f058a876447c8a021f9eb1943f902534 introduced a regression.

The text in NEWS clarifies that the idea was to never consider a line starting with the recipe prefix as a conditional, to ensure make does not confuse recipe lines with conditionals as described in sv 64185.

However, there are cases where the fix
1. Still considers lines starting with the recipe prefix as conditionals.
2. Ignores lines which it should not ignore.

In this makefile both 'ifdef blah' and 'else' are intended with tabs.


$ ls
makefile
$ cat makefile
        ifdef blah
$(info true)
        else
$(info false)
endif
all:
$ make-4.4
false
make-4.4: Nothing to be done for 'all'.
$ # this is the latest make from master
$ ~/src/gmake/make/m64/make
make: Nothing to be done for 'all'.


We can see the latest make
1. honored 'ifdef blah', even though it is intended with a tab.
2. failed to run '$(info false)'.

The patch in the attachment causes make to fail with a syntax error here.
The patch keeps NEWS intact.

Dmitry Goncharov <dgoncharov>
Sat 27 May 2023 03:33:14 PM UTC, original submission:  

.

Dmitry Goncharov <dgoncharov>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #54791:  sv64259_fix.diff added by dgoncharov (2KiB - text/x-patch)
file #54792:  sv64259_test.diff added by dgoncharov (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dgoncharov (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.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-05-27 dgoncharov Attached File- Added sv64259_fix.diff, #54791
        Attached File- Added sv64259_test.diff, #54792

    Back to the top

    Powered by Savane 3.12