From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caiKI-00061G-3K for qemu-devel@nongnu.org; Mon, 06 Feb 2017 07:23:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caiKE-00073L-CI for qemu-devel@nongnu.org; Mon, 06 Feb 2017 07:23:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48335) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1caiKE-00072k-7N for qemu-devel@nongnu.org; Mon, 06 Feb 2017 07:23:18 -0500 Date: Mon, 6 Feb 2017 12:23:12 +0000 From: "Daniel P. Berrange" Message-ID: <20170206122312.GL3029@redhat.com> Reply-To: "Daniel P. Berrange" References: <20170206112953.16993-1-berrange@redhat.com> <20170206120515.GJ3029@redhat.com> <221a40d6-9688-d384-0d59-5b0fefe8206e@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <221a40d6-9688-d384-0d59-5b0fefe8206e@redhat.com> Subject: Re: [Qemu-devel] [PATCH] rules: don't try to create missing include dirs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , QEMU Developers , Alberto Garcia , Stefan Hajnoczi On Mon, Feb 06, 2017 at 01:22:08PM +0100, Paolo Bonzini wrote: > > > On 06/02/2017 13:05, Daniel P. Berrange wrote: > >>> $(shell mkdir -p ./ $(sort $(dir $($v)))) > >>> - $(shell cd $(BUILD_DIR) && mkdir -p ./ $(sort $(dir $($v)))) > >> I know this is the same syntax as the existing line above > >> and we're deleting it anyway, but what does it actually do? > >> When does telling mkdir to create "./" make sense? > > No idea why the ./ was there originally - it appears to serve no > > purpose. The useful bit is the stuff afterwards - the $($v) bit. > > It gets populated based on the variable being unnested. For example > > > > block-obj-y = block.o blockjob.o block/ nbd/ > > > > will make $v contain "block nbd", hence cause creation of those > > dirs in the the build dir. > > "mkdir -p" with no arguments gives an error, the "./" shuts it up. Ah yes, clever. So that deals with case of unnesting a variable which does not contain any nested dirs. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|