[bug #63484] make 4.4 incorrectly thinks target does not exist

2022-12-19 Thread Paul D. Smith
Update of bug #63484 (project make):

  Status:None => Fixed  
 Assigned to:None => psmith 
 Open/Closed:Open => Closed 
Operating System:None => Any
   Fixed Release:None => SCM

___

Follow-up Comment #3:

Pushed these changes, thanks Dmitry!


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #63484] make 4.4 incorrectly thinks target does not exist

2022-12-11 Thread Patrick Oppenlander
Follow-up Comment #2, bug #63484 (project make):




[comment #1 comment #1:]
> Thanks for your report.
> 
> > test.x exists but make 4.4 says it doesn't
> This is an old issue, that keeps causing questions. I think, we should open
a dedicated bug report about this.
> 

Okay. Makes sense: https://savannah.gnu.org/bugs/index.php?63510.

> > test.foo is older than test.x therefore test.x does not need to be
updated
> This is indeed a regression.
> 
> The fix for sv 60435 introduced a piece of code in implicit.c.
> Specifically,
> 
> +  if (f && !f->is_explicit && !d->is_explicit)
> +f->intermediate = 1;
> 
> 
> Same fix also introduced code in file.c and read.c to set file->is_explicit
for all explicitly mentioned prerequisites and targets.
> to prevent explicitly mentioned files from being treated as intermediate.
> In this example test.foo is not a prerequisite and not a target.
> This patch in the attachment marks all makefiles as explicit.
>

I've tested the patch and can confirm that it resolves the issue, thanks.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #63484] make 4.4 incorrectly thinks target does not exist

2022-12-09 Thread Dmitry Goncharov
Follow-up Comment #1, bug #63484 (project make):

Thanks for your report.

> test.x exists but make 4.4 says it doesn't
This is an old issue, that keeps causing questions. I think, we should open a
dedicated bug report about this.


> test.foo is older than test.x therefore test.x does not need to be updated
This is indeed a regression.

The fix for sv 60435 introduced a piece of code in implicit.c.
Specifically,

+  if (f && !f->is_explicit && !d->is_explicit)
+f->intermediate = 1;


Same fix also introduced code in file.c and read.c to set file->is_explicit
for all explicitly mentioned prerequisites and targets.
to prevent explicitly mentioned files from being treated as intermediate.
In this example test.foo is not a prerequisite and not a target.
This patch in the attachment marks all makefiles as explicit.





(file #54077, file #54078)

___

Additional Item Attachment:

File name: sv63484_fix.diff   Size:0 KB


File name: sv63484_test.diff  Size:1 KB




___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #63484] make 4.4 incorrectly thinks target does not exist

2022-12-07 Thread Patrick Oppenlander
URL:
  

 Summary: make 4.4 incorrectly thinks target does not exist
 Project: make
   Submitter: pattop
   Submitted: Wed 07 Dec 2022 11:19:38 PM UTC
Severity: 3 - Normal
  Item Group: Bug
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
   Component Version: 4.4
Operating System: None
   Fixed Release: None
   Triage Status: None


___

Follow-up Comments:


---
Date: Wed 07 Dec 2022 11:19:38 PM UTC By: Patrick Oppenlander 
Here's a test case reduced from a much larger build system demonstrating a
behavioural change between 4.3 and 4.4 which caught me by surprise:


.SECONDARY:
.PHONY: force
-include test.foo
%.foo: force
touch -a $@
%.x: %.foo
touch $@
test: test.x
touch $@


*with 4.3*
*%* ls
Makefile
*%* make
touch -a test.foo
touch -a test.foo
touch test.x
touch test
*%* ls
Makefile  test  test.foo  test.x
*%* make
touch -a test.foo
make: 'test' is up to date.

*with 4.4*
*%* ls
Makefile
*%* make
touch -a test.foo
touch -a test.foo
touch test.x
touch test
*%* ls
Makefile  test  test.foo  test.x
*%* make
touch -a test.foo
touch test.x
touch test

*with --trace*
*%* ls
Makefile  test  test.foo  test.x
*%* make --trace
touch -a test.foo
Makefile:7: update target 'test.x' due to: target does not exist
touch test.x
Makefile:9: update target 'test' due to: test.x
touch test

I've reported this a bug because:
* test.x exists but make 4.4 says it doesn't
* test.foo is older than test.x therefore test.x does not need to be updated







___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/