summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2016-12-22 00:42:42 -0500
committerBradley Sepos <[email protected]>2016-12-22 02:55:27 -0500
commit6ccbfa43e09d1c8c22c4a1c2749a5bf4b6e017e2 (patch)
treef4f8e4e2714ea1cdebcc0f72cad352445ab7960d /macosx
parenta827c12dd0639f1f3e49a540c1a594affa0d0ac9 (diff)
build: Add install, install-strip, and uninstall targets for Darwin/Mac.
Also refactor test.* convenience targets for Darwin/Mac. Configure parameter --prefix now sets HandBrakeCLI install directory [/usr/local] like on other systems. New configure parameter --xcode-prefix sets HandBrake.app install directory [/Applications]. Not used on other systems.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/module.rules40
-rw-r--r--macosx/module.xcodebuild19
2 files changed, 45 insertions, 14 deletions
diff --git a/macosx/module.rules b/macosx/module.rules
index 7d4d368fc..20011c03d 100644
--- a/macosx/module.rules
+++ b/macosx/module.rules
@@ -1,8 +1,36 @@
$(eval $(call import.MODULE.rules,MACOSX))
+build: macosx.build
+install: macosx.install
+uninstall: macosx.uninstall
+clean: macosx.clean
+xclean: macosx.xclean
+
+########################################
+# sync with ../test/module.rules #
+########################################
+test.install-strip: | $(dir $(TEST.install.exe))
+ $(CP.exe) $(TEST.exe) $(TEST.install.exe)
+ $(STRIP.exe) $(TEST.install.exe)
+
+test.install: | $(dir $(TEST.install.exe))
+ $(CP.exe) $(TEST.exe) $(TEST.install.exe)
+
+test.uninstall:
+ $(RM.exe) -f $(TEST.install.exe)
+
+test.clean:
+ $(RM.exe) -f $(TEST.out)
+
+test.xclean: test.clean
+########################################
+
macosx.build: $(MACOSX.m4.out)
macosx.build: $(MACOSX.osl.filelist)
+macosx.install: test.install
+macosx.uninstall: test.uninstall
+
macosx.clean:
$(RM.exe) -f $(MACOSX.m4.out)
$(RM.exe) -f $(MACOSX.osl.filelist)
@@ -11,13 +39,6 @@ macosx.xclean:
$(RM.exe) -rf $(MACOSX.build/)
$(RM.exe) -rf $(MACOSX.xroot/)
-test.clean:
- $(RM.exe) -f $(MACOSX.xroot/)HandBrakeCLI
- $(RM.exe) -rf $(MACOSX.xroot/)HandBrakeCLI.dSYM
- $(RM.exe) -rf $(MACOSX.xroot/)HandBrakeCLI.build
-
-test.xclean: test.clean
-
$(MACOSX.m4.out): $(BUILD/)project/handbrake.m4
$(MACOSX.m4.out): | $(dir $(MACOSX.m4.out))
$(MACOSX.m4.out): $(MACOSX.build/)%: $(MACOSX.src/)%.m4
@@ -28,8 +49,3 @@ $(MACOSX.osl.filelist): $(BUILD/)GNUmakefile
@echo "creating $@"
@> $@
$(foreach i,$(foreach m,$(MODULES.NAMES),$($m.OSL.files)),$(call fn.PRINTLN,@echo $i >> $@))
-
-###############################################################################
-
-clean: macosx.clean
-build: macosx.build
diff --git a/macosx/module.xcodebuild b/macosx/module.xcodebuild
index 26b34a9cb..bb62e80db 100644
--- a/macosx/module.xcodebuild
+++ b/macosx/module.xcodebuild
@@ -1,6 +1,6 @@
## This file is processed only when shunting build through xcodebuild
-.PHONY: macosx.build macosx.clean macosx.install
+.PHONY: macosx.build macosx.clean macosx.install macosx.install-strip macosx.uninstall
macosx.build:
$(call MACOSX.XCODE,HandBrakeCLI HandBrake,build)
@@ -9,11 +9,26 @@ macosx.clean:
$(call MACOSX.XCODE,HandBrakeCLI HandBrake,clean)
macosx.install:
- $(call MACOSX.XCODE,HandBrakeCLI HandBrake,install)
+ $(RM.exe) -rf $(XCODE.prefix/)HandBrake.app
+ $(CP.exe) -R $(MACOSX.xroot/)HandBrake.app $(XCODE.prefix/)
+ $(CP.exe) $(MACOSX.xroot/)HandBrakeCLI $(PREFIX/)bin/
+
+macosx.install-strip:
+ $(RM.exe) -rf $(XCODE.prefix/)HandBrake.app
+ $(CP.exe) -R $(MACOSX.xroot/)HandBrake.app $(XCODE.prefix/)
+ $(STRIP.exe) $(XCODE.prefix/)HandBrake.app/Contents/MacOS/HandBrake
+ $(CP.exe) $(MACOSX.xroot/)HandBrakeCLI $(PREFIX/)bin/
+ $(STRIP.exe) $(PREFIX/)bin/HandBrakeCLI
+
+macosx.uninstall:
+ $(RM.exe) -rf $(XCODE.prefix/)HandBrake.app
+ $(RM.exe) -f $(PREFIX/)bin/HandBrakeCLI
build: macosx.build
clean: macosx.clean
install: macosx.install
+install-strip: macosx.install-strip
+uninstall: macosx.uninstall
xclean: clean
###############################################################################