about summary refs log tree commit diff
path: root/llvm_mode
diff options
context:
space:
mode:
authorRaphaël Hertzog <raphael@offensive-security.com>2020-08-28 19:26:43 +0200
committerRaphaël Hertzog <raphael@offensive-security.com>2020-08-28 21:34:36 +0200
commitb0b2a158915a70211042ce2962d70f9106d216eb (patch)
tree6785ed30dcce7592f2505d8585f78ceaf27b542f /llvm_mode
parentff3c9cbd7310e1fc51b2fd7ce42aafa8c0a08a37 (diff)
downloadafl++-b0b2a158915a70211042ce2962d70f9106d216eb.tar.gz
Improve the generated manual page to be compatible with whatis
And generate the manual page for afl-g++ too.
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/GNUmakefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm_mode/GNUmakefile b/llvm_mode/GNUmakefile
index 046de72e..6faf87e4 100644
--- a/llvm_mode/GNUmakefile
+++ b/llvm_mode/GNUmakefile
@@ -442,7 +442,8 @@ vpath  % ..
 %.8: %
 	@echo .TH $* 8 `date "+%Y-%m-%d"` "afl++" > ../$@
 	@echo .SH NAME >> ../$@
-	@echo .B $* >> ../$@
+	@echo -n ".B $* \- " >> ../$@
+	@./$* -h 2>&1 | head -n 1 | sed -e "s/$$(printf '\e')[^m]*m//g" >> ../$@
 	@echo >> ../$@
 	@echo .SH SYNOPSIS >> ../$@
 	@../$* -h 2>&1 | head -n 3 | tail -n 1 | sed 's/^\.\///' >> ../$@