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:
17
Rakefile
17
Rakefile
@@ -34,20 +34,27 @@ if DEBUG
|
|||||||
CCFLAGS << ["-g -DDEBUG"]
|
CCFLAGS << ["-g -DDEBUG"]
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Build flexnbd binary"
|
desc "Build the binary and man page"
|
||||||
task :flexnbd => 'build/flexnbd'
|
task :build => ['build/flexnbd', 'build/flexnbd.1.gz']
|
||||||
task :build => :flexnbd
|
task :default => :build
|
||||||
task :default => :flexnbd
|
|
||||||
|
desc "Build just the binary"
|
||||||
|
task :flexnbd => "build/flexnbd"
|
||||||
|
|
||||||
def check(m)
|
def check(m)
|
||||||
"build/tests/check_#{m}"
|
"build/tests/check_#{m}"
|
||||||
end
|
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 "a2x --destination-dir build --format manpage README.txt"
|
||||||
|
sh "gzip build/flexnbd.1"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Build just the man page"
|
||||||
|
task :man => "build/flexnbd.1.gz"
|
||||||
|
|
||||||
|
|
||||||
namespace "test" do
|
namespace "test" do
|
||||||
desc "Run all tests"
|
desc "Run all tests"
|
||||||
|
3
debian/flexnbd.install
vendored
3
debian/flexnbd.install
vendored
@@ -1 +1,2 @@
|
|||||||
build/flexnbd usr/bin
|
build/flexnbd usr/bin
|
||||||
|
build/flexnbd.1.gz usr/share/man/man1
|
||||||
|
Reference in New Issue
Block a user