From patchwork Fri Apr 10 20:35:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 17691 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3AKZR8Z025015 for ; Fri, 10 Apr 2009 20:35:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758424AbZDJUf0 (ORCPT ); Fri, 10 Apr 2009 16:35:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756693AbZDJUf0 (ORCPT ); Fri, 10 Apr 2009 16:35:26 -0400 Received: from acsinet12.oracle.com ([141.146.126.234]:16460 "EHLO acsinet12.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754030AbZDJUfZ (ORCPT ); Fri, 10 Apr 2009 16:35:25 -0400 Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n3AKYlw2027813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 10 Apr 2009 20:34:49 GMT Received: from acsmt704.oracle.com (acsmt704.oracle.com [141.146.40.82]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n3AKZL7N006140; Fri, 10 Apr 2009 20:35:22 GMT Received: from chimera.site (/141.144.72.97) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 10 Apr 2009 13:35:14 -0700 Date: Fri, 10 Apr 2009 13:35:38 -0700 From: Randy Dunlap To: linux-kbuild@vger.kernel.org Cc: linux-doc@vger.kernel.org, samr Subject: [PATCH?] docbook: make cleandocs Message-Id: <20090410133538.fa2b9798.randy.dunlap@oracle.com> Organization: Oracle Linux Eng. X-Mailer: Sylpheed 2.6.0 (GTK+ 2.12.0; x86_64-unknown-linux-gnu) Mime-Version: 1.0 X-Source-IP: acsmt704.oracle.com [141.146.40.82] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A09020A.49DFAD84.00CA:SCFMA4539814,ss=1,fgs=0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Hi Sam, "make clean" cleans DocBook generated files, but I would like a way to clean _only_ those generated files. Something like the patch below, except that it doesn't work. :( Can you give me ideas of how to fix it, please? Thanks, --- ~Randy From: Randy Dunlap Add a 'make cleandocs' target to clean up all generated DocBook files. Signed-off-by: Randy Dunlap --- Documentation/DocBook/Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) -- 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 --- linux-2.6.30-rc1-git3.orig/Documentation/DocBook/Makefile +++ linux-2.6.30-rc1-git3/Documentation/DocBook/Makefile @@ -31,7 +31,7 @@ PS_METHOD = $(prefer-db2x) ### # The targets that may be used. -PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs +PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) xmldocs: $(BOOKS) @@ -213,11 +213,12 @@ silent_gen_xml = : dochelp: @echo ' Linux kernel internal documentation in different formats:' @echo ' htmldocs - HTML' - @echo ' installmandocs - install man pages generated by mandocs' - @echo ' mandocs - man pages' @echo ' pdfdocs - PDF' @echo ' psdocs - Postscript' @echo ' xmldocs - XML DocBook' + @echo ' mandocs - man pages' + @echo ' installmandocs - install man pages generated by mandocs' + @echo ' cleandocs - clean all generated DocBook files' ### # Temporary files left by various tools @@ -235,6 +236,14 @@ clean-files := $(DOCBOOKS) \ clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man +cleandocs: + echo "clean-files: $(clean-files)" + echo "clean-dirs: $(clean-dirs)" + cd Documentation/DocBook + rm -f $(clean-files) + rm -rf $(clean-dirs) + cd ../.. + # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable se we can use it in if_changed and friends.