target: use qstrip
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 30 Jul 2009 15:35:13 +0000 (17:35 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 5 Sep 2009 12:43:17 +0000 (14:43 +0200)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
21 files changed:
target/Makefile.in
target/cpio/cpioroot.mk
target/cramfs/cramfs.mk
target/device/ARMLTD/Makefile.in
target/device/Atmel/DataFlashBoot/DataflashBoot.mk
target/device/Atmel/Makefile.in
target/device/Atmel/arch-arm/u-boot/Makefile.in
target/device/Atmel/at91bootstrap/at91bootstrap.mk
target/device/KwikByte/Makefile.in
target/device/x86/i686/Makefile.in
target/ext2/ext2root.mk
target/generic/Makefile.in
target/iso9660/iso9660.mk
target/jffs2/jffs2root.mk
target/linux/Makefile.in
target/linux/Makefile.in.advanced
target/squashfs/squashfsroot.mk
target/tar/tarroot.mk
target/u-boot/Makefile.in
target/ubifs/ubifsroot.mk
target/xtensa/patch.in

index a835353e42975716b90046307a452e224a9e1573..df980b47393f9f3a3462c3476c2f29948d0ab8d4 100644 (file)
@@ -1,12 +1,9 @@
-BR2_PACKAGE_LINUX_FORMAT:=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT)))
-#"))
-BR2_PACKAGE_LINUX_KCONFIG:=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG)))
-#"))
+BR2_PACKAGE_LINUX_FORMAT:=$(call qstrip,$(BR2_PACKAGE_LINUX_FORMAT))
+BR2_PACKAGE_LINUX_KCONFIG:=$(call qstrip,$(BR2_PACKAGE_LINUX_KCONFIG))
 
 
 # COPY_FILE absolute_path_to_file, target_directory, filename
