make: a clean build no longer stops at lwIP
From a clean tree the first make failed with "no rule to make target build/lwip/core/init.o": a pattern rule is only used when its prerequisite exists or can be made, and before the unpack lwIP's .c files were neither. A second make worked, which is why it went unseen. The unpack now claims the .c files. And sysroot-install waits for it, because its own make -C ports unpacked lwIP too, and two unzips under -j collided. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
125663929a
commit
c3561f9d56
1 changed files with 14 additions and 1 deletions
15
Makefile
15
Makefile
|
|
@ -965,6 +965,17 @@ $(BUILD)/lwip/%.o: $(LWIPDIR)/%.c | $(LWIPDIR)
|
||||||
$(LWIPDIR):
|
$(LWIPDIR):
|
||||||
$(MAKE) -C ports lwip
|
$(MAKE) -C ports lwip
|
||||||
|
|
||||||
|
# And say that unpacking is what makes lwIP's .c files. Without this, a clean
|
||||||
|
# build fails at once with "no rule to make build/lwip/core/init.o": make
|
||||||
|
# picks a pattern rule only if every prerequisite exists or can be made, and
|
||||||
|
# before the unpack init.c is neither -- the order-only $(LWIPDIR) above
|
||||||
|
# would have created it, but make never gets that far. A second `make`
|
||||||
|
# worked, because by then the first had unpacked it. PRECIOUS because make
|
||||||
|
# deletes what it thinks it made along a chain of pattern rules.
|
||||||
|
$(LWIPDIR)/%.c: | $(LWIPDIR)
|
||||||
|
@test -f $@
|
||||||
|
.PRECIOUS: $(LWIPDIR)/%.c
|
||||||
|
|
||||||
# uACPI's headers for its own files and for kernel/acpi/, and the same
|
# uACPI's headers for its own files and for kernel/acpi/, and the same
|
||||||
# configuration for both: a define seen by one side and not the other changes
|
# configuration for both: a define seen by one side and not the other changes
|
||||||
# the size of structures they pass between them. Builtin string functions,
|
# the size of structures they pass between them. Builtin string functions,
|
||||||
|
|
@ -1308,7 +1319,9 @@ etc-install: $(SCHINIT_JOBS) $(ETC_PLAIN) $(ETC_ZSH) $(LOGO_ASCII) $(SRV_FILES)
|
||||||
# not mounted over and the marker file would be visible in them.
|
# not mounted over and the marker file would be visible in them.
|
||||||
SYSROOT_DIRS = dev proc sys run tmp root
|
SYSROOT_DIRS = dev proc sys run tmp root
|
||||||
|
|
||||||
sysroot-install: $(addprefix $(SYSROOT)/bin/, $(CMDS)) etc-install
|
# After lwIP is unpacked: `make -C ports` below unpacks it too, and the two
|
||||||
|
# unzips running at once under -j trip over each other.
|
||||||
|
sysroot-install: $(addprefix $(SYSROOT)/bin/, $(CMDS)) etc-install | $(LWIPDIR)
|
||||||
@mkdir -p $(addprefix $(SYSROOT)/, $(SYSROOT_DIRS))
|
@mkdir -p $(addprefix $(SYSROOT)/, $(SYSROOT_DIRS))
|
||||||
ifdef WINHOST
|
ifdef WINHOST
|
||||||
@echo "ports: skipped (Windows host) -- musl/mksh/toybox are used as already staged in $(SYSROOT)"
|
@echo "ports: skipped (Windows host) -- musl/mksh/toybox are used as already staged in $(SYSROOT)"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue