ref: 7d0b05e10fedc2767ece8e3bf97dfb797ac334dc
parent: 22107e0eee3ab46b3696f21b291acd3964d24bda
author: kvik <kvik@a-b.xyz>
date: Sat Apr 10 21:54:53 EDT 2021
build: combine clone with pull, update instructions
--- a/README.md
+++ b/README.md
@@ -28,20 +28,15 @@
### Building and installing
-Building and installing lu9 is simple: clone this repository and run
-`mk install`. The build will automatically clone and build all the
-dependencies.
+Building and installing lu9 is simple: grab this repository,
+pull the dependencies, and run `mk install`.
; git/clone https://git.sr.ht/~kvik/lu9
+ ; mk pull
; mk install
-Only lu9 binary and Lua modules get installed into the system.
+Only the lu9 binary and Lua modules get installed into the system.
The binary is statically linked so no C libraries have to be installed.
-
-The provided `mkfile` can pull any updates to lu9 and its dependencies.
-
- ; mk pull
- ; mk install
### Usage
--- a/mkfile
+++ b/mkfile
@@ -16,15 +16,13 @@
all:V: $TARG
-clone:V:
- git/clone https://git.sr.ht/~kvik/lu9-lua lua
- git/clone https://git.sr.ht/~kvik/lu9-lpeg lpeg
- git/clone https://git.sr.ht/~kvik/lu9-p9 p9
-
pull:V:
- @{cd lua; git/pull}
- @{cd lpeg; git/pull}
- @{cd p9; git/pull}
+ @{if(test -d lua){cd lua; git/pull}
+ if not git/clone https://git.sr.ht/~kvik/lu9-lua lua}
+ @{if(test -d lpeg){cd lpeg; git/pull}
+ if not git/clone https://git.sr.ht/~kvik/lu9-lpeg lpeg}
+ @{if(test -d p9){cd p9; git/pull}
+ if not git/clone https://git.sr.ht/~kvik/lu9-p9 p9}
install:V: $TARG $MAN/1/lu9
luav=`{$TARG -v}