v symlink
parent
57ab8546fe
commit
e2c7d3b2d9
5
Makefile
5
Makefile
|
@ -1,7 +1,6 @@
|
|||
CC ?= cc
|
||||
PREFIX ?= /usr/local
|
||||
|
||||
all:
|
||||
all:
|
||||
rm -rf vc/
|
||||
git clone --depth 1 --quiet https://github.com/vlang/vc
|
||||
${CC} -std=gnu11 -w -o v vc/v.c -lm
|
||||
|
@ -9,5 +8,3 @@ all:
|
|||
rm -rf vc/
|
||||
@echo "V has been successfully built"
|
||||
|
||||
symlink: v
|
||||
ln -sf `pwd`/v ${PREFIX}/bin/v
|
||||
|
|
|
@ -28,7 +28,7 @@ Installing V: https://github.com/vlang/v#installing-v-from-source
|
|||
- REPL
|
||||
- Built-in ORM
|
||||
|
||||
V 1.0 release is planned for December 2019. Right now V is in an alpha stage.
|
||||
V 1.0 release is planned for December 2019. Right now V is in an alpha stage.
|
||||
|
||||
## Notes
|
||||
|
||||
|
@ -72,7 +72,7 @@ On Windows follow these instructions: [github.com/vlang/v/wiki/Installing-a-C-co
|
|||
You can create a `/usr/local/bin/v` symlink so that V is globally available:
|
||||
|
||||
```
|
||||
sudo make symlink
|
||||
sudo v symlink
|
||||
```
|
||||
|
||||
V is being constantly updated. To update V, simply run
|
||||
|
|
|
@ -122,6 +122,10 @@ fn main() {
|
|||
println('use `v install` to install modules from vpm.vlang.io')
|
||||
return
|
||||
}
|
||||
if 'symlink' in args {
|
||||
create_symlink()
|
||||
return
|
||||
}
|
||||
if args.join(' ').contains(' test v') {
|
||||
test_v()
|
||||
return
|
||||
|
@ -934,3 +938,10 @@ fn test_v() {
|
|||
}
|
||||
}
|
||||
|
||||
fn create_symlink() {
|
||||
vexe := os.executable()
|
||||
link_path := '/usr/local/bin/v'
|
||||
os.system('ln -sf $vexe $link_path')
|
||||
println('symlink "$link_path" has been created')
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue