Follow-up Comment #2, bug #65972 (group make): I bisected this manually to 510e5ce ("[SV 60188] Explicit prereqs cannot be intermediate files").
So apparently this change was made deliberately in the context of bug #60188. I wish it was possible to restore the historical behavior. I wonder if I can do anything about this. Here's my rule, again (simplified excerpt from the Makefile): TESTS := uevent dmevents # these will be evaluated in the implicit rule in # .SECONDEXPANSION below dmevents-test_OBJDEPS = $(multipathdir)/devmapper.o dmevents-test_LIBDEPS = -lpthread -ldevmapper -lurcu all: $(TESTS:%=%.out) %.out: %-test @echo == running $< == @LD_LIBRARY_PATH=.:$(mpathutildir):$(mpathcmddir) ./$< >$@ 2>&1 || { cat "$@"; false; } COLON:=: .SECONDEXPANSION: %-test: %.o $$($$@_OBJDEPS) $$($$@_TESTDEPS) @echo building $@ $(Q)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $($@_TESTDEPS) $($@_OBJDEPS) $(LIBDEPS) $($@_LIBDEPS) In the case at hand, uevent-test and dmevents-test exist and are newer than any source files, but no intermediate files exist. The problem here is $(dmevents-test_OBJDEPS), which expands to an explicit dependency on $(multipathdir)/devmapper.o in the %-test rule. This file is not part of my binary archive, which contains only executables and shared libraries. make 4.3 didn't care that this file didn't exist and regarded dmevents-test up-to-date nonetheless. make 4.4 tries to rebuild $(multipathdir)/devmapper.o, and fails in the restricted environment. $(uevent-test-OBJDEPS) evaluates to the empty string, and thus make 4.4 doesn't try to rebuild the uevent-test binary. The behavior of make 4.3 made more sense to me. dmevents-test depends on two object files dmevents.o and $(multipathdir)/devmapper.o. It's hard to grok why the first one can be missing but the other one cannot. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?65972> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature