From: bones_was_here Date: Thu, 17 Apr 2025 22:14:46 +0000 (+1000) Subject: Makefile: fix build failure when PWD path contains a space X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F125%2Fhead;p=xonotic%2Fxonotic.git Makefile: fix build failure when PWD path contains a space Autotools can't handle this even when quoted or escaped so it can't be set globally. Moves some related lines closer together. --- diff --git a/Makefile b/Makefile index 68e1264d..e97e5e3c 100644 --- a/Makefile +++ b/Makefile @@ -12,16 +12,6 @@ MAKEFLAGS := -j$(shell nproc) # DP makefile overrides CFLAGS (exporting CFLAGS does work for d0_blind_id but so does this) export CC += $(CFLAGS) -# d0_blind_id header location -export CC += -I$(PWD)/source/ -# d0_blind_id static libs location -export CC += -L$(PWD)/$(D0SRC)/.libs/ -# Player IDs -export DP_LINK_CRYPTO=static -# AES -export DP_LINK_CRYPTO_RIJNDAEL=static - - .PHONY: help help: @echo @@ -87,25 +77,27 @@ $(D0SRC)/.libs/libd0_blind_id.a $(D0SRC)/.libs/libd0_rijndael.a: $(MAKE) -C $(D0SRC) clean # ensures missing .a files are created FIXME WORKAROUND $(MAKE) -C $(D0SRC) -$(DPSRC)/darkplaces-dedicated: $(D0SRC)/.libs/libd0_blind_id.a - $(MAKE) -C $(DPSRC) sv-release -$(SERVERBIN): $(DPSRC)/darkplaces-dedicated - cp $(DPSRC)/darkplaces-dedicated $(SERVERBIN) - -$(DPSRC)/darkplaces-sdl: $(D0SRC)/.libs/libd0_blind_id.a - $(MAKE) -C $(DPSRC) sdl-release -$(CLIENTBIN): $(DPSRC)/darkplaces-sdl - cp $(DPSRC)/darkplaces-sdl $(CLIENTBIN) +export DP_LINK_CRYPTO=static +export DP_LINK_CRYPTO_RIJNDAEL=static +# d0_blind_id/d0_blind_id.h and .a locations (respectively) +D0INC=-I"$(PWD)/source/" -L"$(PWD)/$(D0SRC)/.libs/" +.PHONY: all both +all both: client server .PHONY: server server: $(SERVERBIN) +$(DPSRC)/darkplaces-dedicated: $(D0SRC)/.libs/libd0_blind_id.a + CC='$(CC) $(D0INC)' $(MAKE) -C $(DPSRC) sv-release +$(SERVERBIN): $(DPSRC)/darkplaces-dedicated + cp $(DPSRC)/darkplaces-dedicated $(SERVERBIN) .PHONY: client client: $(CLIENTBIN) - -.PHONY: all both -all both: client server +$(DPSRC)/darkplaces-sdl: $(D0SRC)/.libs/libd0_blind_id.a + CC='$(CC) $(D0INC)' $(MAKE) -C $(DPSRC) sdl-release +$(CLIENTBIN): $(DPSRC)/darkplaces-sdl + cp $(DPSRC)/darkplaces-sdl $(CLIENTBIN) # GNU make standard directory variables for install targets