aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-09-03 21:33:44 +0200
committerTeddy Wing2023-09-03 21:37:45 +0200
commit90195c4f714af00782217270a3a8a9458d418bc6 (patch)
treedd768f21f67afc9256a12bf7e14512cf44f2e1ac
parent99c437573f1748832f6eb30c5f4eeaf00fd72cf2 (diff)
downloadBase-Windowed-Application-90195c4f714af00782217270a3a8a9458d418bc6.tar.bz2
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
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
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)