Add a rake task to build the man page

Also tweak the debian .install to put it in the right place.
This commit is contained in:
Alex Young
2012-07-14 18:47:25 +01:00
parent 54a1409dce
commit a1ea2ba4c5
2 changed files with 14 additions and 6 deletions

View File

@@ -34,20 +34,27 @@ if DEBUG
CCFLAGS << ["-g -DDEBUG"]
end
desc "Build flexnbd binary"
task :flexnbd => 'build/flexnbd'
task :build => :flexnbd
task :default => :flexnbd
desc "Build the binary and man page"
task :build => ['build/flexnbd', 'build/flexnbd.1.gz']
task :default => :build
desc "Build just the binary"
task :flexnbd => "build/flexnbd"
def check(m)
"build/tests/check_#{m}"
end
task :man do
file "build/flexnbd.1.gz" => "README.txt" do
FileUtils.mkdir_p( "build" )
sh "a2x --destination-dir build --format manpage README.txt"
sh "gzip build/flexnbd.1"
end
desc "Build just the man page"
task :man => "build/flexnbd.1.gz"
namespace "test" do
desc "Run all tests"

View File

@@ -1 +1,2 @@
build/flexnbd usr/bin
build/flexnbd usr/bin
build/flexnbd.1.gz usr/share/man/man1