As Ron noticed earlier today, the buildrom 'make clean' target left some things to be desired. This is a patch to clean that up.
Thanks, Ward.
On 24/04/08 15:28 -0400, Ward Vandewege wrote:
As Ron noticed earlier today, the buildrom 'make clean' target left some things to be desired. This is a patch to clean that up.
Thanks, Ward.
-- Ward Vandewege ward@fsf.org Free Software Foundation - Senior System Administrator
Fix the various '-clean' targets so that they don't fail if the source has not been unpacked. Also includes some cosmetic fixes.
Signed-off-by: Ward Vandewege ward@gnu.org
Acked-by: Jordan Crouse jordan.crouse@amd.com
Index: packages/libpayload/libpayload.mk
--- packages/libpayload/libpayload.mk (revision 155) +++ packages/libpayload/libpayload.mk (working copy) @@ -65,7 +65,9 @@
libpayload-clean: @ echo "Cleaning libpayload..." +ifneq ($(wildcard "$(LIBPAYLOAD_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(LIBPAYLOAD_SRC_DIR) clean > /dev/null 2>&1 +endif @ rm -f $(LIBPAYLOAD_STAMP_DIR)/.installed
libpayload-distclean: Index: packages/unifdef/unifdef.mk =================================================================== --- packages/unifdef/unifdef.mk (revision 155) +++ packages/unifdef/unifdef.mk (working copy) @@ -38,7 +38,9 @@ unifdef: $(STAGING_DIR)/host/bin/unifdef
unifdef-clean: +ifneq ($(wildcard "$(UNIFDEF_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(UNIFDEF_SRC_DIR) clean > /dev/null 2>&1 +endif
unifdef-distclean: @ rm -rf $(UNIFDEF_DIR)/* Index: packages/kernel/kernel.inc =================================================================== --- packages/kernel/kernel.inc (revision 155) +++ packages/kernel/kernel.inc (working copy) @@ -88,9 +88,9 @@
generic-kernel-clean: @ echo "Cleaning kernel..."
- @ if [ -d $(KERNEL_SRC_DIR) ]; then \
- $(MAKE) -C $(KERNEL_SRC_DIR) clean > /dev/null 2>&1; \
- fi
+ifneq ($(wildcard "$(KERNEL_SRC_DIR)/Makefile"),)
- $(MAKE) -C $(KERNEL_SRC_DIR) clean > /dev/null 2>&1;
+endif
generic-kernel-distclean: @ rm -rf $(KERNEL_DIR) Index: packages/grub2/grub2.mk =================================================================== --- packages/grub2/grub2.mk (revision 155) +++ packages/grub2/grub2.mk (working copy) @@ -69,9 +69,9 @@ @ rm -f $(GRUB2_DIR)/grub2.elf @ rm -f $(GRUB2_STAMP_DIR)/.copied @ rm -f $(GRUB2_STAMP_DIR)/.installed
- @ if [ -f $(GRUB2_SRC_DIR)/Makefile ]; then \
make -C $(GRUB2_SRC_DIR) clean > /dev/null 2>&1; \
- fi
+ifneq ($(wildcard "$(GRUB_SRC_DIR)/Makefile"),)
- @ $(MAKE) -C $(GRUB2_SRC_DIR) clean > /dev/null 2>&1; \
+endif
grub2-distclean: @ rm -rf $(GRUB2_DIR)/* Index: packages/filo/filo.mk =================================================================== --- packages/filo/filo.mk (revision 155) +++ packages/filo/filo.mk (working copy) @@ -66,7 +66,9 @@
filo-clean: @ echo "Cleaning filo..." +ifneq ($(wildcard "$(FILO_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(FILO_SRC_DIR) clean > /dev/null 2>&1 +endif @ rm -f $(FILO_STAMP_DIR)/.copied
filo-distclean: Index: packages/wireless-tools/wireless-tools.mk =================================================================== --- packages/wireless-tools/wireless-tools.mk (revision 155) +++ packages/wireless-tools/wireless-tools.mk (working copy) @@ -51,7 +51,9 @@
wireless-tools-clean: @ echo "Cleaning wireless-tools..." +ifneq ($(wildcard "$(WIRELESS_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(WIRELESS_SRC_DIR) realclean > /dev/null 2>&1 +endif @ rm -f $(WIRELESS_SRC_DIR)/.config
wireless-tools-distclean: Index: packages/ofw/ofw.mk =================================================================== --- packages/ofw/ofw.mk (revision 155) +++ packages/ofw/ofw.mk (working copy) @@ -52,7 +52,9 @@
ofw-clean: @ echo "Cleaning openfirmware..." +ifneq ($(wildcard "$(OFW_BUILD_DIR)/Makefile"),) @ $(MAKE) -C $(OFW_BUILD_DIR) clean > /dev/null 2>&1 +endif
ofw-distclean: @ rm -rf $(OFW_DIR)/* Index: packages/busybox/busybox.mk =================================================================== --- packages/busybox/busybox.mk (revision 155) +++ packages/busybox/busybox.mk (working copy) @@ -66,7 +66,9 @@
busybox-clean: @ echo "Cleaning busybox..." +ifneq ($(wildcard "$(BUSYBOX_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(BUSYBOX_SRC_DIR) clean > /dev/null 2>&1 +endif
busybox-distclean: @ rm -rf $(BUSYBOX_DIR)/* Index: packages/etherboot/etherboot.mk =================================================================== --- packages/etherboot/etherboot.mk (revision 155) +++ packages/etherboot/etherboot.mk (working copy) @@ -57,7 +57,9 @@
etherboot-clean: @ echo "Cleaning etherboot..." +ifneq ($(wildcard "$(ETHERBOOT_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(ETHERBOOT_SRC_DIR) clean > /dev/null 2>&1 +endif
etherboot-distclean: @ rm -rf $(ETHERBOOT_DIR)/* Index: packages/kexec-tools/kexec-tools.mk =================================================================== --- packages/kexec-tools/kexec-tools.mk (revision 155) +++ packages/kexec-tools/kexec-tools.mk (working copy) @@ -32,7 +32,9 @@ kexec-tools: $(KEXEC_STAMP_DIR) $(INITRD_DIR)/sbin/kexec-tools
kexec-tools-clean: +ifneq ($(wildcard "$(KEXEC_SRC_DIR)/Makefile"),) $(MAKE) -C $(KEXEC_SRC_DIR) clean +endif rm -f $(KEXEC_SRC_DIR)/.config
kexec-tools-distclean: Index: packages/utils/nrv2b.mk =================================================================== --- packages/utils/nrv2b.mk (revision 155) +++ packages/utils/nrv2b.mk (working copy) @@ -16,7 +16,7 @@ endif
$(SOURCE_DIR)/$(NRV2B_TARBALL):
- mkdir -p $(SOURCE_DIR)/nrv2b
- @ mkdir -p $(SOURCE_DIR)/nrv2b @ $(BIN_DIR)/fetchsvn.sh $(NRV2B_URL) $(SOURCE_DIR)/nrv2b \ $(NRV2B_TAG) $@ > $(NRV2B_FETCH_LOG) 2>&1
@@ -40,7 +40,9 @@
nrv2b-clean: @ echo "Cleaning nrv2b..." +ifneq ($(wildcard "$(NRV2B_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(NRV2B_SRC_DIR) clean > /dev/null 2>&1 +endif
nrv2b-distclean: @ rm -rf $(NRV2B_DIR) Index: packages/coreboot-v2/coreboot.inc =================================================================== --- packages/coreboot-v2/coreboot.inc (revision 155) +++ packages/coreboot-v2/coreboot.inc (working copy) @@ -109,9 +109,9 @@ generic-coreboot-clean: @ echo "Cleaning coreboot..." @ rm -f $(CBV2_PAYLOAD_TARGET)
- @ if [ -d $(CBV2_BUILD_DIR) ];then \
- $(MAKE) -C $(CBV2_BUILD_DIR) clean > /dev/null 2>&1; \
- fi
+ifneq ($(wildcard "$(CBV2_BUILD_DIR)/Makefile"),)
- $(MAKE) -C $(CBV2_BUILD_DIR) clean > /dev/null 2>&1;
+endif @ rm -f $(CBV2_OUTPUT)
generic-coreboot-distclean: Index: packages/mkelfimage/mkelfimage.mk =================================================================== --- packages/mkelfimage/mkelfimage.mk (revision 155) +++ packages/mkelfimage/mkelfimage.mk (working copy) @@ -51,7 +51,9 @@ mkelfimage: $(STAGING_DIR)/sbin/mkelfImage
mkelfimage-clean: +ifneq ($(wildcard "$(MKELFIMAGE_SRC_DIR)/Makefile"),) $(MAKE) -C $(MKELFIMAGE_SRC_DIR) clean +endif
mkelfimage-distclean: @ rm -rf $(MKELFIMAGE_DIR)/* Index: packages/uclibc/uclibc.mk =================================================================== --- packages/uclibc/uclibc.mk (revision 155) +++ packages/uclibc/uclibc.mk (working copy) @@ -80,7 +80,9 @@
uclibc-clean: @ echo "Cleaning uclibc..." +ifneq ($(wildcard "$(UCLIBC_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(UCLIBC_SRC_DIR) clean > /dev/null 2>&1 +endif
uclibc-distclean: @ rm -rf $(UCLIBC_DIR)/* Index: packages/coreboot-v3/coreboot-v3.mk =================================================================== --- packages/coreboot-v3/coreboot-v3.mk (revision 155) +++ packages/coreboot-v3/coreboot-v3.mk (working copy) @@ -85,7 +85,9 @@
coreboot-v3-clean: @ echo "Cleaning coreboot v3..." +ifneq ($(wildcard "$(CBV3_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(CBV3_SRC_DIR) clean > /dev/null 2>&1 +endif
coreboot-v3-distclean: @ rm -rf $(CBV3_DIR)/* Index: packages/lzma/lzma.mk =================================================================== --- packages/lzma/lzma.mk (revision 155) +++ packages/lzma/lzma.mk (working copy) @@ -40,7 +40,9 @@
lzma-clean: @ echo "Cleaning lzma..." +ifneq ($(wildcard "$(LZMA_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(LZMA_SRC_DIR)/C/7zip/Compress/LZMA_Alone -f makefile.gcc clean > /dev/null 2>&1 +endif
lzma-distclean: @ rm -rf $(LZMA_DIR)/* Index: packages/gpxe/gpxe.mk =================================================================== --- packages/gpxe/gpxe.mk (revision 155) +++ packages/gpxe/gpxe.mk (working copy) @@ -66,7 +66,9 @@
gpxe-clean: @ echo "Cleaning GPXE..." +ifneq ($(wildcard "$(GPXE_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(GPXE_SRC_DIR) clean > /dev/null 2>&1 +endif
gpxe-distclean: @ rm -rf $(GPXE_DIR)/* Index: packages/kexec-boot-loader/kexec-boot-loader.mk =================================================================== --- packages/kexec-boot-loader/kexec-boot-loader.mk (revision 155) +++ packages/kexec-boot-loader/kexec-boot-loader.mk (working copy) @@ -56,7 +56,9 @@
kexec-boot-loader-clean: @ echo "Cleaning kexec-boot-loader..." +ifneq ($(wildcard "$(KBL_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(KBL_SRC_DIR) clean > /dev/null 2>&1 +endif
kexec-boot-loader-distclean: @ rm -rf $(KBL_DIR)/* Index: packages/coreinfo/coreinfo.mk =================================================================== --- packages/coreinfo/coreinfo.mk (revision 155) +++ packages/coreinfo/coreinfo.mk (working copy) @@ -50,7 +50,9 @@
coreinfo-clean: @ echo "Cleaning coreinfo..." +ifneq ($(wildcard "$(COREINFO_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(COREINFO_SRC_DIR) clean > /dev/null 2>&1 +endif @ rm -f $(COREINFO_STAMP_DIR)/.installed
coreinfo-distclean: Index: packages/qemu/qemu.mk =================================================================== --- packages/qemu/qemu.mk (revision 155) +++ packages/qemu/qemu.mk (working copy) @@ -45,7 +45,9 @@ qemu: $(QEMU_STAMP_DIR) $(QEMU_LOG_DIR) $(QEMU_SRC_DIR)/i386-softmmu/qemu
qemu-clean: +ifneq ($(wildcard "$(QEMU_SRC_DIR)/Makefile"),) $(MAKE) -C $(QEMU_SRC_DIR) clean +endif
qemu-distclean: @ rm -rf $(QEMU_DIR)/* Index: packages/memtest/memtest.mk =================================================================== --- packages/memtest/memtest.mk (revision 155) +++ packages/memtest/memtest.mk (working copy) @@ -47,7 +47,9 @@
memtest-clean: @ echo "Cleaning memtest..." +ifneq ($(wildcard "$(MEMTEST_SRC_DIR)/Makefile"),) @ $(MAKE) -C $(MEMTEST_SRC_DIR) clean > /dev/null 2>&1 +endif
memtest-distclean: @ rm -rf $(MEMTEST_DIR)/* Index: packages/tint/tint.mk =================================================================== --- packages/tint/tint.mk (revision 155) +++ packages/tint/tint.mk (working copy) @@ -46,9 +46,9 @@
tint-clean: @ echo "Cleaning TINT..."
- @ if [ -d $(TINT_SRC_DIR) ]; then \
make -C $(TINT_SRC_DIR) clean; \
- fi
+ifneq ($(wildcard "$(TINT_SRC_DIR)/Makefile"),)
- @ $(MAKE) -C $(TINT_SRC_DIR) clean; \
+endif @ rm -f $(TINT_STAMP_DIR)/.copied
tint-distclean:
-- coreboot mailing list coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
On Thu, Apr 24, 2008 at 01:49:19PM -0600, Jordan Crouse wrote:
On 24/04/08 15:28 -0400, Ward Vandewege wrote:
As Ron noticed earlier today, the buildrom 'make clean' target left some things to be desired. This is a patch to clean that up.
Thanks, Ward.
-- Ward Vandewege ward@fsf.org Free Software Foundation - Senior System Administrator
Fix the various '-clean' targets so that they don't fail if the source has not been unpacked. Also includes some cosmetic fixes.
Signed-off-by: Ward Vandewege ward@gnu.org
Acked-by: Jordan Crouse jordan.crouse@amd.com
r159
Thanks, Ward.