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:
15
Makefile
15
Makefile
@@ -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:
|
||||
|
Reference in New Issue
Block a user