From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mk: fix command-line dependency check for quoted strings Date: Fri, 15 Nov 2013 15:55:37 +0100 Message-ID: <201311151555.37151.thomas.monjalon@6wind.com> References: <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 Cc: dev-VfR2kkLFssw@public.gmane.org To: Adrien Mazarguil Return-path: In-Reply-To: <1384526332-24702-1-git-send-email-adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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