linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@libero.it>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: [PATCH 6/6] Update the makefile for generating the help messages.
Date: Tue, 19 Jul 2011 18:12:28 +0200	[thread overview]
Message-ID: <20110719161228.3210.93016.stgit@venice.bhome> (raw)
In-Reply-To: <20110719161049.3210.54794.stgit@venice.bhome>

From: Goffredo Baroncelli <kreijack@inwind.it>

Update the makefile for generating the help messages.
---
 Makefile |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

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


      parent reply	other threads:[~2011-07-19 16:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 16:11 [PATCH 0/6] Move the infor for the help/man page in the source Goffredo Baroncelli
2011-07-19 16:11 ` [PATCH 1/6] Add info for the commands Goffredo Baroncelli
2011-07-19 16:12 ` [PATCH 2/6] Add the header/footer/introduction of the man page Goffredo Baroncelli
2011-07-19 16:12 ` [PATCH 3/6] helpextract: tool to extract the info for the help from the source Goffredo Baroncelli
2011-07-19 16:12 ` [PATCH 4/6] Update the makefile for generating the man page Goffredo Baroncelli
2011-07-19 16:12 ` [PATCH 5/6] Show the help messages from the info in the comment Goffredo Baroncelli
2011-07-19 16:12 ` Goffredo Baroncelli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110719161228.3210.93016.stgit@venice.bhome \
    --to=kreijack@libero.it \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).