bugmake - Bugs: bug #55532, Missing prerequisites are not...

 
 

bug #55532: Missing prerequisites are not included in $? if .SECONDARY is present

Submitted by:  None
Submitted on:  Mon 21 Jan 2019 01:03:46 AM UTC  
 
Severity:  3 - Normal Item Group:  Bug
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  None Operating System:  Any
Fixed Release:  None Triage Status:  None

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Tue 14 May 2019 03:43:04 AM UTC, comment #4: 

> It's extremely difficult to understand your bug report
> because you keep talking about $^ but after a lot of
> confused reading of your report and a close look at your
> example it's obvious you really mean $? everywhere you write $^.


Sorry about that.

I mean $? instead of $^.

I should have re-read my report before the submission.
I will be careful next time.

Masahiro Yamada <masahiroy>
Mon 13 May 2019 08:06:45 PM UTC, comment #3: 

The issue here is that although make runs a recipe to build the target, the target is not actually built.  If you change the bar target to something that creates the target:

bar: ; touch $@

then you'll get the output you expect even with SECONDARY:

touch bar
newer prerequisites are: bar baz

I think you are correct this is a bug, though.

Paul D. Smith <psmith>
Project Administrator
Mon 13 May 2019 01:05:22 PM UTC, comment #2: 

It's extremely difficult to understand your bug report because you keep talking about $^ but after a lot of confused reading of your report and a close look at your example it's obvious you really mean $? everywhere you write $^.

Paul D. Smith <psmith>
Project Administrator
Mon 21 Jan 2019 03:35:17 AM UTC, comment #1: 

Maybe, is it better to check other special targets as well?

'.PRECIOUS: bar' does not interfere the $^,
but I see similar weirdness for '.INTERMEDIATE: bar'.

Anonymous
Mon 21 Jan 2019 01:03:46 AM UTC, original submission:  

The $^ should contain all the prerequisites that are newer than the target, including missing prerequisites.

However, the '.SECONDARY' special target is present,
the missing prerequisites are not included in the ^$.

[Test code]

foo: bar baz
        @echo newer prerequisites are: $?

bar:

.SECONDARY:

[Result]

$ touch foo
$ touch baz
$ make
newer prerequisites are: baz

The 'baz' is correctly contained in $^ since it is newer than 'foo'.

We expect 'bar' in $^ as well because it does not exist. However, this behavior is changed by the presence of .SECONDARY.

If you delete the '.SECONDARY:' line, the result is what we expect:

$ make
newer prerequisites are: bar baz

Anonymous

 

(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 masahiroy (Posted a comment)
  • -email is unavailable- added by psmith (Posted a comment)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-13 psmith StatusNot A Bug => None
        Open/ClosedClosed => Open
    2019-05-13 psmith StatusNone => Not A Bug
        Open/ClosedOpen => Closed
    2019-05-13 psmith SummaryMissing prerequisites are not included in $^ if .SECONDARY is present => Missing prerequisites are not included in $? if .SECONDARY is present

    Back to the top


    Powered by Savane 3.5