浏览代码

Fix make clean target failing when shell is not cmd (#2338)

GNU make on Windows first tries to find sh.exe on the path,
and will execute build rules using it if it is present.
The make clean target uses the builtin cmd.exe command del, which
won't work under sh.exe

The reason this is not done for the entire Makefile is because it would
break cross-compilation of raylib.
pull/2340/head
Peter0x44 3 年前
committed by GitHub
父节点
当前提交
81cced4d83
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. +6
    -0
      src/Makefile

+ 6
- 0
src/Makefile 查看文件

@ -731,6 +731,12 @@ endif
# Clean everything
clean:
ifeq ($(PLATFORM_OS),WINDOWS)
# Make always tries to run build rules under sh.exe by default
# So if sh.exe is present in the PATH on windows, the del commands will fail
# see README.W32 of GNU Make for more details
# It is not specified earlier in the Makefile, because then cross-compilation
# will also fail.
SHELL = cmd
del *.o /s
cd $(RAYLIB_RELEASE_PATH)
del lib$(RAYLIB_LIB_NAME).a /s

正在加载...
取消
保存