Skip to content

Commit ce30d10

Browse files
committed
Update readme and makefile, add installation commands and instructions.
1 parent 36116b7 commit ce30d10

File tree

4 files changed

+83
-27
lines changed

4 files changed

+83
-27
lines changed

Makefile

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
en: setup
2+
ifeq (,$(wildcard bin/kvrasm))
3+
@echo "Building kvrasm executable."
4+
@gcc src/kvrasm.c -o bin/kvrasm
5+
endif
6+
17
all: en es eo tok
28

39
setup:
@@ -11,12 +17,6 @@ ifeq (,$(wildcard roms))
1117
@mkdir roms
1218
endif
1319

14-
en: setup
15-
ifeq (,$(wildcard bin/kvrasm))
16-
@echo "Building kvrasm executable."
17-
@gcc src/kvrasm.c -o bin/kvrasm
18-
endif
19-
2020
es: setup
2121
ifeq (,$(wildcard bin/kvrasm-es))
2222
@echo "Building kvrasm-es executable."
@@ -35,23 +35,55 @@ ifeq (,$(wildcard bin/kvrasm-tok))
3535
@gcc src/kvrasm.c -o bin/kvrasm-tok -D LANG_TOK
3636
endif
3737

38-
test: all
38+
test-all: test test-es test-eo test-tok
39+
40+
test: en
3941
@echo "Testing kvrasm."
4042
@bin/kvrasm examples/english/sierpinski.kvr roms/sierpinski.rom
4143
@uxncli roms/sierpinski.rom
4244

45+
test-es: es
4346
@echo "Testing kvrasm-es."
4447
@bin/kvrasm-es examples/spanish/sierpinski.kvres roms/sierpinski-es.rom
4548
@uxncli roms/sierpinski-es.rom
4649

50+
test-eo: eo
4751
@echo "Testing kvrasm-eo."
4852
@bin/kvrasm-eo examples/esperanto/sierpinski.kvreo roms/sierpinski-eo.rom
4953
@uxncli roms/sierpinski-eo.rom
5054

55+
test-tok: tok
5156
@echo "Testing kvrasm-tok."
5257
@bin/kvrasm-tok examples/toki-pona/sierpinski.kvrtok roms/sierpinski-tok.rom
5358
@uxncli roms/sierpinski-tok.rom
5459

60+
install-all: all install install-es install-eo install-tok
61+
62+
install: en install-setup install-path
63+
@echo "Installing kvrasm at ~/bin directory."
64+
@cp bin/kvrasm ~/bin
65+
66+
install-es: es install-setup install-path
67+
@echo "Installing kvrasm-es at ~/bin directory."
68+
@cp bin/kvrasm-es ~/bin
69+
70+
install-eo: eo install-setup install-path
71+
@echo "Installing kvrasm-eo at ~/bin directory."
72+
@cp bin/kvrasm-eo ~/bin
73+
74+
install-tok: tok install-setup install-path
75+
@echo "Installing kvrasm-tok at ~/bin directory."
76+
@cp bin/kvrasm-tok ~/bin
77+
78+
install-path:
79+
@echo "Make sure that ~/bin is in your PATH."
80+
81+
install-setup:
82+
ifeq (,$(wildcard ~/bin))
83+
@echo "Creating ~/bin directory."
84+
@mkdir ~/bin
85+
endif
86+
5587
clean:
5688
ifneq (,$(wildcard bin))
5789
@echo "Deleting bin directory."

README.md

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
# Kvara
22

3-
Kvara is an assembler with i18n (internationalization) support for the Varvara/Uxn ecosystem forked from the reference assembler uxnasm implemented in C.
3+
Kvara is an assembler with i18n (internationalization) support for the
4+
Varvara/Uxn ecosystem, forked from the reference *uxnasm* assembler implemented
5+
in C.
46

5-
- **kvara** means fourth in Esperanto.
6-
- **kvara** rhymes with varvara.
7-
- **kvara** is the fourth uxntal assembler I have used, the others are: *uxnasm*, *asma* and *drifblim*.
7+
### What is the meaning of *Kvara*?
8+
9+
- **Kvara** means *fourth* in Esperanto.
10+
- **Kvara** rhymes with Uxn's *Varvara*.
11+
- **Kvara** is the fourth Uxntal assembler that I have used, the others were:
12+
*uxnasm*, *asma* and *drifblim*.
13+
- **Kvara** is also a reference to the *Forth* programming langauge, which led
14+
me to the Uxn ecosystem.
815

916
### Supported Languages
1017

@@ -16,8 +23,8 @@ Kvara is an assembler with i18n (internationalization) support for the Varvara/U
1623
## Build
1724

1825
```bash
19-
$ make # All versions.
20-
$ make en # English version.
26+
$ make # English version.
27+
$ make all # All versions.
2128
$ make es # Spanish version.
2229
$ make eo # Esperanto version.
2330
$ make tok # Toki pona version.
@@ -26,26 +33,46 @@ $ make tok # Toki pona version.
2633
## Usage
2734

2835
```bash
29-
$ kvrasm[-es|-eo|-tok] input.kvr[es|eo|tok] output.rom
36+
$ kvrasm[-es|-eo|-tok] input.kvr[es|eo|tok] [output.rom]
3037
```
3138

3239
## Test
3340

3441
```bash
35-
$ make test # Test all versions.
36-
$ make test-en # Test English version.
42+
$ make test # Test English version.
43+
$ make test-all # Test all versions.
3744
$ make test-es # Test Spanish version.
3845
$ make test-eo # Test Esperanto version.
3946
$ make test-tok # Test Toki pona version.
47+
```
48+
49+
## Install
50+
51+
```bash
52+
$ make install # Install English version.
53+
$ make install-all # Install all versions.
54+
$ make install-es # Install Spanish version.
55+
$ make install-eo # Install Esperanto version.
56+
$ make install-tok # Install Toki pona version.
57+
```
4058

59+
The executables are installed at `~/bin`, make sure that this directory is in
60+
your `PATH` and that you have sourced your shell configuration file, for example
61+
`~/.bashrc` or start a new shell session for Kvara assembler(s) to be available
62+
from any directory.
63+
64+
```bash
65+
$ make install
66+
$ echo "export PATH=$PATH:~/bin" >> ~/.bashrc
67+
$ source ~/.bashrc
4168
```
4269

4370
## Differences From Uxnasm
4471

45-
- Kvara supports `\ comment` (backslash+space) Forth style comments, these are not
46-
part of the Uxntal specification which only support `( comment )`
47-
(there must whitespace after the opening `( ` and closing ` )` parenthesis)
48-
Forth style comments.
72+
- Kvara supports `\ comment` backslash space Forth style comments, these are
73+
not part of the Uxntal specification which only supports `( comment )`
74+
parenthesis Forth style comments (there must whitespace after the opening
75+
`(` and closing `)` parenthesis).
4976

5077
## Utils
5178

@@ -56,8 +83,7 @@ $ make test-tok # Test Toki pona version.
5683

5784
## TODO
5885

59-
- [ ] Make `kvr2tal.py` better.
60-
- [ ] Make `tal2kvr.py`.
61-
- [ ] Explain how to contribute and add a new language.
62-
- [ ] Implement another utility to scafold and make easier adding new languages.
63-
- [ ] Use the opcode test for all languages.
86+
- [] Implement `kvrptr` (Kvara porter).
87+
- [] Explain how to contribute and add a new language.
88+
- [] Implement another utility to scafold and make easier adding new languages.
89+
- [] Use the opcode test for all languages.
File renamed without changes.

utils/tal2kvr.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)