[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #57676] openjdk11 fails to build with make 4.3
From: |
Martin Dorey |
Subject: |
[bug #57676] openjdk11 fails to build with make 4.3 |
Date: |
Tue, 28 Jan 2020 15:56:59 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 |
Follow-up Comment #6, bug #57676 (project make):
> I would consider this a bug in make
Well, it's not wrong that there is no rule to make the dependency file and
adding one does silence it (this is make-4.3.90):
martind@paris:~/tmp/make-57676$ cat Makefile2
-include deps
BADGER := $(shell touch deps)
some-file: deps;
deps:;
martind@paris:~/tmp/make-57676$ rm -f deps; make -f Makefile2
make: 'some-file' is up to date.
martind@paris:~/tmp/make-57676$
https://www.gnu.org/software/make/manual/html_node/Include.html doesn't just
say the leading hyphen suppresses errors when the file doesn't exist, but also
says that it suppresses errors when it cannot be remade. Indeed, this is
silent:
martind@paris:~/tmp/make-57676$ cat Makefile3
-include deps
some-file:;
martind@paris:~/tmp/make-57676$
So the issue only arises when the -include()d file is also a dependency. It's
not just that there's no rule to make that dependency, because Make does
notice that it's appeared in:
martind@paris:~/tmp/make-57676$ cat Makefile4
BADGER := $(shell touch deps)
some-file: deps;
martind@paris:~/tmp/make-57676$ rm -f deps; make -f Makefile4
make: 'some-file' is up to date.
martind@paris:~/tmp/make-57676$
If the side-effect happens before the -include, then all is also well:
martind@paris:~/tmp/make-57676$ cat Makefile5
BADGER := $(shell touch deps)
-include deps
some-file: deps;
martind@paris:~/tmp/make-57676$ rm -f deps; make -f Makefile5
make: 'some-file' is up to date.
martind@paris:~/tmp/make-57676$
Putting all that together, the new behavior does feel... unfortunate, at least
to me.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57676>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/