mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
build: rename WINE_PATH to RUN_PREFIX for wrapper execution
WINE_PATH started as a Wine-specific knob, but it’s now used more generally as a command prefix to run the built engine under wrappers like Intel SDE, qemu-user, etc. - Add RUN_PREFIX as the supported “run wrapper/prefix” variable in Makefile - Set WINE_PATH as a deprecated alias - Update CI and scripts to use RUN_PREFIX closes https://github.com/official-stockfish/Stockfish/pull/6500 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
aeb3bf33a9
commit
0317c6ccec
@@ -80,9 +80,9 @@ jobs:
|
|||||||
export LDFLAGS="-static -Wno-unused-command-line-argument"
|
export LDFLAGS="-static -Wno-unused-command-line-argument"
|
||||||
fi
|
fi
|
||||||
make clean
|
make clean
|
||||||
make -j4 profile-build ARCH=$BINARY COMP=$COMP WINE_PATH=$EMU
|
make -j4 profile-build ARCH=$BINARY COMP=$COMP RUN_PREFIX=$EMU
|
||||||
make strip ARCH=$BINARY COMP=$COMP
|
make strip ARCH=$BINARY COMP=$COMP
|
||||||
WINE_PATH=$EMU ../tests/signature.sh $benchref
|
RUN_PREFIX=$EMU ../tests/signature.sh $benchref
|
||||||
mv ./stockfish$EXT ../stockfish-android-$BINARY$EXT
|
mv ./stockfish$EXT ../stockfish-android-$BINARY$EXT
|
||||||
|
|
||||||
- name: Remove non src files
|
- name: Remove non src files
|
||||||
|
|||||||
@@ -76,9 +76,9 @@ jobs:
|
|||||||
- name: Compile ${{ matrix.config.binaries }} build
|
- name: Compile ${{ matrix.config.binaries }} build
|
||||||
run: |
|
run: |
|
||||||
make clean
|
make clean
|
||||||
make -j4 profile-build ARCH=$BINARY COMP=$COMP WINE_PATH="$SDE"
|
make -j4 profile-build ARCH=$BINARY COMP=$COMP RUN_PREFIX="$SDE"
|
||||||
make strip ARCH=$BINARY COMP=$COMP
|
make strip ARCH=$BINARY COMP=$COMP
|
||||||
WINE_PATH="$SDE" ../tests/signature.sh $benchref
|
RUN_PREFIX="$SDE" ../tests/signature.sh $benchref
|
||||||
mv ./stockfish$EXT ../stockfish-$NAME-$BINARY$EXT
|
mv ./stockfish$EXT ../stockfish-$NAME-$BINARY$EXT
|
||||||
|
|
||||||
- name: Remove non src files
|
- name: Remove non src files
|
||||||
|
|||||||
+18
-3
@@ -25,6 +25,21 @@ ifeq ($(KERNEL),Linux)
|
|||||||
OS := $(shell uname -o)
|
OS := $(shell uname -o)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
### Command prefix to run the built executable (e.g. wine, sde, qemu)
|
||||||
|
### Backward compatible alias: WINE_PATH (deprecated)
|
||||||
|
ifneq ($(strip $(WINE_PATH)),)
|
||||||
|
ifeq ($(strip $(RUN_PREFIX)),)
|
||||||
|
RUN_PREFIX := $(WINE_PATH)
|
||||||
|
endif
|
||||||
|
ifeq ($(MAKELEVEL),0)
|
||||||
|
ifneq ($(strip $(RUN_PREFIX)),$(strip $(WINE_PATH)))
|
||||||
|
$(warning *** Both RUN_PREFIX and WINE_PATH are set; ignoring WINE_PATH. ***)
|
||||||
|
else
|
||||||
|
$(warning *** WINE_PATH is deprecated; use RUN_PREFIX instead. ***)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
### Target Windows OS
|
### Target Windows OS
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
ifneq ($(COMP),ndk)
|
ifneq ($(COMP),ndk)
|
||||||
@@ -32,8 +47,8 @@ ifeq ($(OS),Windows_NT)
|
|||||||
endif
|
endif
|
||||||
else ifeq ($(COMP),mingw)
|
else ifeq ($(COMP),mingw)
|
||||||
target_windows = yes
|
target_windows = yes
|
||||||
ifeq ($(WINE_PATH),)
|
ifeq ($(RUN_PREFIX),)
|
||||||
WINE_PATH := $(shell which wine)
|
RUN_PREFIX := $(shell which wine)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -49,7 +64,7 @@ PREFIX = /usr/local
|
|||||||
BINDIR = $(PREFIX)/bin
|
BINDIR = $(PREFIX)/bin
|
||||||
|
|
||||||
### Built-in benchmark for pgo-builds
|
### Built-in benchmark for pgo-builds
|
||||||
PGOBENCH = $(WINE_PATH) ./$(EXE) bench
|
PGOBENCH = $(RUN_PREFIX) ./$(EXE) bench
|
||||||
|
|
||||||
### Source and object files
|
### Source and object files
|
||||||
SRCS = benchmark.cpp bitboard.cpp evaluate.cpp main.cpp \
|
SRCS = benchmark.cpp bitboard.cpp evaluate.cpp main.cpp \
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ error()
|
|||||||
trap 'error ${LINENO}' ERR
|
trap 'error ${LINENO}' ERR
|
||||||
|
|
||||||
# obtain
|
# obtain
|
||||||
eval "$WINE_PATH ./stockfish bench" > "$STDOUT_FILE" 2> "$STDERR_FILE" || error ${LINENO}
|
eval "$RUN_PREFIX ./stockfish bench" > "$STDOUT_FILE" 2> "$STDERR_FILE" || error ${LINENO}
|
||||||
signature=$(grep "Nodes searched : " "$STDERR_FILE" | awk '{print $4}')
|
signature=$(grep "Nodes searched : " "$STDERR_FILE" | awk '{print $4}')
|
||||||
|
|
||||||
rm -f "$STDOUT_FILE" "$STDERR_FILE"
|
rm -f "$STDOUT_FILE" "$STDERR_FILE"
|
||||||
|
|||||||
Reference in New Issue
Block a user