15
15
-rm -rf autom4te*.cache
18
distdepend:: update_plist_version
19
distdepend:: update_bindist_version
19
22
xcodebuild -target $(XCODE_TARGET) -configuration Debug build
21
24
release:: distdepend
22
25
xcodebuild -target $(XCODE_TARGET) -configuration Release build
27
release:: check_versions
27
codesign -vfs 'Jamie Zawinski' build/Release/*.{app,saver}
32
codesign -vfs 'Jamie Zawinski' build/Release/*.app
33
codesign -vfs 'Jamie Zawinski' build/Release/*.saver
28
34
codesign -vfs 'Jamie Zawinski' build/Release/*.wdgt/*.widgetplugin
29
35
# codesign -vfs 'Jamie Zawinski' build/Release/*.wdgt
40
V=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ;]*\).*/\1/p' < $$U` ; \
43
for P in `find $$DIR -name Info.plist` ; do \
44
V2=`perl -0000 -n -e \
45
'm@<key>CFBundleVersion</key>\s*<string>(.*?)</string>@si \
46
&& print $$1' < $$P` ; \
47
if [ "$$V2" != "$$V" ] ; then \
48
echo "Wrong version: $$P ($$V2)" ; \
52
if [ "$$RESULT" = 0 ]; then echo "Versions match ($$V2)" ; fi ; \
33
58
\( \( -name '.??*' -o -name build -o -name CVS -o -name '*~*' \
34
-o -name 'jwz.*' -o -name '*.widgetplugin' \) \
59
-o -name 'jwz.*' -o -name '*.widgetplugin' \
60
-o -name 'iphone-snap' \) \
36
62
-o -type f -print \
40
distdepend:: update_bindist_version
68
SS="AppInfo.plist SaverInfo.plist PluginInfo.plist iPhoneInfo.plist *.wdgt/Info.plist" ; \
70
V=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' $$SRC` ; \
74
/bin/echo -n "Updating version number in $$S to \"$$V\"... " ; \
75
KEYS1="CFBundleVersion|CFBundleShortVersionString" ; \
76
KEYS2="NSHumanReadableCopyright|CFBundleLongVersionString|CFBundleGetInfoString" ; \
78
"s@(<key>($$KEYS1)</key>\s*<string>)[^<>]+(</string>)@\$${1}$$V\$${3}@g; \
79
s@(<key>($$KEYS2)</key>\s*<string>[^\d]+)[\d.]+(.*?</string>)@\$${1}$$V\$${3}@gs; \
80
s@(<key>($$KEYS2)</key>\s*<string>.*?1991-)\d\d\d\d(.*?</string>)@\$${1}$$Y\$${3}@gs" \
82
if cmp -s $$S $$T ; then \
41
92
update_bindist_version:
43
94
SS="bindist.rtf" ; \
61
distdepend:: update_plist_version
64
SS="AppInfo.plist SaverInfo.plist PluginInfo.plist *.wdgt/Info.plist" ; \
66
V=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ;]*\).*/\1/p' $$SRC` ; \
68
/bin/echo -n "Updating version number in $$S to \"$$V\"... " ; \
70
KEYS1="CFBundleVersion|CFBundleShortVersionString" ; \
71
KEYS2="NSHumanReadableCopyright|CFBundleLongVersionString|CFBundleGetInfoString" ; \
73
"s@(<key>($$KEYS1)</key>\s*<string>)[\d.]+(</string>)@\$${1}$$V\$${3}@gs; \
74
s@(<key>($$KEYS2)</key>\s*<string>[^\d]+)[\d.]+(.*?</string>)@\$${1}$$V\$${3}@gs" \
76
if cmp -s $$S $$T ; then \
86
112
# -format UDBZ saves 4% over UDZO, but that's only 8KB.
113
dmg:: distdepend check_versions
90
116
SRC=../version.h ; \
102
128
rm -rf "$$STAGE" ; \
103
129
echo + mkdir "$$STAGE" ; \
104
130
mkdir "$$STAGE" ; \
105
FILES="$$SRC/*.app $$SRC/*.saver $$SRC/*.wdgt ../palm/daliclock.prc" ; \
131
FILES="$$SRC/*.app $$SRC/*.saver $$SRC/*.wdgt" ; \
106
132
echo + cp -pr $$FILES "$$STAGE" ; \
107
133
cp -pr $$FILES "$$STAGE" ; \
110
136
cp -p bindist-DS_Store "$$STAGE/.DS_Store" ; \
111
137
/Developer/Tools/SetFile -a E "$$STAGE/ READ ME.rtf" ; \
112
138
/Developer/Tools/SetFile -a e $$STAGE/*.saver ; \
113
/Developer/Tools/SetFile -a e $$STAGE/*.prc ; \
114
139
/Developer/Tools/SetFile -a e $$STAGE/*.wdgt ; \
115
seticon -d daliclockPRC.icns $$STAGE/*.prc ; \
116
140
seticon -d daliclockSaver.icns $$STAGE/*.saver ; \
117
141
seticon -d daliclockWidget.icns $$STAGE/*.wdgt ; \
118
142
hdiutil makehybrid -quiet -ov -hfs -hfs-volume-name "$$VOLNAME" \