From patchwork Tue Jul 19 16:12:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goffredo Baroncelli X-Patchwork-Id: 989202 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 p6JGCDrH020644 for ; Tue, 19 Jul 2011 16:12:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751758Ab1GSQMK (ORCPT ); Tue, 19 Jul 2011 12:12:10 -0400 Received: from smtp207.alice.it ([82.57.200.103]:44444 "EHLO smtp207.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751393Ab1GSQMJ (ORCPT ); Tue, 19 Jul 2011 12:12:09 -0400 Received: from venice.bhome (82.59.204.123) by smtp207.alice.it (8.5.124.08) id 4DFA189A035430D4 for linux-btrfs@vger.kernel.org; Tue, 19 Jul 2011 18:12:08 +0200 Subject: [PATCH 6/6] Update the makefile for generating the help messages. To: linux-btrfs From: Goffredo Baroncelli Date: Tue, 19 Jul 2011 18:12:28 +0200 Message-ID: <20110719161228.3210.93016.stgit@venice.bhome> In-Reply-To: <20110719161049.3210.54794.stgit@venice.bhome> References: <20110719161049.3210.54794.stgit@venice.bhome> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@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]); Tue, 19 Jul 2011 16:12:13 +0000 (UTC) From: Goffredo Baroncelli Update the makefile for generating the help messages. --- Makefile | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" 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 dc1342f..7b25b47 100644 --- a/Makefile +++ b/Makefile @@ -37,8 +37,9 @@ all: version $(progs) manpages version: bash version.sh -btrfs: $(objects) btrfs.o btrfs_cmds.o scrub.o +btrfs: $(objects) btrfs.o btrfs_cmds.o scrub.o helpmsg.o $(CC) -lpthread $(CFLAGS) -o btrfs btrfs.o btrfs_cmds.o scrub.o \ + helpmsg.o \ $(objects) $(LDFLAGS) $(LIBS) btrfsctl: $(objects) btrfsctl.o @@ -95,6 +96,19 @@ man/btrfs.8.in: helpextract $(btrfs_man_page_source) manpages: man/btrfs.8.in cd man; make +helpmsg.c: helpextract $(btrfs_man_page_source) + echo >$@ "/*" + echo >>$@ " * this file contains the help messages. It is " + echo >>$@ " * automatically generated. do not edit ! " + echo >>$@ " */" + echo >>$@ + echo >>$@ "#define NULL 0" + echo >>$@ + + echo -n "char * help_messages[] = " >>$@ + ./helpextract --c-array $(btrfs_man_page_source) >>$@ + echo >>$@ ";" + install-man: cd man; make install @@ -102,6 +116,7 @@ clean : rm -f man/btrfs.8.in rm -f $(progs) cscope.out *.o .*.d btrfs-convert btrfs-image btrfs-select-super \ btrfs-zero-log btrfstune dir-test ioctl-test quick-test version.h + rm -f helpmsg.c cd man; make clean install: $(progs) install-man