Makefile: Don't try to rebuild chroots when cross tools are updated.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 10 Sep 2019 01:44:46 +0000 (02:44 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 11 Sep 2019 11:05:57 +0000 (12:05 +0100)
The chroot maintenance doesn't work as make(1).  This needs rethinking.
Stashing these dependencies as recursive make(1) invocations is
hopelessly unsafe.

Makefile

index fbbc961..1f34c0c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -521,12 +521,12 @@ setup-chroots: $(BUILD_CHROOTS)
 $(BUILD_CHROOTS): chroot/%: $(STATE)/stamp/chroot.%
 .PHONY: setup-chroots $(BUILD_CHROOTS)
 
-$(CHROOT_STAMPS): $(STATE)/stamp/chroot.%: \
-               $$(call chroot-deps,$(STATE)/stamp/cross-tools.,$$*)
+$(CHROOT_STAMPS): $(STATE)/stamp/chroot.%:
        $(V_AT)mkdir -p $(dir $@) log/
        $(MAKE) \
                $(STATE)/bin/mkbuildchroot $(STATE)/bin/install-cross-tools \
-               $(STATE)/etc/schroot/sbuild.schroot
+               $(STATE)/etc/schroot/sbuild.schroot \
+               $$(call chroot-deps,$(STATE)/stamp/cross-tools.,$$*)
        $(call v_tag,CHROOT)$(call v_log,setup-chroot.$*, \
                $(SILENCE_LVM); \
                $(ROOTLY) $(STATE)/bin/mkbuildchroot \