bugmake - Bugs: bug #65908, Make fails with 'Makefile:3857:...

 
 

bug #65908: Make fails with 'Makefile:3857: *** missing 'endif'. Stop.

Submitter:  KO Myung-Hun <lvzuufx>
Submitted:  Sat 22 Jun 2024 01:44:50 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  SCM Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 04 Sep 2024 06:15:52 AM UTC, comment #5: 


comment #4:

> > it would be better that make provides the infos about that line not mis-matched `endif'.
>
> Sorry but I don't understand what you mean by "that line".  Which line is it that make should provide info about?


In this case, the real cause of the missing 'endif' is tab-indented 'if' directive. Therefore, Make should alert about that as well whenever Make encounters tab-indented 'if' directives.

KO Myung-Hun <lvzuufx>
Mon 02 Sep 2024 09:49:59 PM UTC, comment #4: 


> it would be better that make provides the infos about that line not mis-matched `endif'.


Sorry but I don't understand what you mean by "that line".  Which line is it that make should provide info about?

Paul D. Smith <psmith>
Group administrator
Sun 23 Jun 2024 07:25:19 AM UTC, comment #3: 

Then, it would be better that make provides the infos about that line not mis-matched `endif'.

KO Myung-Hun <lvzuufx>
Sat 22 Jun 2024 05:32:18 PM UTC, comment #2: 

You should review this Git patch:

https://public-inbox.org/git/9d14c08ca6cc06cdf8fb4ba33d2470053dca3966.1712591504.git.me@ttaylorr.com/

See this section of the GNU Make manual:

> Extra spaces are allowed and ignored at the beginning of the conditional directive line, but a tab is not allowed.


This has always been true, but in older releases there were some situations in which it worked to indent with tabs.  In the current Git latest commit this no longer works.

It's possible we will find a way to preserve the bug fix that we installed that caused this problem, while still allowing some or most of the previous support, at least for the time being, before an official release is made.

Paul D. Smith <psmith>
Group administrator
Sat 22 Jun 2024 04:37:05 PM UTC, comment #1: 

I see line 3857 is the end of Makefile... and that the likely reason the testcase is so large is because it's hard to work out where the if/endif matching has gone astray.  For me, running on Linux, the error initially reported is different:


mad@shuttle:~/tmp/make-65908/extracted-endif-testcase.zip/git$ ~/Downloads/make/make --version
GNU Make 4.4.90
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
mad@shuttle:~/tmp/make-65908/extracted-endif-testcase.zip/git$ ~/Downloads/make/make
config.mak.uname:866: *** missing 'endif'.  Stop.
mad@shuttle:~/tmp/make-65908/extracted-endif-testcase.zip/git$


Some extra printf debugging revealed that things went astray with the tab-indented endif at config.mak.uname line 70 not being treated as a Make control directive, so not closing the tab-indented ifneq two lines earlier.  It's in the middle of a bunch of assignments, rather than a recipe, so my initial thought is that Make's gone wrong here.

Martin Dorey <mdorey>
Sat 22 Jun 2024 01:44:50 PM UTC, original submission:  

Hi/2.

While I'm working on git, make failed like :

    Makefile:3857: * missing 'endif'.  Stop.

Used make is 'GNU Make v4.4.90' from git repo whose head is commit e3f938, and I'm working on OS/2.

v4.4.1 works fine.

I attach the testcase.

KO Myung-Hun <lvzuufx>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #56183:  endif-testcase.zip added by lvzuufx (45KiB - application/x-zip-compressed)

 

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 mdorey (Posted a comment)
  • -email is unavailable- added by lvzuufx (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
    2024-09-02 psmith Item GroupBug Enhancement
    2024-06-22 lvzuufx Attached File- Added endif-testcase.zip, #56183

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code