All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@inwind.it>
To: linux-btrfs@vger.kernel.org
Cc: Goffredo Baroncelli <kreijack@inwind.it>
Subject: [PATCH 3/7][V2] btrfs-progs:  Update the makefile for generating the help messages.
Date: Tue, 08 Nov 2011 23:12:38 +0100	[thread overview]
Message-ID: <1988774.8uPblmpdsr@venice> (raw)

[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]


Update the makefile for generating the help messages.


Signed off by: Goffredo Baroncelli <kreijack@inwind.it>
---
 Makefile |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 413f5d5..e9555b3 100644
--- a/Makefile
+++ b/Makefile
@@ -38,8 +38,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)
 
 calc-size: $(objects) calc-size.o
@@ -108,6 +109,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
 
@@ -115,6 +129,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
-- 
1.7.7.2

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack@inwind.it>
Key fingerprint = 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512

[-- Attachment #2: send-via-kmail-attach-10625-1320789396-5158.msg --]
[-- Type: text/x-patch, Size: 1256 bytes --]

diff --git a/Makefile b/Makefile
index 413f5d5..e9555b3 100644
--- a/Makefile
+++ b/Makefile
@@ -38,8 +38,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)
 
 calc-size: $(objects) calc-size.o
@@ -108,6 +109,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
 
@@ -115,6 +129,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
-- 
1.7.7.2

                 reply	other threads:[~2011-11-08 22:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1988774.8uPblmpdsr@venice \
    --to=kreijack@inwind.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.