From patchwork Sat Mar 9 21:04:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 226377 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 79E7F2C02FB for ; Sun, 10 Mar 2013 08:04:17 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BDB9284599; Sat, 9 Mar 2013 21:04:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uy1WY3-4EEbr; Sat, 9 Mar 2013 21:04:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 6677887AC9; Sat, 9 Mar 2013 21:04:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5A6D58F74B for ; Sat, 9 Mar 2013 21:04:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B23C787AC9 for ; Sat, 9 Mar 2013 21:04:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5nBVN9nKanUL for ; Sat, 9 Mar 2013 21:04:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [94.23.35.102]) by whitealder.osuosl.org (Postfix) with ESMTP id 513F384599 for ; Sat, 9 Mar 2013 21:04:10 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 74E21B5D; Sat, 9 Mar 2013 22:04:12 +0100 (CET) Received: from localhost.localdomain (20.222.3.200.ros.express.com.ar [200.3.222.20]) by mail.free-electrons.com (Postfix) with ESMTPA id 2C726814; Sat, 9 Mar 2013 22:04:10 +0100 (CET) From: Ezequiel Garcia To: Date: Sat, 9 Mar 2013 18:04:12 -0300 Message-Id: <1362863052-8781-1-git-send-email-ezequiel.garcia@free-electrons.com> X-Mailer: git-send-email 1.7.8.6 Subject: [Buildroot] [RFC/PATCH] fs/common.mk: Fix wrong double dollar usage X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Double dollar sign is used to put an explicit dollar sign, for instance, when writing a makefile rule. In this case, there are some makefile conditionals where makefile variables are evaluated using double dollar signs instead of single dollar, which is wrong. In particular, this fixes a buildroot 'make' stall when building with an empty device table (empty BR2_ROOTFS_DEVICE_TABLE). Signed-off-by: Ezequiel Garcia --- I'm sending this as RFC because I'm new to buildroot and because I'm not a makefile wizard. AFAIK, this fixes a real bug in my compilation, as explained in the commit message. fs/common.mk | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/common.mk b/fs/common.mk index 8b5b2f2..700dc00 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -47,9 +47,9 @@ $$(BINARIES_DIR)/rootfs.$(1): $$(ROOTFS_$(2)_DEPENDENCIES) rm -f $$(FAKEROOT_SCRIPT) rm -f $$(TARGET_DIR_WARNING_FILE) echo "chown -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT) -ifneq ($$(ROOTFS_DEVICE_TABLES),) +ifneq ($(ROOTFS_DEVICE_TABLES),) cat $$(ROOTFS_DEVICE_TABLES) > $$(FULL_DEVICE_TABLE) -ifeq ($$(BR2_ROOTFS_DEVICE_CREATION_STATIC),y) +ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y) printf '$$(subst $$(sep),\n,$$(PACKAGES_DEVICES_TABLE))' >> $$(FULL_DEVICE_TABLE) endif printf '$$(subst $$(sep),\n,$$(PACKAGES_PERMISSIONS_TABLE))' >> $$(FULL_DEVICE_TABLE) @@ -61,13 +61,13 @@ endif cp support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE) -@rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE) $$(foreach hook,$$(ROOTFS_$(2)_POST_GEN_HOOKS),$$(call $$(hook))$$(sep)) -ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y) +ifeq ($(BR2_TARGET_ROOTFS_$(2)_GZIP),y) gzip -9 -c $$@ > $$@.gz endif -ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y) +ifeq ($(BR2_TARGET_ROOTFS_$(2)_BZIP2),y) bzip2 -9 -c $$@ > $$@.bz2 endif -ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y) +ifeq ($(BR2_TARGET_ROOTFS_$(2)_LZMA),y) $$(LZMA) -9 -c $$@ > $$@.lzma endif @@ -76,7 +76,7 @@ rootfs-$(1)-show-depends: rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1) $$(ROOTFS_$(2)_POST_TARGETS) -ifeq ($$(BR2_TARGET_ROOTFS_$(2)),y) +ifeq ($(BR2_TARGET_ROOTFS_$(2)),y) TARGETS += rootfs-$(1) endif endef