mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
make: rename "V" to "VEXE" in GNUmakefile, to prevent conflicts while building RPMs (#15237)
This fixes a build failure when using "%make_build" in an RPM spec file:
make: 1: No such file or directory
make: *** [GNUmakefile💯 all] Error 127
This commit is contained in:
parent
6a7eb82d9e
commit
8af87a9e98
18
GNUmakefile
18
GNUmakefile
@ -4,7 +4,7 @@ LDFLAGS ?=
|
|||||||
TMPDIR ?= /tmp
|
TMPDIR ?= /tmp
|
||||||
VROOT ?= .
|
VROOT ?= .
|
||||||
VC ?= ./vc
|
VC ?= ./vc
|
||||||
V ?= ./v
|
VEXE ?= ./v
|
||||||
VCREPO ?= https://github.com/vlang/vc
|
VCREPO ?= https://github.com/vlang/vc
|
||||||
TCCREPO ?= https://github.com/vlang/tccbin
|
TCCREPO ?= https://github.com/vlang/tccbin
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ _SYS := $(patsubst MINGW%,MinGW,$(_SYS))
|
|||||||
|
|
||||||
ifneq ($(filter $(_SYS),MSYS MinGW),)
|
ifneq ($(filter $(_SYS),MSYS MinGW),)
|
||||||
WIN32 := 1
|
WIN32 := 1
|
||||||
V:=./v.exe
|
VEXE := ./v.exe
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(_SYS),Linux)
|
ifeq ($(_SYS),Linux)
|
||||||
@ -89,18 +89,18 @@ all: latest_vc latest_tcc
|
|||||||
ifdef WIN32
|
ifdef WIN32
|
||||||
$(CC) $(CFLAGS) -std=c99 -municode -w -o v1.exe $(VC)/$(VCFILE) $(LDFLAGS)
|
$(CC) $(CFLAGS) -std=c99 -municode -w -o v1.exe $(VC)/$(VCFILE) $(LDFLAGS)
|
||||||
v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
|
v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
|
||||||
v2.exe -o $(V) $(VFLAGS) cmd/v
|
v2.exe -o $(VEXE) $(VFLAGS) cmd/v
|
||||||
del v1.exe
|
del v1.exe
|
||||||
del v2.exe
|
del v2.exe
|
||||||
else
|
else
|
||||||
$(CC) $(CFLAGS) -std=gnu99 -w -o v1.exe $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS)
|
$(CC) $(CFLAGS) -std=gnu99 -w -o v1.exe $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS)
|
||||||
./v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
|
./v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
|
||||||
./v2.exe -o $(V) $(VFLAGS) cmd/v
|
./v2.exe -o $(VEXE) $(VFLAGS) cmd/v
|
||||||
rm -rf v1.exe v2.exe
|
rm -rf v1.exe v2.exe
|
||||||
endif
|
endif
|
||||||
@$(V) run cmd/tools/detect_tcc.v
|
@$(VEXE) run cmd/tools/detect_tcc.v
|
||||||
@echo "V has been successfully built"
|
@echo "V has been successfully built"
|
||||||
@$(V) -version
|
@$(VEXE) -version
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(TMPTCC)
|
rm -rf $(TMPTCC)
|
||||||
@ -158,14 +158,14 @@ asan:
|
|||||||
$(MAKE) all CFLAGS='-fsanitize=address,undefined'
|
$(MAKE) all CFLAGS='-fsanitize=address,undefined'
|
||||||
|
|
||||||
selfcompile:
|
selfcompile:
|
||||||
$(V) -cg -o v cmd/v
|
$(VEXE) -cg -o v cmd/v
|
||||||
|
|
||||||
selfcompile-static:
|
selfcompile-static:
|
||||||
$(V) -cg -cflags '--static' -o v-static cmd/v
|
$(VEXE) -cg -cflags '--static' -o v-static cmd/v
|
||||||
|
|
||||||
### NB: Please keep this Makefile and make.bat simple.
|
### NB: Please keep this Makefile and make.bat simple.
|
||||||
install:
|
install:
|
||||||
@echo 'Please use `sudo ./v symlink` instead.'
|
@echo 'Please use `sudo ./v symlink` instead.'
|
||||||
|
|
||||||
check:
|
check:
|
||||||
$(V) test-all
|
$(VEXE) test-all
|
||||||
|
Loading…
x
Reference in New Issue
Block a user