-ifneq ($(strip $(subst ",,$(BUILDROOT_COPYTO))),)      # Use shell definition
-#"))
+ifneq ($(call qstrip,$(BUILDROOT_COPYTO)),)    # Use shell definition
 define COPY_FILE
        @echo "BUILDROOT_COPYTO: Copy to $(BUILDROOT_COPYTO)/$(strip $(3))" ; \
        mkdir -p $(BINARIES_DIR) || echo "Could not create $(BINARIES_DIR)" ; \
@@ -18,25 +15,23 @@ define COPY_FILE
                cp $(1) $(BUILDROOT_COPYTO)/$(strip $(3)) || echo "Could not copy $(3)" ;  \
        fi
 endef
-COPYTO=$(strip $(subst ",,$(BUILDROOT_COPYTO)))
+COPYTO=$(call qstrip,$(BUILDROOT_COPYTO))
 else
-ifneq ($(strip $(subst ",,$(BR2_COPYTO))),)    # Global override
-#"))
+ifneq ($(call qstrip,$(BR2_COPYTO)),)  # Global override
 define COPY_FILE
        @echo "BR2_COPYTO: Copy to $(BR2_COPYTO)/$(strip $(3))" ; \
        mkdir -p $(BINARIES_DIR) || echo "Could not create $(BINARIES_DIR)" ; \
        if [ -w $(BINARIES_DIR) -o -w $(BINARIES_DIR)  ] ; then \
                cp $(1) $(BINARIES_DIR)/$(strip $(3)) || echo "Could not copy $(3)" ;  \
        fi ; \
-       if [ "$(strip $(subst ",,$(BR2_COPYTO)))X" != "X" ] ; then \
+       if [ "$(call qstrip,$(BR2_COPYTO))X" != "X" ] ; then \
                mkdir -p $(BR2_COPYTO)  || echo "Could not create $(BR2_COPYTO)" ; \
                if [ -d $(BR2_COPYTO) -o -w $(BR2_COPYTO) ] ; then \
                        cp $(1) $(BR2_COPYTO)/$(strip $(3)) || echo "Could not copy $(3)" ;  \
                fi ; \
        fi
 endef
-#"))
-COPYTO=$(strip $(subst ",,$(BR2_COPYTO)))
+COPYTO=$(call qstrip,$(BR2_COPYTO))
 else   # Package specific copyto, or empty
 define COPY_FILE
        @echo "Copy to $(2)/$(strip $(3))" ; \
@@ -44,14 +39,13 @@ define COPY_FILE
        if [ -w $(BINARIES_DIR) -o -w $(BINARIES_DIR)  ] ; then \
                cp $(1) $(BINARIES_DIR)/$(strip $(3)) || echo "Could not copy $(3)" ;  \
        fi ; \
-       if [ "$(strip $(subst ",,$(2)))X" != "X" ] ; then \
+       if [ "$(call qstrip,$(2))X" != "X" ] ; then \
                mkdir -p $(2) || echo "Could not create $(2)" ; \
                if [ -d $(2) -o  -w $(2) ] ; then \
                        cp $(1) $(2)/$(strip $(3)) || echo "Could not copy $(3)" ;  \
                fi ; \
        fi
 endef
-#"))
 endif
 endif
 
index 08983ffd684502927d113e33823de766aabdfe54..0dbdb2eb45ab19bf1b2e16e05da22fb7691a97fd 100644 (file)
@@ -31,8 +31,7 @@ else
 CPIO_TARGET := $(CPIO_BASE)
 endif
 
-ROOTFS_CPIO_COPYTO:=$(strip $(subst ",,$(BR2_TARGET_ROOTFS_CPIO_COPYTO)))
-# "))
+ROOTFS_CPIO_COPYTO:=$(call qstrip,$(BR2_TARGET_ROOTFS_CPIO_COPYTO))
 #
 
 cpioroot-init:
index e2ca41521b3a0fd12c1314d3cacb348d7b993654..99f9f798964eaf9cb520d9b63ee3a6c54a0d39c3 100644 (file)
@@ -5,8 +5,7 @@
 #############################################################
 CRAMFS_DIR=$(BUILD_DIR)/cramfs-1.1
 CRAMFS_SOURCE=cramfs-1.1.tar.gz
-ifeq ($(strip $(subst ",,$(BR2_SOURCEFORGE_MIRROR))),unc)
-# "))
+ifeq ($(call qstrip,$(BR2_SOURCEFORGE_MIRROR)),unc)
 # UNC does not seem to have cramfs
 CRAMFS_SITE=http://internap.dl.sourceforge.net/sourceforge/cramfs
 else
index a846ba6b2320dacb3b883273886a7760910e31b6..18e7b7d87485100c8226a73b7d2ff797f5d835fe 100644 (file)
@@ -1,8 +1,6 @@
 ifeq ($(BR2_TARGET_ARMLTD),y)
-BOARD_NAME=$(strip $(subst ",,$(BR2_BOARD_NAME)))
-#"))
-BOARD_PATH=$(strip $(subst ",,$(BR2_BOARD_PATH)))
-#"))
+BOARD_NAME=$(call qstrip,$(BR2_BOARD_NAME))
+BOARD_PATH=$(call qstrip,$(BR2_BOARD_PATH))
 
 
 # pin some settings
index b3735bca94a0cbecb79e1dc18919a400e0b4498f..c3dc857d439929276ae44dc866acd386ecab4733 100644 (file)
@@ -5,8 +5,7 @@
 #############################################################
 DATAFLASHBOOT_VERSION:=1.05
 DATAFLASHBOOT_NAME:=DataflashBoot-$(DATAFLASHBOOT_VERSION)
-ATMEL_MIRROR:=$(strip $(subst ",, $(BR2_ATMEL_MIRROR)))
-# "))
+ATMEL_MIRROR:=$(call qstrip,$(BR2_ATMEL_MIRROR))
 DATAFLASHBOOT_SITE:=$(ATMEL_MIRROR)
 DATAFLASHBOOT_SOURCE:=$(DATAFLASHBOOT_NAME).tar.bz2
 DATAFLASHBOOT_DIR:=$(PROJECT_BUILD_DIR)/$(DATAFLASHBOOT_NAME)
index 70d380586a94c9c23f3ff6d5c55c8bcc9f68310e..bb0352985fa7cae37006924764c5e4a36efc272d 100644 (file)
@@ -3,10 +3,8 @@
 ifeq ($(BR2_TARGET_ATMEL),y)
 ATMEL_PATH:=target/device/Atmel
 
-BOARD_NAME:=$(strip $(subst ",, $(BR2_BOARD_NAME)))
-#"))
-BOARD_PATH:=$(strip $(subst ",, $(BR2_BOARD_PATH)))
-#"))
+BOARD_NAME:=$(call qstrip,$(BR2_BOARD_NAME))
+BOARD_PATH:=$(call qstrip,$(BR2_BOARD_PATH))
 
 ATMEL_TARGET:=$(ATMEL_PATH)/root
 TARGET_SKELETON:=$(ATMEL_TARGET)/target_skeleton
@@ -18,26 +16,23 @@ KERNEL_HEADERS_PATCH_DIR=target/device/Atmel/arch-avr32/kernel-headers-2.6.28.2
 endif
 
 ifneq ($(COPYTO),)
-TARGET_ATMEL_COPYTO:=$(strip $(subst ",, $(BR2_COPYTO)))
+TARGET_ATMEL_COPYTO:=$(call qstrip,$(BR2_COPYTO))
 else
-TARGET_ATMEL_COPYTO:=$(strip $(subst ",, $(BR2_TARGET_ATMEL_COPYTO)))
+TARGET_ATMEL_COPYTO:=$(call qstrip,$(BR2_TARGET_ATMEL_COPYTO))
 endif
 
 # These are set by Config.in
-DOWNLOAD_LINUX26_VERSION:= $(strip $(subst ",, $(BR2_DOWNLOAD_LINUX26_VERSION)))
-#"))
+DOWNLOAD_LINUX26_VERSION:= $(call qstrip,$(BR2_DOWNLOAD_LINUX26_VERSION))
 ifeq ($(DOWNLOAD_LINUX26_VERSION),)
 DOWNLOAD_LINUX26_VERSION=$(LINUX_HEADERS_VERSION)
 endif
 
-LINUX26_VERSION:=$(strip $(subst ",, $(BR2_LINUX26_VERSION)))
-#"))
+LINUX26_VERSION:=$(call qstrip,$(BR2_LINUX26_VERSION))
 ifeq ($(LINUX26_VERSION),)
 LINUX26_VERSION=$(LINUX_HEADERS_VERSION)
 endif
 
-LINUX26_RC_PATCH:=$(strip $(subst ",, $(BR2_LINUX26_RC_PATCH)))
-#"))
+LINUX26_RC_PATCH:=$(call qstrip,$(BR2_LINUX26_RC_PATCH))
 
 # These are set by "new" Config.in
 LINUX26_KCONFIG:=$(BOARD_PATH)/$(BOARD_NAME)-linux-$(LINUX26_VERSION).config
@@ -62,8 +57,7 @@ DFB_BOARD_NAME:=$(BOARD_NAME)
 
 #BR2_PACKAGE_BUSYBOX_CONFIG:=$(BR2_BOARD_PATH)/busybox-$(BR2_BUSYBOX_VERSION).config
 
-U_BOOT_VERSION:=$(strip $(subst ",,$(BR2_UBOOT_VERSION)))
-#"))
+U_BOOT_VERSION:=$(call qstrip,$(BR2_UBOOT_VERSION))
 
 # Update things in board specific makefiles
 include target/device/Atmel/*/Makefile.in
index 841895c5985fdd0b7e5ef184b5035fd4715ce18b..b5981e176deec3d66d0a94e781cc3e8d7bf9d5b0 100644 (file)
@@ -1,5 +1,4 @@
 ifneq ($(BR2_TARGET_U_BOOT_ARCH_AT91_PATCH_DIR),)
-U_BOOT_ARCH_PATCH_DIR:=$(strip $(subst ",, $(BR2_TARGET_U_BOOT_ARCH_AT91_PATCH_DIR)))
-#"))
+U_BOOT_ARCH_PATCH_DIR:=$(call qstrip,$(BR2_TARGET_U_BOOT_ARCH_AT91_PATCH_DIR))
 endif
 
index b68be5e40e4a2c4f7fb5d98a96e92dd09f7d9420..92da683dadc2cbd49b76c87297012c44db1fb758 100644 (file)
@@ -7,29 +7,23 @@ AT91BOOTSTRAP_VERSION:=2.10
 AT91BOOTSTRAP_PATCH_LEVEL:=
 AT91BOOTSTRAP_PATCHED_VERSION:=$(AT91BOOTSTRAP_VERSION)$(AT91BOOTSTRAP_PATCH_LEVEL)
 AT91BOOTSTRAP_NAME:=at91bootstrap-$(AT91BOOTSTRAP_VERSION)
-ATMEL_MIRROR:=$(strip $(subst ",, $(BR2_ATMEL_MIRROR)))
-#"))
+ATMEL_MIRROR:=$(call qstrip,$(BR2_ATMEL_MIRROR))
 AT91BOOTSTRAP_SITE:=$(ATMEL_MIRROR)
 AT91BOOTSTRAP_SOURCE:=$(AT91BOOTSTRAP_NAME).tar.bz2
 AT91BOOTSTRAP_DIR:=$(PROJECT_BUILD_DIR)/$(AT91BOOTSTRAP_NAME)
-AT91BOOTSTRAP:=$(strip $(subst ",, $(BR2_AT91BOOTSTRAP)))
-#"))
+AT91BOOTSTRAP:=$(call qstrip,$(BR2_AT91BOOTSTRAP))
 AT91BOOTSTRAP_ZCAT:=$(BZCAT)
 
-AT91BOOTSTRAP_BOARD:=$(strip $(subst ",, $(BR2_TARGET_AT91BOOTSTRAP_BOARD)))
-#"))
+AT91BOOTSTRAP_BOARD:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD))
 
-AT91BOOTSTRAP_MEMORY:=$(strip $(subst ",, $(BR2_TARGET_AT91BOOTSTRAP_MEMORY)))
-#"))
+AT91BOOTSTRAP_MEMORY:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY))
 
 AT91BOOTSTRAP_BINARY:=$(BOARD_NAME)-$(AT91BOOTSTRAP_MEMORY)boot-$(AT91BOOTSTRAP_PATCHED_VERSION).bin
 
 AT91BOOTSTRAP_TARGET:=$(AT91BOOTSTRAP_DIR)/binaries/$(AT91BOOTSTRAP_BINARY)
 
-AT91BOOTSTRAP_JUMP_ADDR:=$(strip $(subst ",, $(BR2_AT91BOOTSTRAP_JUMP_ADDR)))
-#"))
-AT91BOOTSTRAP_IMG_SIZE:=$(strip $(subst ",, $(BR2_AT91BOOTSTRAP_IMG_SIZE)))
-#"))
+AT91BOOTSTRAP_JUMP_ADDR:=$(call qstrip,$(BR2_AT91BOOTSTRAP_JUMP_ADDR))
+AT91BOOTSTRAP_IMG_SIZE:=$(call qstrip,$(BR2_AT91BOOTSTRAP_IMG_SIZE))
 
 AT91_CUSTOM_FLAGS:=
 ifneq ($(AT91BOOTSTRAP_JUMP_ADDR),)
index 347d6ab60869a3993f64f0e03544c5e4783b2d28..d889bc25801f3b70bb7a2f2d72978db2c8c9c440 100644 (file)
@@ -1,17 +1,15 @@
 ifeq ($(BR2_TARGET_KWIKBYTE),y)
 
-BOARD_NAME:=$(strip  $(subst ",, $(BR2_BOARD_NAME)))
-BOARD_PATH:=$(strip  $(subst ",, $(BR2_BOARD_PATH)))
+BOARD_NAME:=$(call qstrip,$(BR2_BOARD_NAME))
+BOARD_PATH:=$(call qstrip,$(BR2_BOARD_PATH))
 
 # These are set by Config.in
-DOWNLOAD_LINUX26_VERSION:=$(strip  $(subst ",, $(BR2_DOWNLOAD_LINUX26_VERSION)))
-#"))
+DOWNLOAD_LINUX26_VERSION:=$(call qstrip,$(BR2_DOWNLOAD_LINUX26_VERSION))
 ifeq ($(DOWNLOAD_LINUX26_VERSION),)
 DOWNLOAD_LINUX26_VERSION=$(LINUX_HEADERS_VERSION)
 endif
 
-LINUX26_VERSION:=$(strip  $(subst ",, $(BR2_LINUX26_VERSION)))
-#"))
+LINUX26_VERSION:=$(call qstrip,$(BR2_LINUX26_VERSION))
 ifeq ($(LINUX26_VERSION),)
 LINUX26_VERSION=$(LINUX_HEADERS_VERSION)
 endif
index 99ef63b158ee774a03981beb68d94d03c3ae76d3..41d2bbc2117996c4eceb6da134d9301b83805ad1 100644 (file)
@@ -1,7 +1,5 @@
-BOARD_NAME=$(strip $(subst ",,$(BR2_BOARD_NAME)))
-#"))
-BOARD_PATH=$(strip $(subst ",,$(BR2_BOARD_PATH)))
-#"))
+BOARD_NAME=$(call qstrip,$(BR2_BOARD_NAME))
+BOARD_PATH=$(call qstrip,$(BR2_BOARD_PATH))
 
 
 
index 4fadefa194511396f8f26f214273faf7174d071a..11624cf11ddb4850f26dc5f917a2f6c649736cd4 100644 (file)
@@ -58,8 +58,7 @@ ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),)
 EXT2_OPTS += -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
 endif
 
-EXT2_BASE := $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_OUTPUT))
-#")
+EXT2_BASE := $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_OUTPUT))
 
 EXT2_ROOTFS_COMPRESSOR:=
 EXT2_ROOTFS_COMPRESSOR_EXT:=
@@ -121,8 +120,7 @@ $(EXT2_BASE).$(EXT2_ROOTFS_COMPRESSOR_EXT): $(EXT2_ROOTFS_COMPRESSOR_PREREQ) $(E
        $(EXT2_ROOTFS_COMPRESSOR) $(EXT2_BASE) > $(EXT2_TARGET)
 endif
 
-EXT2_COPYTO := $(strip $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_COPYTO)))
-# "))
+EXT2_COPYTO := $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_COPYTO))
 
 ext2root: $(EXT2_TARGET)
        @ls -l $(EXT2_TARGET)
index 3541264c8f9aabb9d1e570d8d8b52fa3c59e69c7..084acf48b0c3ae3e364e5b21fec9424a5ce1406c 100644 (file)
@@ -7,10 +7,8 @@ TARGET_SKELETON=target/generic/target_busybox_skeleton
 TARGET_DEVICE_TABLE=target/generic/mini_device_table.txt
 endif
 
-TARGET_GENERIC_GETTY:=$(strip $(subst ",, $(BR2_TARGET_GENERIC_GETTY_PORT)))
-#"))
-TARGET_GENERIC_GETTY_BAUDRATE:=$(strip $(subst ",, $(BR2_TARGET_GENERIC_GETTY_BAUDRATE)))
-#"))
+TARGET_GENERIC_GETTY:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT))
+TARGET_GENERIC_GETTY_BAUDRATE:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE))
 
 target-generic-getty:
        $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY) $(TARGET_GENERIC_GETTY_BAUDRATE) vt100 #~' \
index 2525286f69703dec000a050b003bd9e19557da80..4dfa1adf8d4a8f209c2f09dc17f8fc7d7e9b164d 100644 (file)
@@ -44,10 +44,8 @@ mkisofs-dirclean:
 #############################################################
 
 ISO9660_TARGET_DIR=$(BUILD_DIR)/iso9660
-ISO9660_TARGET:=$(subst ",,$(BR2_TARGET_ROOTFS_ISO9660_OUTPUT))
-#")
-ISO9660_BOOT_MENU:=$(subst ",,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU))
-#")
+ISO9660_TARGET:=$(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_OUTPUT))
+ISO9660_BOOT_MENU:=$(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU))
 ISO9660_OPTS:=
 
 ifeq ($(BR2_TARGET_ROOTFS_ISO9660_SQUASH),y)
index a89dc801130fafa92037451dbfa24fc4834102e4..9d6734790d6eead3de082589a46c89cc764563bc 100644 (file)
@@ -32,8 +32,7 @@ JFFS2_OPTS += -n
 SUMTOOL_OPTS += -n
 endif
 
-JFFS2_TARGET := $(strip $(subst ",,$(BR2_TARGET_ROOTFS_JFFS2_OUTPUT)))
-#"))
+JFFS2_TARGET := $(call qstrip,$(BR2_TARGET_ROOTFS_JFFS2_OUTPUT))
 ifneq ($(TARGET_DEVICE_TABLE),)
 JFFS2_OPTS += -D $(TARGET_DEVICE_TABLE)
 endif
@@ -75,8 +74,7 @@ ifeq ($(BR2_JFFS2_TARGET_SREC),y)
        @ls -l $(JFFS2_TARGET).srec
 endif
 
-JFFS2_COPYTO := $(strip $(subst ",,$(BR2_TARGET_ROOTFS_JFFS2_COPYTO)))
-#"))
+JFFS2_COPYTO := $(call qstrip,$(BR2_TARGET_ROOTFS_JFFS2_COPYTO))
 
 jffs2root: $(JFFS2_TARGET)
 ifneq ($(JFFS2_COPYTO),)
index 3e8bc7b3072c89d064d8136de53709625a305227..742fe1942f5cba34c29a0173701fa094554e79ac 100644 (file)
@@ -26,28 +26,23 @@ LINUX26_BZCAT:=$(BZCAT)
 LINUX26_SITE=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6
 
 ifeq ($(BOARD_PATH),)
-BOARD_PATH:=$(strip $(subst ",,$(BR2_BOARD_PATH)))
-#"))
+BOARD_PATH:=$(call qstrip,$(BR2_BOARD_PATH))
 endif
 
 # Linux kernel configuration file
 # Has to be set by the target/device
 # If it is not set by the target/device, then pick the one from .config
 ifndef LINUX26_KCONFIG
-ifneq ($(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG))),)
-LINUX26_KCONFIG=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG)))
-#"))
-#"))
+ifneq ($(call qstrip,$(BR2_PACKAGE_LINUX_KCONFIG)),)
+LINUX26_KCONFIG=$(call qstrip,$(BR2_PACKAGE_LINUX_KCONFIG))
 else
 # LINUX26_KCONFIG=$(BOARD_PATH)/linux26.config
 endif
 endif
 
 ifndef LINUX26_FORMAT
-ifneq ($(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT))),)
-LINUX26_FORMAT=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT)))
-#"))
-#"))
+ifneq ($(call qstrip,$(BR2_PACKAGE_LINUX_FORMAT)),)
+LINUX26_FORMAT=$(call qstrip,$(BR2_PACKAGE_LINUX_FORMAT))
 else
 LINUX26_FORMAT=zImage
 endif
@@ -67,8 +62,7 @@ endif
 endif
 endif
 
-ROOTFS_STRIPPED_SUFFIX=$(strip $(subst ",,$(ROOTFS_SUFFIX)))
-#"))
+ROOTFS_STRIPPED_SUFFIX=$(call qstrip,$(ROOTFS_SUFFIX))
 # File name for the Linux kernel binary
 ifndef LINUX26_KERNEL
 LINUX26_KERNEL_NAME=$(BINARIES_DIR)/$(LINUX26_FORMAT)$(ROOTFS_STRIPPED_SUFFIX)
@@ -86,7 +80,6 @@ LINUX_KERNEL=$(LINUX26_KERNEL_NAME)
 ifeq ($(strip $(LINUX26_PATCH_DIR)),)
 ifneq ($(BOARD_PATH),)
 LINUX26_PATCH_DIR:=$(BOARD_PATH)/kernel-patches/
-#"))
 endif
 endif
 LINUX26_MAKE_FLAGS = HOSTCC="$(HOSTCC)" HOSTCFLAGS="$(HOSTCFLAGS)" \
index 47a1f4ebb02bf3cfaa00ad3259a2a42b42d3760d..9de47350a625ff905892f5463ba91aeee9be42e4 100644 (file)
@@ -20,8 +20,7 @@ endif
 # 4. Use default (2.6.22.1)
 ifeq ($(DOWNLOAD_LINUX26_VERSION),)
 ifneq ($(BR2_DOWNLOAD_LINUX26_VERSION),)
-DOWNLOAD_LINUX26_VERSION:=$(strip $(subst ",,$(BR2_DOWNLOAD_LINUX26_VERSION)))
-#"))
+DOWNLOAD_LINUX26_VERSION:=$(call qstrip,$(BR2_DOWNLOAD_LINUX26_VERSION))
 else
 DOWNLOAD_LINUX26_VERSION:=$(LINUX_HEADERS_VERSION)
 endif
@@ -35,8 +34,7 @@ endif
 # 4. Use default (2.6.22.1)
 ifeq ($(LINUX26_VERSION),)
 ifneq ($(BR2_LINUX26_VERSION),)
-LINUX26_VERSION:=$(strip $(subst ",,$(BR2_LINUX26_VERSION)))
-#"))
+LINUX26_VERSION:=$(call qstrip,$(BR2_LINUX26_VERSION))
 else
 LINUX26_VERSION:=$(LINUX_HEADERS_VERSION)
 endif
@@ -46,8 +44,7 @@ endif
 LINUX26_VERSION_PROBED = `$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) -s kernelrelease`
 
 ifeq ($(BOARD_PATH),)
-BOARD_PATH:=$(strip $(subst ",,$(BR2_BOARD_PATH)))
-#"))
+BOARD_PATH:=$(call qstrip,$(BR2_BOARD_PATH))
 endif
 
 # Version of Linux AFTER patches
@@ -60,16 +57,12 @@ LINUX_DIR:=$(LINUX26_DIR)
 # -----------------------------------------------------------------------------
 # Define source name and sites
 LINUX26_SOURCE:=linux-$(DOWNLOAD_LINUX26_VERSION).tar.bz2
-LINUX26_SITE:=$(strip $(subst ",,$(BR2_KERNEL_SITE)))
-#"))
+LINUX26_SITE:=$(call qstrip,$(BR2_KERNEL_SITE))
 
-LINUX26_PATCH_SOURCE:=$(strip $(subst ",,$(BR2_KERNEL_PATCH)))
-#"))
-LINUX26_PATCH_SITE:=$(strip $(subst ",,$(BR2_KERNEL_PATCH_SITE)))
-#"))
+LINUX26_PATCH_SOURCE:=$(call qstrip,$(BR2_KERNEL_PATCH))
+LINUX26_PATCH_SITE:=$(call qstrip,$(BR2_KERNEL_PATCH_SITE))
 
-LINUX26_BSP_PATCH:=$(strip $(subst ",,$(BR2_LINUX_BSP_PATCH)))
-#"))
+LINUX26_BSP_PATCH:=$(call qstrip,$(BR2_LINUX_BSP_PATCH))
 
 ifneq ($(LINUX26_BSP_PATCH),)
 LINUX_HEADERS_DEPENDS:=  $(DL_DIR)/$(LINUX26_BSP_PATCH)
@@ -86,8 +79,7 @@ LINUX26_PATCH_DIR:=$(BOARD_PATH)/kernel-patches/
 endif
 
 # kernel architecture patches provided by buildroot
-KERNEL_ARCH_PATCH_DIR:=$(strip $(subst ",,$(BR2_KERNEL_ARCH_PATCH_DIR)))
-#"))
+KERNEL_ARCH_PATCH_DIR:=$(call qstrip,$(BR2_KERNEL_ARCH_PATCH_DIR))
 
 
 
@@ -98,10 +90,8 @@ KERNEL_ARCH_PATCH_DIR:=$(strip $(subst ",,$(BR2_KERNEL_ARCH_PATCH_DIR)))
 # Has to be set by the target/device
 # If it is not set by the target/device, then pick the one from .config
 ifndef LINUX26_KCONFIG
-ifneq ($(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG))),)
-LINUX26_KCONFIG:=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_KCONFIG)))
-#"))
-#"))
+ifneq ($(call qstrip,$(BR2_PACKAGE_LINUX_KCONFIG)),)
+LINUX26_KCONFIG:=$(call qstrip,$(BR2_PACKAGE_LINUX_KCONFIG))
 else
 ifeq ($(BR2_i386),y)
 LINUX26_KCONFIG:=$(BOARD_PATH)/linux26.config
@@ -111,18 +101,15 @@ endif
 endif
 endif
 
-KERNEL_CONFIG_METHOD:=$(strip $(subst ",,$(BR2_KERNEL_CONFIG_METHOD)))
-#"))
+KERNEL_CONFIG_METHOD:=$(call qstrip,$(BR2_KERNEL_CONFIG_METHOD))
 ifeq ($(KERNEL_CONFIG_METHOD),)
 KERNEL_CONFIG_METHOD:=menuconfig
 endif
 
 # -----------------------------------------------------------------------------
 ifndef LINUX26_FORMAT
-ifneq ($(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT))),)
-#"))
-LINUX26_FORMAT:=$(strip $(subst ",,$(BR2_PACKAGE_LINUX_FORMAT)))
-#"))
+ifneq ($(call qstrip,$(BR2_PACKAGE_LINUX_FORMAT)),)
+LINUX26_FORMAT:=$(call qstrip,$(BR2_PACKAGE_LINUX_FORMAT))
 else
 LINUX26_FORMAT:=zImage
 endif
@@ -168,8 +155,7 @@ LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/bzImage
 endif
 endif
 
-ROOTFS_STRIPPED_SUFFIX=$(strip $(subst ",,$(ROOTFS_SUFFIX)))
-#"))
+ROOTFS_STRIPPED_SUFFIX=$(call qstrip,$(ROOTFS_SUFFIX))
 # -----------------------------------------------------------------------------
 # File name for the Linux kernel binary
 LINUX26_KERNEL_NAME:=$(LINUX26_FORMAT)$(ROOTFS_STRIPPED_SUFFIX)
@@ -234,10 +220,8 @@ ifeq ($(BR2_LINUX_COPYTO_TFTPBOOT),y)
 LINUX26_TARGETS+=/tftpboot/$(LINUX26_KERNEL_NAME)
 endif
 
-ifneq ($(strip $(subst ",,$(BR2_LINUX_COPYTO))),)
-LINUX_COPYTO:=$(strip $(subst ",,$(BR2_LINUX_COPYTO)))
-#"))
-#"))
+ifneq ($(call qstrip,$(BR2_LINUX_COPYTO)),)
+LINUX_COPYTO:=$(call qstrip,$(BR2_LINUX_COPYTO))
 LINUX26_TARGETS+=$(LINUX_COPYTO)/$(LINUX26_KERNEL_NAME)
 endif
 
@@ -294,8 +278,7 @@ endif
 # =============================================================================
 linux_patch: $(LINUX26_DIR)/.patched.board
 
-KERNEL_EXTRA_VERSION:=$(strip $(subst ",,$(BR2_EXTRA_VERSION)))
-#"))
+KERNEL_EXTRA_VERSION:=$(call qstrip,$(BR2_EXTRA_VERSION))
 
 lxcf:  $(LINUX26_DIR)/.config
 
@@ -337,7 +320,7 @@ ifeq ($(BR2_PACKAGE_LINUX_USE_KCONFIG),y)
                $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) $(KERNEL_CONFIG_METHOD) ; \
        fi
 endif
-ifneq ($(strip $(subst ",,$(BR2_EXTRA_VERSION))),)
+ifneq ($(call qstrip,$(BR2_EXTRA_VERSION)),)
        $(SED) 's,^EXTRAVERSION.*,EXTRAVERSION = $(KERNEL_EXTRA_VERSION),g' $(LINUX26_DIR)/Makefile
 endif
 # $(strip $(subst ",, - ))
index 019ed8bbcf418873125ba2fea08f114e3baf6e76..d7d559bab9dea3b09c1bb21ed8404abd8119ed70 100644 (file)
@@ -3,8 +3,7 @@
 # mksquashfs to build to target squashfs filesystems
 #
 #############################################################
-SQUASHFS_VERSION:=$(strip $(subst ",,$(BR2_TARGET_ROOTFS_SQUASHFS_VERSION)))
-#"))
+SQUASHFS_VERSION:=$(call qstrip,$(BR2_TARGET_ROOTFS_SQUASHFS_VERSION))
 SQUASHFS_DIR:=$(BUILD_DIR)/squashfs$(SQUASHFS_VERSION)
 SQUASHFS_SOURCE:=squashfs$(SQUASHFS_VERSION).tar.gz
 SQUASHFS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/squashfs
index 5b33c6213951869039038a5a4eb5982f55f5fc09..a62f5bf6557566fb8bd6f5288c184ec454a92679 100644 (file)
@@ -21,8 +21,7 @@ ifeq ($(BR2_TARGET_ROOTFS_TAR_LZMA),y)
 TAR_COMPRESSOR:=lzma -9 -c
 TAR_COMPRESSOR_EXT:=lzma
 endif
-ROOTFS_TAR_COPYTO:=$(strip $(subst ",,$(BR2_TARGET_ROOTFS_TAR_COPYTO)))
-# "))
+ROOTFS_TAR_COPYTO:=$(call qstrip,$(BR2_TARGET_ROOTFS_TAR_COPYTO))
 
 tarroot: host-fakeroot makedevs
        # Use fakeroot to pretend all target binaries are owned by root
index b74e43aab46c30da8b48d68a1c65f857ec29ef12..3dc78b1651cfd98eded949b36f56b20ecda0a517 100644 (file)
@@ -3,13 +3,11 @@
 # U-Boot
 #
 #############################################################
-U_BOOT_VERSION:=$(strip $(subst ",,$(BR2_UBOOT_VERSION)))
-#"))
+U_BOOT_VERSION:=$(call qstrip,$(BR2_UBOOT_VERSION))
 
 U_BOOT_SOURCE:=u-boot-$(U_BOOT_VERSION).tar.bz2
 
-U_BOOT_SITE:=$(strip $(subst ",,$(BR2_U_BOOT_SITE)))
-#"))
+U_BOOT_SITE:=$(call qstrip,$(BR2_U_BOOT_SITE))
 U_BOOT_DIR:=$(PROJECT_BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
 U_BOOT_PATCH_DIR:=$(PROJECT_BUILD_DIR)/u-boot-$(U_BOOT_VERSION)-patches
 U_BOOT_CAT:=$(BZCAT)
@@ -23,27 +21,20 @@ U_BOOT_AUTOSCRIPT=$(BINARIES_DIR)/autoscript
 
 U_BOOT_TARGETS:=$(BINARIES_DIR)/$(U_BOOT_BIN) $(U_BOOT_TOOLS)
 
-ifeq ($(strip $(subst ",,$(BR2_TARGET_UBOOT_DEFAULT_ENV))),y)
-#"))
+ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_DEFAULT_ENV)),y)
 U_BOOT_TARGETS += u-boot-autoscript
 endif
 
-TARGET_UBOOT_IPADDR:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_IPADDR)))
-#"))
-TARGET_UBOOT_SERVERIP:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_SERVERIP)))
-#"))
-TARGET_UBOOT_GATEWAY:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_GATEWAY)))
-#"))
-TARGET_UBOOT_NETMASK:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_NETMASK)))
-#"))
-TARGET_UBOOT_ETHADDR:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_ETHADDR)))
-#"))
+TARGET_UBOOT_IPADDR:=$(call qstrip,$(BR2_TARGET_UBOOT_IPADDR))
+TARGET_UBOOT_SERVERIP:=$(call qstrip,$(BR2_TARGET_UBOOT_SERVERIP))
+TARGET_UBOOT_GATEWAY:=$(call qstrip,$(BR2_TARGET_UBOOT_GATEWAY))
+TARGET_UBOOT_NETMASK:=$(call qstrip,$(BR2_TARGET_UBOOT_NETMASK))
+TARGET_UBOOT_ETHADDR:=$(call qstrip,$(BR2_TARGET_UBOOT_ETHADDR))
 
 # u-boot still uses arch=ppc for powerpc
 U_BOOT_ARCH=$(KERNEL_ARCH:powerpc=ppc)
 ifeq ($(UBOOT_BOARD_NAME),)
-UBOOT_BOARD_NAME:=$(strip $(subst ",,$(BR2_TARGET_UBOOT_BOARDNAME)))
-#"))
+UBOOT_BOARD_NAME:=$(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME))
 endif
 
 U_BOOT_INC_CONF_FILE:=$(U_BOOT_DIR)/include/config.h
@@ -67,9 +58,8 @@ define insert_define
 @echo "#ifdef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE)
 @echo "#undef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE)
 @echo "#endif" >> $(U_BOOT_INC_CONF_FILE)
-@echo '#define $(strip $(1)) $(strip $(subst ",,$(2)))' >> $(U_BOOT_INC_CONF_FILE)
+@echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(U_BOOT_INC_CONF_FILE)
 endef
-#"))
 
 $(DL_DIR)/$(U_BOOT_SOURCE):
         $(call DOWNLOAD,$(U_BOOT_SITE),$(U_BOOT_SOURCE))
index 1707e46e3338b20a9fd4aee3f65155c32b0a246a..c09c9819e3f8b3bfc4ed3e5d45736e4da38ce568 100644 (file)
@@ -38,8 +38,7 @@ mkfs.ubifs: $(MKFS_UBIFS_DIR)/mkfs.ubifs
 
 UBIFS_OPTS := -e $(BR2_TARGET_ROOTFS_UBIFS_LEBSIZE) -c $(BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT) -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
 
-UBIFS_BASE := $(subst ",,$(BR2_TARGET_ROOTFS_UBIFS_OUTPUT))
-#")
+UBIFS_BASE := $(call qstrip,$(BR2_TARGET_ROOTFS_UBIFS_OUTPUT))
 
 ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB),y)
 UBIFS_OPTS += -x zlib
@@ -99,8 +98,7 @@ $(UBIFS_BASE).$(UBIFS_ROOTFS_COMPRESSOR_EXT): $(UBIFS_ROOTFS_COMPRESSOR_PREREQ)
        $(UBIFS_ROOTFS_COMPRESSOR) $(UBIFS_BASE) > $(UBIFS_TARGET)
 endif
 
-UBIFS_COPYTO := $(strip $(subst ",,$(BR2_TARGET_ROOTFS_UBIFS_COPYTO)))
-# "))
+UBIFS_COPYTO := $(call qstrip,$(BR2_TARGET_ROOTFS_UBIFS_COPYTO))
 
 ubifsroot: $(UBIFS_TARGET)
        @ls -l $(UBIFS_TARGET)
index 5b723a8b40e54cd28526d461a1a9c52437d3c779..3fe5cc80dc90a689677371a452495dea1b37ba18 100644 (file)
@@ -19,7 +19,7 @@ ifneq ($(filter xtensa%,$(ARCH)),)
 #  overlay is selected).  So the function emits a Makefile error
 #  if a selected patch file is not found.
 
-XTENSA_CORENAME:=$(strip $(subst ",,$(BR2_xtensa_core_name)))
+XTENSA_CORENAME:=$(call qstrip,$(BR2_xtensa_core_name))
 ifeq ($(XTENSA_CORENAME),fsf)
 XTENSA_PATCH =
 else