From 90195c4f714af00782217270a3a8a9458d418bc6 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 3 Sep 2023 21:33:44 +0200 Subject: Makefile: Test replacing spaces in the app name with a differen char My idea is to use the no-space version of the app name in the Make targets, and mv the files to the with-spaces version when everything is built. Decided to use the Unicode ZERO WIDTH NO-BREAK SPACE character U+FEFF as the sentinel replacement character. We can always change it to something else (like a string of unique characters) later if needed. I took the Perl command from penguin359 (https://unix.stackexchange.com/users/6167/penguin359) on Stack Exchange: https://unix.stackexchange.com/questions/12273/in-bash-how-can-i-convert-a-unicode-codepoint-0-9a-f-into-a-printable-charact/12279#12279 --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 751af92..b544a27 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ APP_NAME := Base\ Windowed\ Application +NBSP := $(shell perl -C -e 'print chr 0xfeff') +APP_NAME_NOSPACE := $(subst \ ,$(NBSP),$(APP_NAME)) +testnospace: + echo $(APP_NAME_NOSPACE) + SOURCES := $(shell find src -name '*.m') OBJECTS := $(SOURCES:%.m=%.o) -- cgit v1.2.3