From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 16ABA156 for ; Fri, 15 Nov 2013 15:54:47 +0100 (CET) Received: by mail-wg0-f54.google.com with SMTP id y10so3692209wgg.9 for ; Fri, 15 Nov 2013 06:55:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=4SxQRqv/vxKnl2qMVpEjzMEzh6/60ElUsv5O5yiIHj8=; b=mJbQufAPFNNNAqEN0oacEVdzNsytCWNn1ghGtwKF5dKLm1wFER4eeV6qMQ+PVq/6cV EYokkO7/QZ3/0Gz4XHHkeUFut2cBK97zIxi5dOieJtzgOr0Evgk/DEWDF/TM+gDTXlKs fLBa18K6COsDfi8YvQYXVqxqts0qbL+Rt76DP+Vyd8YGwtIkuusC7OTCbAJ398sf3Mr9 3kA+1x/tvJLnciOgWvT3H570QLpD6N1hmSyueJQqoelDiqM1Zo3wcQDjiw4flYSJXY+B K1Ire53SUVWrZSqQKJvAFLF8DukBdMqGBkl/UyOBroyaux9L1tbvFqfH52VWZvIV4WdK HvUg== X-Gm-Message-State: ALoCoQl9fNbssZzb2EKsxDMBoA1NUMiq1YVZtvHIO7MuQlIneMsjvxLTCTgv9TxMGtXogajLNSQz X-Received: by 10.180.9.71 with SMTP id x7mr7583669wia.28.1384527343445; Fri, 15 Nov 2013 06:55:43 -0800 (PST) Received: from angus.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id dz5sm1812042wib.7.2013.11.15.06.55.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Nov 2013 06:55:42 -0800 (PST) From: Thomas Monjalon Organization: 6WIND To: Adrien Mazarguil Date: Fri, 15 Nov 2013 15:55:37 +0100 User-Agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) References: <1384526332-24702-1-git-send-email-adrien.mazarguil@6wind.com> In-Reply-To: <1384526332-24702-1-git-send-email-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201311151555.37151.thomas.monjalon@6wind.com> Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] mk: fix command-line dependency check for quoted strings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2013 14:54:47 -0000 15/11/2013 15:38, Adrien Mazarguil : > Before recompiling a file, rte.compile-pre.mk checks whether the command > line is different from the previous one. > > This is done by storing for each object file the entire command line in a > kind of dependency file with a .cmd extension (see obj2cmd). If that file > exists, the line is retrieved first and compared against $(C_TO_O_STR). > The object file gets recompiled if the file doesn't exist or if the line > is different. > > The problem is that sometimes, files are recompiled for no apparent reason. > > The check doesn't work properly when a command line contains double-quoted > strings such as -DFOO='"bar"' because the shell interprets and strips them. > This is fixed by protecting C_TO_O_CMD with simple quotes, knowing that > such quotes are already escaped in C_TO_O_STR. > > Moreover, because simple quotes are escaped in C_TO_O_STR, the retrieved > command should be compared against C_TO_O instead. > > Signed-off-by: Adrien Mazarguil Acked and applied. Thanks -- Thomas