1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: further makefile bootstrapping fixes

This commit is contained in:
Delyan Angelov 2021-09-28 11:38:33 +03:00
parent 97eb0fc74f
commit d31c9250d3
2 changed files with 14 additions and 8 deletions

View File

@ -84,13 +84,16 @@ endif
all: latest_vc latest_tcc
ifdef WIN32
$(CC) $(CFLAGS) -std=c99 -municode -w -I ./thirdparty/stdatomic/nix -o $(V) $(VC)/$(VCFILE) $(LDFLAGS)
$(V) -o v2.exe $(VFLAGS) cmd/v
move /y v2.exe v.exe
$(CC) $(CFLAGS) -std=c99 -municode -w -I ./thirdparty/stdatomic/nix -o v1.exe $(VC)/$(VCFILE) $(LDFLAGS)
v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
v2.exe -o $(V) $(VFLAGS) cmd/v
del v1.exe
del v2.exe
else
$(CC) $(CFLAGS) -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o $(V) $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS)
$(V) -o v2.exe $(VFLAGS) cmd/v
mv -f v2.exe v
$(CC) $(CFLAGS) -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o v1.exe $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS)
./v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
./v2.exe -o $(V) $(VFLAGS) cmd/v
rm -rf v1.exe v2.exe
endif
@echo "V has been successfully built"
@$(V) -version

View File

@ -1,8 +1,11 @@
CC ?= cc
VFLAGS ?=
all:
rm -rf vc/
git clone --depth 1 --quiet https://github.com/vlang/vc
$(CC) -std=gnu11 -w -I ./thirdparty/stdatomic/nix -o v vc/v.c -lm -lexecinfo
rm -rf vc/
$(CC) -std=gnu11 -w -I ./thirdparty/stdatomic/nix -o v1 vc/v.c -lm -lexecinfo
./v1 -no-parallel -o v2 $(VFLAGS) cmd/v
./v2 -o v $(VFLAGS) cmd/v
rm -rf v1 v2 vc/
@echo "V has been successfully built"