From patchwork Thu Jul 28 14:01:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 1015742 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6SE1jx9024196 for ; Thu, 28 Jul 2011 14:01:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751535Ab1G1OBo (ORCPT ); Thu, 28 Jul 2011 10:01:44 -0400 Received: from mail-gx0-f174.google.com ([209.85.161.174]:61489 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751007Ab1G1OBo convert rfc822-to-8bit (ORCPT ); Thu, 28 Jul 2011 10:01:44 -0400 Received: by gxk21 with SMTP id 21so1809534gxk.19 for ; Thu, 28 Jul 2011 07:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=fupV+4O9yDC3oxfs8AH5+Odz6RSl4xq7UDYvTXiogHk=; b=Krjfu53HzcxHEADBka9vjyx+kwuZ9WfckAU+zc/uvgx4+9Wk0Jjgf8u0s1knOmWJ4e ieaINDquZnOm0hP80a4aN+aJAqH1pBcJF3TyNhOA61JXVeNBzyCm8Znp+sGMEEMRPdeH iyrBfaSFswV4ibZJ70AwlBjEVY6G3Xh0GkniQ= MIME-Version: 1.0 Received: by 10.68.63.34 with SMTP id d2mr245372pbs.276.1311861702864; Thu, 28 Jul 2011 07:01:42 -0700 (PDT) Received: by 10.68.66.65 with HTTP; Thu, 28 Jul 2011 07:01:42 -0700 (PDT) In-Reply-To: <25697.1311857663@redhat.com> References: <25697.1311857663@redhat.com> Date: Thu, 28 Jul 2011 10:01:42 -0400 Message-ID: Subject: Re: 'make distclean' silently removes empty files From: Arnaud Lacombe To: David Howells Cc: Michal Marek , arnd@arndb.de, linux-kbuild@vger.kernel.org Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 28 Jul 2011 14:01:50 +0000 (UTC) Hi, On Thu, Jul 28, 2011 at 8:54 AM, David Howells wrote: > > Hi, > > Can 'make distclean' please be altered to _not_ silently remove empty files, > especially ones that are checked into GIT and/or are mentioned in Makefiles as > being compilable.  By all means flag them as requiring removal, remove them > noisily or give an error. > > A case in point is: > >        arch/arm/mach-zynq/board_dt.c > > which is an empty file checked into GIT. > For the record, it is deleted because of the zero size by: distclean: mrproper @find $(srctree) $(RCS_FIND_IGNORE) \ \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -size 0 \ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ -type f -print | xargs rm -f in the main makefile. Could you try: commit a73f6c8638a75d1bf1bb8b0ace82ddd3b9f0291b Author: Arnaud Lacombe Date: Thu Jul 28 10:00:33 2011 -0400 Makefile: do not delete zero-sized C file [space/tab mangled, but the change is obvious] - Arnaud > Thanks, > David > -- > To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at  http://vger.kernel.org/majordomo-info.html > --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Makefile b/Makefile index d018956..e9ca6ec 100644 --- a/Makefile +++ b/Makefile @@ -1198,7 +1198,7 @@ distclean: mrproper @find $(srctree) $(RCS_FIND_IGNORE) \ \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ - -o -name '.*.rej' -o -size 0 \ + -o -name '.*.rej' -o \( -size 0 -a ! -name '*.c' \) \ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ -type f -print | xargs rm -f