Skip to content

Commit f47a899

Browse files
authored
Merge pull request #162 from keithc-ca/codesign
Update code-signing on macOS
2 parents 648b1eb + 3678ca1 commit f47a899

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

closed/autoconf/custom-spec.gmk.in

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,26 @@ endif
131131
# Usage: $(call CodesignFile, files ...)
132132
ifeq (,$(CODESIGN))
133133
CodesignFile =
134+
else ifeq (debug, $(MACOSX_CODESIGN_MODE))
135+
define CodesignFile
136+
$(CODESIGN) --remove-signature $1
137+
$(CODESIGN) --sign - \
138+
--entitlements $(TOPDIR)/make/data/macosxsigning/default-debug.plist \
139+
--force \
140+
$1
141+
endef
142+
else ifeq (hardened, $(MACOSX_CODESIGN_MODE))
143+
define CodesignFile
144+
$(CODESIGN) --remove-signature $1
145+
$(CODESIGN) --sign "$(MACOSX_CODESIGN_IDENTITY)" \
146+
--entitlements $(TOPDIR)/make/data/macosxsigning/default.plist \
147+
--force \
148+
--options runtime \
149+
--timestamp \
150+
$1
151+
endef
134152
else
135-
CodesignFile = $(CODESIGN) --sign "$(MACOSX_CODESIGN_IDENTITY)" \
136-
--entitlements $(TOPDIR)/make/data/macosxsigning/default.plist \
137-
--options runtime \
138-
--timestamp \
139-
$1
153+
CodesignFile =
140154
endif
141155

142156
# Archive from which to import Health Center content.

0 commit comments

Comments
 (0)