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

make and vself: cleanup make based on the new 'v self'

This commit is contained in:
Delyan Angelov
2020-02-28 17:04:22 +02:00
committed by GitHub
parent ccf4f61521
commit 10e15e5de7
4 changed files with 47 additions and 39 deletions

View File

@@ -46,20 +46,13 @@ endif
all: latest_vc latest_tcc
ifdef WIN32
$(CC) $(CFLAGS) -std=c99 -municode -w -o v2.exe $(TMPVC)/$(VCFILE) $(LDFLAGS)
./v2.exe -o v3.exe cmd/v
./v3.exe -o v.exe -prod cmd/v
rm -f v2.exe v3.exe
./v.exe self
else
$(CC) $(CFLAGS) -std=gnu11 -w -o v $(TMPVC)/$(VCFILE) $(LDFLAGS) -lm
ifdef ANDROID
chmod 755 v
endif
@(VC_V=`./v version | cut -f 3 -d " "`; \
V_V=`git rev-parse --short=7 HEAD`; \
if [ $$VC_V != $$V_V ]; then \
echo "Self rebuild ($$VC_V => $$V_V)"; \
$(MAKE) selfcompile; \
fi)
./v self
ifndef ANDROID
$(MAKE) modules
endif
@@ -96,10 +89,10 @@ $(TMPVC)/.git/config:
$(MAKE) fresh_vc
selfcompile:
./v -cg -o v cmd/v
./v -keep_c -cg -o v cmd/v
selfcompile-static:
./v -cg -cflags '--static' -o v-static cmd/v
./v -keep_c -cg -cflags '--static' -o v-static cmd/v
modules: module_builtin module_strings module_strconv
module_builtin: