mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Makefile: use shell commands to read in Sourcefile
File function is not supported < Make 4.2.
This commit is contained in:
parent
b04c79d8a7
commit
2d7a8c3c57
3 changed files with 10 additions and 6 deletions
11
src/Makefile
11
src/Makefile
|
@ -176,11 +176,7 @@ include Makefile.d/detect.mk
|
|||
# make would try to remove the implicitly made directories
|
||||
.PRECIOUS : %/ comptime.c
|
||||
|
||||
# very sophisticated dependency
|
||||
sources:=\
|
||||
$(call List,Sourcefile)\
|
||||
$(call List,blua/Sourcefile)\
|
||||
|
||||
sources:=
|
||||
makedir:=../make
|
||||
|
||||
# -DCOMPVERSION: flag to use comptime.h
|
||||
|
@ -204,6 +200,11 @@ endif
|
|||
depdir:=$(makedir)/deps
|
||||
objdir:=$(makedir)/objs
|
||||
|
||||
# very sophisticated dependency
|
||||
sources+=\
|
||||
$(call List,Sourcefile)\
|
||||
$(call List,blua/Sourcefile)\
|
||||
|
||||
depends:=$(basename $(filter %.c %.s,$(sources)))
|
||||
objects:=$(basename $(filter %.c %.s %.nas,$(sources)))
|
||||
|
||||
|
|
|
@ -7,9 +7,11 @@ PKG_CONFIG?=pkg-config
|
|||
ifdef WINDOWSHELL
|
||||
rmrf=-2>NUL DEL /S /Q
|
||||
mkdir=-2>NUL MD
|
||||
cat=TYPE
|
||||
else
|
||||
rmrf=rm -rf
|
||||
mkdir=mkdir -p
|
||||
cat=cat
|
||||
endif
|
||||
|
||||
ifdef LINUX64
|
||||
|
|
|
@ -10,7 +10,8 @@ Wildvar=$(foreach v,$(filter $(1),$(.VARIABLES)),$($(v)))
|
|||
|
||||
# Read a list of words from file and prepend each with the
|
||||
# directory of the file.
|
||||
List=$(addprefix $(dir $(1)),$(file < $(1)))
|
||||
_cat=$(shell $(cat) $(call Windows_path,$(1)))
|
||||
List=$(addprefix $(dir $(1)),$(call _cat,$(1)))
|
||||
|
||||
# Convert path separators to backslash on Windows.
|
||||
Windows_path=$(if $(WINDOWSHELL),$(subst /,\,$(1)),$(1))
|
||||
|
|
Loading…
Reference in a new issue