From 919b7521dbeb69c6d24835f2b2606624b23c6a3b Mon Sep 17 00:00:00 2001
From: Laurent Vivier <Laurent@lvivier.info>
Date: Tue, 27 Mar 2007 09:01:28 +0000
Subject: [PATCH] allow to create floppy cdboot-*.bin without providing kernel

---
 Makefile | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 5c1fdb9..d1db828 100644
--- a/Makefile
+++ b/Makefile
@@ -131,13 +131,7 @@ all: docs libemile libblock libiso9660 libiso9660-m68k libgzip-m68k \
      second/$(KARCH)-linux-scsi/second second/m68k-netbsd-floppy/second \
      apple_driver
 
-# We can build floppy image only if a kernel is provided
-
-ifeq ($(LINUX),$(LINUXPATH))
-all_bin: netboot.bin rescue.bin debian-installer.bin boot.bin \
-	 cdboot-sarge.bin cdboot-woody.bin second/$(KARCH)-linux-scsi/second \
-	 apple_driver
-	rm -f last.bin
+ALL_BIN = cdboot-sarge.bin cdboot-woody.bin cdboot-etch.bin
 
 cdboot-woody.bin: tools first second/$(KARCH)-linux-scsi/second
 	tools/emile-install -f first/first_floppy \
@@ -172,6 +166,12 @@ cdboot-etch.bin: tools first second/$(KARCH)-linux-scsi/second
 	rm -f last.bin
 	ln -s cdboot-etch.bin last.bin
 
+# We can build floppy image only if a kernel is provided
+
+ifeq ($(LINUX),$(LINUXPATH))
+
+ALL_BIN += netboot.bin rescue.bin debian-installer.bin boot.bin second/$(KARCH)-linux-scsi/second
+
 floppy.bin: tools first vmlinuz \
 	    second/$(KARCH)-linux-floppy/second
 	tools/emile-install -f first/first_floppy \
@@ -254,6 +254,9 @@ netbsd.gz: $(NETBSD)
 	mv $(NETBSD).stripped.gz netbsd.gz
 endif
 
+all_bin: $(ALL_BIN)
+	rm -f last.bin
+
 export SIGNATURE VERSION DESTDIR PREFIX KARCH CROSS_COMPILE
 
 first::