<commit_before>all:
	$(MAKE) -C alpine

alpine/initrd.img.gz:
	$(MAKE) -C alpine initrd.img.gz

alpine/kernel/x86_64/vmlinuz64:
	$(MAKE) -C alpine/kernel x86_64/vmlinuz64

alpine/mobylinux-bios.iso:
	$(MAKE) -C alpine mobylinux-bios.iso

QEMU_DEPS=Dockerfile.qemu alpine/initrd.img.gz alpine/kernel/x86_64/vmlinuz64
qemu: $(QEMU_DEPS)
	tar cf - $(QEMU_DEPS) | docker build -f Dockerfile.qemu -t mobyqemu:build -
	docker run -it --rm mobyqemu:build

QEMU_ISO_DEPS=Dockerfile.qemuiso alpine/mobylinux-bios.iso
qemu-iso: $(TEST_DEPS)
	tar cf - $(QEMU_ISO_DEPS) | docker build -f Dockerfile.qemuiso -t mobyqemuiso:build -
	docker run -it --rm mobyqemuiso:build

TEST_DEPS=Dockerfile.test alpine/initrd.img.gz alpine/kernel/x86_64/vmlinuz64
test: $(TEST_DEPS)
	tar cf - $(TEST_DEPS) | docker build -f Dockerfile.test -t mobytest:build -
	touch test.log
	docker run --rm mobytest:build 2>&1 | tee -a test.log &
	tail -f test.log 2>/dev/null | grep -m 1 -q 'Moby test suite '<commit_msg>fix Makefile dependencies<commit_after>all:
	$(MAKE) -C alpine

alpine/initrd.img.gz:
	$(MAKE) -C alpine initrd.img.gz

alpine/kernel/x86_64/vmlinuz64:
	$(MAKE) -C alpine/kernel x86_64/vmlinuz64

alpine/mobylinux-bios.iso:
	$(MAKE) -C alpine mobylinux-bios.iso

qemu: Dockerfile.qemu alpine/initrd.img.gz alpine/kernel/x86_64/vmlinuz64
	tar cf - $^ | docker build -f Dockerfile.qemu -t mobyqemu:build -
	docker run -it --rm mobyqemu:build

qemu-iso: Dockerfile.qemuiso alpine/mobylinux-bios.iso
	tar cf - $^ | docker build -f Dockerfile.qemuiso -t mobyqemuiso:build -
	docker run -it --rm mobyqemuiso:build

test: Dockerfile.test alpine/initrd.img.gz alpine/kernel/x86_64/vmlinuz64
	tar cf - $^ | docker build -f Dockerfile.test -t mobytest:build -
	touch test.log
	docker run --rm mobytest:build 2>&1 | tee -a test.log &
	tail -f test.log 2>/dev/null | grep -m 1 -q 'Moby test suite '
{'fraction_non_alphanumeric': 0.13136729222520108, 'fraction_numerical': 0.030026809651474532, 'mean_word_length': 3.884816753926702, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '385567', 'n_tokens_mistral': 889, 'n_tokens_neox': 790, 'n_words': 178}