aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-09-04 00:41:17 +0200
committerTeddy Wing2023-09-04 00:41:17 +0200
commitf25e41a5ab4c6ebe2dc0032d96582f3a2149346a (patch)
treea4d46c8c06e8ebf41d7a40be3ee99e58d6472157
parentd5bd24b66ce300dfed61070a60fd8faffc28a762 (diff)
downloadBase-Windowed-Application-f25e41a5ab4c6ebe2dc0032d96582f3a2149346a.tar.bz2
Makefile: Try to not recompile the executable when building .app
Keep the temporary .app bundle with substituted spaces around and copy the bundle directory so we don't end up rebuilding the executable file when `make` is re-executed. This does fail on `make` re-execution because the space-substituted binary file was moved and no longer exists. Might have to think about how to make that cleaner later. The more pressing concern is that the final .app bundle with spaces in it reports an error when I try to open it: $ open build/Base\ Windowed\ Application.app The application cannot be opened because its executable is missing. Not sure what the problem is there yet.
-rw-r--r--Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 881d785..5456bd7 100644
--- a/Makefile
+++ b/Makefile
@@ -34,11 +34,15 @@ build:
mkdir -p build
build/$(APP_NAME).app: build/$(APP_NAME_NOSPACE).app
- mv $< "${@}"
+ cp -R $< "${@}"
+
+build/$(APP_NAME).app/Contents/MacOS/$(APP_NAME): \
+build/$(APP_NAME).app/Contents/MacOS/$(APP_NAME_NOSPACE)
+ 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/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
@@ -85,8 +89,8 @@ 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)) \
-build/$(APP_NAME_NOSPACE).app/Contents/MacOS/$(APP_NAME) \
-build/$(APP_NAME).app
+build/$(APP_NAME).app \
+build/$(APP_NAME).app/Contents/MacOS/$(APP_NAME)
# $(subst Internationalization/,build/$(APP_NAME_NOSPACE).app/Contents/Resources/,$(LOCALIZABLE_STRINGS))