mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
makefile: Recompile V itself also for nix, if needed
* Only self rebuild if v.c and v HEAD versions differ
This commit is contained in:
parent
549413b48b
commit
433e69e560
7
Makefile
7
Makefile
@ -14,8 +14,15 @@ all:
|
|||||||
ifdef WIN32
|
ifdef WIN32
|
||||||
$(CC) -std=gnu11 -w -o v0.exe vc/v_win.c
|
$(CC) -std=gnu11 -w -o v0.exe vc/v_win.c
|
||||||
./v0.exe -o v.exe compiler
|
./v0.exe -o v.exe compiler
|
||||||
|
rm -f v0.exe
|
||||||
else
|
else
|
||||||
$(CC) -std=gnu11 -w -o v vc/v.c -lm
|
$(CC) -std=gnu11 -w -o v vc/v.c -lm
|
||||||
|
@(VC_V=`./v version | cut -f 3 -d " "`; \
|
||||||
|
V_V=`git rev-parse --short HEAD`; \
|
||||||
|
if [ $$VC_V != $$V_V ]; then \
|
||||||
|
echo "Self rebuild ($$VC_V => $$V_V)"; \
|
||||||
|
./v -o v compiler; \
|
||||||
|
fi)
|
||||||
endif
|
endif
|
||||||
rm -rf vc/
|
rm -rf vc/
|
||||||
@echo "V has been successfully built"
|
@echo "V has been successfully built"
|
||||||
|
Loading…
Reference in New Issue
Block a user