shithub: lu9

Download patch

ref: d273236ba461192cdd5a14d4ca328d17d7e3eba6
parent: fc2e01f50026070d671c469a72f3280cde1fd81a
author: kvik <kvik@a-b.xyz>
date: Thu Apr 8 20:38:34 EDT 2021

man: fix naming and install with mk install

--- a/lu9.man
+++ b/lu9.man
@@ -1,8 +1,8 @@
 .TH LUA9 1
 .SH NAME
-lua9 \- Lua standalone for Plan 9
+lu9 \- Lua standalone for Plan 9
 .SH SYNOPSIS
-.B lua9
+.B lu9
 .RB [ -ivw ]
 .RI [ script ]
 .RI [ args
@@ -9,7 +9,7 @@
 .IR ... ]
 .SH DESCRIPTION
 .PP
-.I Lua9
+.I lu9
 is an interpreter for Lua as a standalone language.
 It runs Lua scripts and provides a basic REPL for
 interactive usage.
@@ -26,7 +26,7 @@
 Others are likely to be included in the future,
 guided by user demand.
 .SH USAGE
-.B Lua9
+.B lu9
 runs in script mode by default, loading the
 .I script
 file if given, or loading the script from standard input
@@ -79,19 +79,19 @@
 Run a script with three arguments:
 .PP
 .EX
-; lua9 main.lua a b c
+; lu9 main.lua a b c
 .EE
 .PP
 Same as above, entering REPL after the script finishes:
 .PP
 .EX
-; lua9 -i main.lua a b c
+; lu9 -i main.lua a b c
 .EE
 .PP
 Run REPL with command line arguments:
 .PP
 .EX
-; lua9 -i /dev/null a b c
+; lu9 -i /dev/null a b c
 .EE
 .PP
 An executable Lua program can be created as expected:
@@ -98,7 +98,7 @@
 .PP
 .EX
 ; cat /bin/prog
-#!/bin/lua9
+#!/bin/lu9
 io.write("hello world\\n")
 ; chmod +x /bin/prog
 ; prog
@@ -108,11 +108,11 @@
 Lua Reference Manual \- https://lua.org/manual/5.4
 .SH SOURCE
 .PP
-The interpreter and libraries making up the wider "Lua9"
+The interpreter and libraries making up the wider "lu9"
 project can be found at:
 .PP
 .EE
-https://sr.ht/~kvik/lua9/
+https://sr.ht/~kvik/lu9/
 .EX
 .SH BUGS
 .PP
--- a/mkfile
+++ b/mkfile
@@ -5,6 +5,7 @@
 TARG=$O.lu9
 BIN=/$objtype/bin
 MOD=/sys/lib/lua
+MAN=/sys/man
 
 OBJS=lu9.$O
 
@@ -25,7 +26,7 @@
 	@{cd lpeg; git/pull}
 	@{cd p9; git/pull}
 
-install:V: $TARG
+install:V: $TARG $MAN/1/lu9
 	luav=`{$TARG -v}
 	cp $TARG $BIN/lu9
 	cp $TARG $BIN/lu9-^$luav
@@ -45,6 +46,9 @@
 	
 p9/libp9.a.$O:
 	@{cd p9; mk}
+	
+$MAN/1/%: %.man
+	cp $stem.man $target
 
 $TARG: $OBJS $LIBS
 	$LD -o $TARG $prereq