forked from nightingale-media-player/nightingale-hacking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
190 lines (165 loc) · 6.66 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#
# BEGIN SONGBIRD GPL
#
# This file is part of the Songbird web player.
#
# Copyright(c) 2005-2008 POTI, Inc.
# http://www.songbirdnest.com
#
# This file may be licensed under the terms of of the
# GNU General Public License Version 2 (the GPL).
#
# Software distributed under the License is distributed
# on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the GPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the GPL along with this
# program. If not, go to http://www.gnu.org/licenses/gpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END SONGBIRD GPL
#
DEPTH = .
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/build/autodefs.mk
TIERS = base \
deps \
appbase \
componentsbase \
ui \
componentsall \
extensions \
branding \
documentation \
$(NULL)
ifdef SB_ENABLE_TESTS
TIERS += unittests
endif
ifdef SB_ENABLE_STATIC
TIERS += static
endif
ifdef HAS_EXTRAS
TIERS += extras
endif
ifdef MAKE_INSTALLER
TIERS += installer
endif
ifdef SONGBIRD_OFFICIAL
TIERS += update
endif
ifdef SB_ENABLE_BREAKPAD
BREAKPAD_SYMBOL_PATH = $(SONGBIRD_OBJDIR)/breakpad-symbols
BREAKPAD_ARCHIVE_PATH = $(SONGBIRD_OBJDIR)
BREAKPAD_ARCHIVE_FILENAME = symbols-$(SB_BUILD_ID).zip
MAKE_SYM_STORE_ARGS = --vcs-info
DUMP_SYMS_BIN = $(MOZSDK_BIN_DIR)/dump_syms$(BIN_SUFFIX)
# After XR repins...
# MAKE_SYM_STORE_ARGS = --vcs-info -V
ifeq ($(SB_PLATFORM),windows)
# we want to copy PDB files on Windows
MAKE_SYM_STORE_ARGS += -c
# PDB files don't get moved to dist, so we need to scan the whole objdir
MAKE_SYM_STORE_PATH = ./
endif
ifeq ($(SB_PLATFORM),macosx)
ifeq ($(SB_ARCH),i686)
BREAKPAD_ARCH = i386
else
BREAKPAD_ARCH = $(SB_ARCH)
endif
MAKE_SYM_STORE_ARGS += -a $(BREAKPAD_ARCH)
MAKE_SYM_STORE_PATH = $(SONGBIRD_OBJDIR)/dist/Nightingale.app/Contents/Resources/components
endif
ifeq ($(SB_PLATFORM),linux)
MAKE_SYM_STORE_PATH = $(SONGBIRD_OBJDIR)/dist/components
endif
endif #SB_ENABLE_BREAKPAD
include $(topsrcdir)/build/rules.mk
# We have both stripsymbols and do_stripsymbols because in the common case,
# where we do a |make -f songbird.mk clobber && make -f songbird.mk|,
# sbBuildInfo.ini won't be pre-processed yet. This means that things like
# SB_BUILD_APP and SB_BUILD_ID, taken from that file in build/config.mk
# will get filled with empty values (it uses := in the assignment for perf
# reasons) when this top-level makefile gets initially called; we solve that
# by calling ourselves with a specific targe, which will cause the makefile
# to re-include build/config.mk, at which point sbBuildInfo.ini will have been
# pre-processed, exist, and all will be good with the world.
stripsymbols:
$(MAKE) -f $(THISMAKEFILE) do_stripsymbols
# The strip-symbols target is only run for Mac and linux; it looks for
# .so's on Linux, .dylibs AND .sos on Mac, because the gstreamer vendor build
# gets the extension stuff wrong, and creates libraries with the .so extension
# even on the Mac. Whee...
do_stripsymbols: buildsymbols
ifdef MAKE_INSTALLER
ifneq (windows,$(SB_PLATFORM))
@echo "Stripping package directory..."
ifeq (macosx,$(SB_PLATFORM))
$(silent)$(FIND) $(SONGBIRD_DISTDIR) -type f -name "*.dylib" \
-exec $(STRIP) $(STRIP_FLAGS) {} \;
endif
$(silent)$(FIND) $(SONGBIRD_DISTDIR) -type f -name "*.so" \
-exec $(STRIP) $(STRIP_FLAGS) {} \;
endif
endif
buildsymbols:
ifdef SB_ENABLE_BREAKPAD
@echo Building Breakpad symbol store $(SB_BUILD_ID)...
$(MKDIR) $(BREAKPAD_SYMBOL_PATH)/$(SB_BUILD_ID)
$(PYTHON) $(MOZSDK_SCRIPTS_DIR)/symbolstore.py \
$(MAKE_SYM_STORE_ARGS) -s $(topsrcdir)/ $(DUMP_SYMS_BIN) \
$(BREAKPAD_SYMBOL_PATH)/$(SB_BUILD_ID) \
$(MAKE_SYM_STORE_PATH) > \
$(BREAKPAD_SYMBOL_PATH)/$(SB_BUILD_ID)/$(SB_APPNAME)-$(SB_MILESTONE)-$(SB_PLATFORM)-$(SB_ARCH)-$(SB_BUILD_ID)-symbols.txt
@echo Setting symbol store package permissions...
$(silent)$(FIND) $(BREAKPAD_SYMBOL_PATH)/$(SB_BUILD_ID) -type d -exec $(CHMOD) 0755 {} \;
$(silent)$(FIND) $(BREAKPAD_SYMBOL_PATH)/$(SB_BUILD_ID) -type f -exec $(CHMOD) 0644 {} \;
@echo Packing up symbols...
cd $(BREAKPAD_SYMBOL_PATH)/$(SB_BUILD_ID) && \
$(ZIP) -r9D $(BREAKPAD_SYMBOL_PATH)/$(BREAKPAD_ARCHIVE_FILENAME) .
$(MKDIR) $(BREAKPAD_ARCHIVE_PATH)
$(MV) $(BREAKPAD_SYMBOL_PATH)/$(BREAKPAD_ARCHIVE_FILENAME) \
$(BREAKPAD_ARCHIVE_PATH)
endif # SB_ENABLE_BREAKPAD
# For the same reason as stripsymbols/do_stripsymbols; explanation up there
uploadsymbols:
$(MAKE) -f $(THISMAKEFILE) do_uploadsymbols
do_uploadsymbols:
ifneq (,$(SONGBIRD_NIGHTLY)$(SONGBIRD_OFFICIAL))
ifdef SB_ENABLE_BREAKPAD
$(MOZSDK_SCRIPTS_DIR)/upload_symbols.sh \
$(BREAKPAD_ARCHIVE_PATH)/$(BREAKPAD_ARCHIVE_FILENAME) \
$(SYMBOL_SERVER_PATH)/$(SB_MILESTONE)/$(SB_BUILD_NUMBER)/$(SB_PLATFORM)-$(SB_ARCH)
# Kinda hacky, but we can't put this in upload_symbols.sh because it
# doens't have enough information to pass to the command (root symbol
# store, etc.) We take the extra step of protecting this in a
# nightly/official build check
ssh -2 -p $(SYMBOL_SERVER_PORT) \
-i $(SYMBOL_SERVER_SSH_KEY) \
-l $(SYMBOL_SERVER_USER) $(SYMBOL_SERVER_HOST) \
"set -e; \$$HOME/buildbot/breakpad-symlinkify.pl $(SYMBOL_SERVER_PATH) $(SYMBOL_SERVER_PATH)/$(SB_MILESTONE)/$(SB_BUILD_NUMBER)/$(SB_PLATFORM)-$(SB_ARCH)"
endif
endif
GARBAGE += $(SONGBIRD_OBJDIR)/$(DISTDIR_MANIFEST)
# Set the LANG variable, since that impacts how sort works, but only if we're
# doing distdir_manifest stuff...
ifneq (,$(filter %distdir_manifest, $(MAKECMDGOALS)))
export LANG = C
endif
test_distdir_manifest:
@cd $(SONGBIRD_DISTDIR) && $(FIND) . -type f | $(GREP) -v '^\./testharness/' | $(SORT) -n > $(SONGBIRD_OBJDIR)/$(DISTDIR_MANIFEST)
@if test -z "$$($(DIFF) -q $(topsrcdir)/update/$(DISTDIR_MANIFEST) $(SONGBIRD_OBJDIR)/$(DISTDIR_MANIFEST))"; then \
echo Distdir manifests are OK. No added or deleted files detected.; \
else \
echo Distdir manifests DO NOT MATCH. Differences: ; \
$(DIFF) -u $(topsrcdir)/update/$(DISTDIR_MANIFEST) $(SONGBIRD_OBJDIR)/$(DISTDIR_MANIFEST); \
exit -1; \
fi
distdir_manifest:
@echo Making distdir manifest in $(topsrcdir)/update...
$(silent)cd $(SONGBIRD_DISTDIR) && $(FIND) . -type f | $(GREP) -v '^\./testharness/' | $(SORT) -n > $(topsrcdir)/update/$(DISTDIR_MANIFEST)
.PHONY: buildsymbols uploadsymbols do_uploadsymbols stripsymbols do_stripsymbols test_distdir_manifest distdir_manifest