ci: further makefile bootstrapping fixes

pull/12012/head
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 all: latest_vc latest_tcc
ifdef WIN32 ifdef WIN32
$(CC) $(CFLAGS) -std=c99 -municode -w -I ./thirdparty/stdatomic/nix -o $(V) $(VC)/$(VCFILE) $(LDFLAGS) $(CC) $(CFLAGS) -std=c99 -municode -w -I ./thirdparty/stdatomic/nix -o v1.exe $(VC)/$(VCFILE) $(LDFLAGS)
$(V) -o v2.exe $(VFLAGS) cmd/v v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
move /y v2.exe v.exe v2.exe -o $(V) $(VFLAGS) cmd/v
del v1.exe
del v2.exe
else else
$(CC) $(CFLAGS) -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o $(V) $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS) $(CC) $(CFLAGS) -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o v1.exe $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS)
$(V) -o v2.exe $(VFLAGS) cmd/v ./v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
mv -f v2.exe v ./v2.exe -o $(V) $(VFLAGS) cmd/v
rm -rf v1.exe v2.exe
endif endif
@echo "V has been successfully built" @echo "V has been successfully built"
@$(V) -version @$(V) -version

View File

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