[bug #60188] Explicit file built by an implicit rule is not intermediate.

2021-03-20 Thread Dmitry Goncharov
Follow-up Comment #5, bug #60188 (project make):

Paul, i attached one more test
 sv60188_explicit_intermediate_test.diff.

This one tests that an explicitly mentioned file is still intermediate when it
is a prereq to .INTERMEDIATE.

___

Reply to this item at:

  

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




[bug #60188] Explicit file built by an implicit rule is not intermediate.

2021-03-20 Thread Dmitry Goncharov
Additional Item Attachment, bug #60188 (project make):

File name: sv60188_explicit_intermediate_test.diff Size:0 KB
   




___

Reply to this item at:

  

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




[bug #60188] Explicit file built by an implicit rule is not intermediate.

2021-03-20 Thread Dmitry Goncharov
Follow-up Comment #4, bug #60188 (project make):

Thank you, Paul.
1. Do you mean something like
CC="@echo cc"
?

2. sure

3. By the old style do you mean run_make_with_options?

___

Reply to this item at:

  

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




Re: Possible GNU Make 4.3 bug

2021-03-20 Thread Steven Simpson

Hi Eldred,

On 15/03/2021 22:25, Eldred HABERT wrote:


The bug is the following two lines:

   Must remake target 'res/tpnk_dev_logo_tiles.2bpp.pb16.size'.
   Successfully remade target file 
'res/tpnk_dev_logo_tiles.2bpp.pb16.size'.




This .size file appears to be a generated header for assembly source, 
and the assembler has generated rules for it:


obj/starting_screen.o dep/starting_screen.mk : 
res/tpnk_dev_logo_tiles.2bpp.pb16.size
res/tpnk_dev_logo_tiles.2bpp.pb16.size:

I understand the need for the second rule, but it also defines an empty 
recipe, and this one doesn't apply:


$(RESDIR)/%.pb16.size: $(RESDIR)/%
@$(MKDIR_P) $(@D)
$(call filesize,$<,16) > $(RESDIR)/$*.pb16.size

...because the prerequisite res/tpnk_dev_logo_tiles.2bpp doesn't exist, 
and no rule exists to create it.


There is a 
src/res/starting_screen/tpnk_dev_logo/tpnk_dev_logo_tiles.2bpp, and you 
have VPATH set to src, but I don't think VPATH is supposed to 
recursively search subdirectories.  A solution would have to identify 
these subdirectories somehow, e.g.:


SRCDIRS := $(shell find $(SRCDIR) -type d)
vpath %.2bpp $(SRCDIRS)

$(RESDIR)/%.2bpp: %.2bpp
@$(MKDIR_P) $(@D)
cp $< $@

That allowed res/tpnk_dev_logo_tiles.2bpp.pb16.size to build for me.

Cheers,

Steven



[PATCH] Print warning if .ONESHELL has spurious dependency

2021-03-20 Thread Johannes Altmanninger
If the ".ONESHELL" is mentioned as target, then all recipes will be
run in a single shell.  I accidentally used ".ONESHELL: some-target",
assuming it would only apply to that target. There was some discussions
about supporting that, but until then I think it's a good idea to
warn the user.  Treating these spurious dependencies as errors would
also work, but I'm not sure if that's okay.

* src/read.c (record_files): Print warning if .ONESHELL has spurious dependency
---
 src/read.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/read.c b/src/read.c
index 9dbe30e..06d0ee6 100644
--- a/src/read.c
+++ b/src/read.c
@@ -2245,6 +2245,10 @@ record_files (struct nameseq *filenames, int 
are_also_makes,
 
   name = f->name;
 
+  if (!strcmp(name, ".ONESHELL") && f->deps)
+O (error, flocp,
+   _("*** warning: .ONESHELL does not take dependencies"));
+
   /* All done!  Set up for the next one.  */
   if (nextf == 0)
 break;
-- 
2.30.2