aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTeddy Wing2023-09-04 00:31:37 +0200
committerTeddy Wing2023-09-04 00:31:37 +0200
commitd5bd24b66ce300dfed61070a60fd8faffc28a762 (patch)
tree6ae0a5a6784a9913f585c7bfe5d019171ed55eb6 /Makefile
parent3a86b622acade34a79e6e5dd48cc724b481f1eb9 (diff)
downloadBase-Windowed-Application-d5bd24b66ce300dfed61070a60fd8faffc28a762.tar.bz2
Makefile: Move space-less version to a .app bundle with spaces
This gets us the dependencies set up so they can use paths without spaces, but creates a .app bundle with spaces as a final product. It does so by moving the files where we substituted spaces with a non-space character to file names with spaces. I don't like this yet because `make app` builds a whole new binary and everything else, but the resulting bundle is what we want.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 7625392..881d785 100644
--- a/Makefile
+++ b/Makefile
@@ -33,9 +33,12 @@ $(PRODUCT): $(OBJECTS) | build
build:
mkdir -p build
-# TODO: No space version.
-# build/$(APP_NAME).app: | build
-# mkdir -p build/$(APP_NAME).app
+build/$(APP_NAME).app: build/$(APP_NAME_NOSPACE).app
+ mv $< "${@}"
+
+build/$(APP_NAME_NOSPACE).app/Contents/MacOS/$(APP_NAME): \
+build/$(APP_NAME_NOSPACE).app/Contents/MacOS/$(APP_NAME_NOSPACE)
+ mv $< "${@}"
build/$(APP_NAME_NOSPACE).app: | build
mkdir -p build/$(APP_NAME_NOSPACE).app
@@ -81,7 +84,9 @@ Internationalization/%.lproj \
app: \
build/$(APP_NAME_NOSPACE).app/Contents/MacOS/$(APP_NAME_NOSPACE) \
build/$(APP_NAME_NOSPACE).app/Contents/Info.plist \
-$(subst Internationalization/,build/$(APP_NAME_NOSPACE).app/Contents/Resources/,$(LPROJS))
+$(subst Internationalization/,build/$(APP_NAME_NOSPACE).app/Contents/Resources/,$(LPROJS)) \
+build/$(APP_NAME_NOSPACE).app/Contents/MacOS/$(APP_NAME) \
+build/$(APP_NAME).app
# $(subst Internationalization/,build/$(APP_NAME_NOSPACE).app/Contents/Resources/,$(LOCALIZABLE_STRINGS))