bugmake - Bugs: bug #46400, *** missing separator, when...

 
 

bug #46400: *** missing separator, when expanding empty define'd variable

Submitted by:  None
Submitted on:  Sat 07 Nov 2015 08:24:43 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 4.1Operating System: MS Windows
Fixed Release: 4.2Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 11 Apr 2016 01:59:45 PM UTC, comment #2:

This was fixed as a side-effect of bug #46995 (as best as I can tell--it definitely works now).

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Wed 02 Dec 2015 01:04:12 AM UTC, comment #1:

This happens with macros as well:

make_target = $(call ${0}_,$(strip ${1}),$(strip ${2}))

define make_target_ =
$(eval ${1}.cc := $(wildcard *.cc))
$(eval ${1}.o := ${${1}.cc:%.cc=%.o})
$(eval ${1} : ${${1}.o})
endef

# this will cause the same "missing separator" error
$(call make_target, my_thing)

Brian Vandenberg <phantal>
Sat 07 Nov 2015 08:24:43 PM UTC, original submission:

When I run make-4.1 with the attached makefile I get the following error

bug7.mk:5: *** missing separator. Stop.

This behavior looks inconsistent, because expanding variable D should give two empty lines, which should then be ignored by make.
Such problem could be avoided by inserting a continue statement at read.c:1509, as shown below.

/* If the line doesn't begin with a tab, test to see if it introduces
another define, or ends one. Stop if we find an 'endef' */
if (line[0] != cmd_prefix)
{
p = next_token (line);
len = strlen (p);
if (!len) continue; /* skip empty lines */

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #35413:  bug7.mk added by None (20B - text/plain - same behavior on Ubuntu)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by phantal (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

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

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 11 Apr 2016 01:59:45 PM UTCpsmithStatusNone=>Duplicate
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.2
    Sat 07 Nov 2015 08:24:43 PM UTCNoneAttached File-=>Added bug7.mk, #35413

    Back to the top


    Powered by Savane 3.1-cleanup1