1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
14 # The Original Code is Mozilla Communicator client code, released
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1998
20 # the Initial Developer. All Rights Reserved.
23 # Benjamin Smedberg <bsmedberg@covad.net>
24 # Arthur Wiebe <artooro@gmail.com>
25 # Mark Mentovai <mark@moxienet.com>
27 # Alternatively, the contents of this file may be used under the terms of
28 # either of the GNU General Public License Version 2 or later (the "GPL"),
29 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 # in which case the provisions of the GPL or the LGPL are applicable instead
31 # of those above. If you wish to allow use of your version of this file only
32 # under the terms of either the GPL or the LGPL, and not to allow others to
33 # use your version of this file under the terms of the MPL, indicate your
34 # decision by deleting the provisions above and replace them with the notice
35 # and other provisions required by the GPL or the LGPL. If you do not delete
36 # the provisions above, a recipient may use your version of this file under
37 # the terms of any one of the MPL, the GPL or the LGPL.
39 # ***** END LICENSE BLOCK *****
41 include $(MOZILLA_DIR
)/toolkit
/mozapps
/installer
/package-name.mk
43 # This is how we create the Unix binary packages we release to the public.
44 # Currently the only format is tar.gz (TGZ), but it should be fairly easy
45 # to add .rpm (RPM) and .deb (DEB) later.
48 ifneq (,$(filter mac cocoa
,$(MOZ_WIDGET_TOOLKIT
)))
51 ifeq (,$(filter-out OS2 WINNT BeOS
, $(OS_ARCH
)))
56 ifeq ($(OS_ARCH
), WINNT
)
57 INSTALLER_DIR
= windows
61 ifeq (,$(filter-out SunOS
, $(OS_ARCH
)))
64 ifeq ($(MOZ_WIDGET_TOOLKIT
),gtk2
)
73 endif # MOZ_PKG_FORMAT
75 PACKAGE
= $(PKG_PATH
)$(PKG_BASENAME
)$(PKG_SUFFIX
)
77 MOZ_PKG_DIR
= $(MOZ_APP_NAME
)
79 # By default, the SDK uses the same packaging type as the main bundle,
80 # but on mac it is a .tar.bz2
81 SDK_SUFFIX
= $(PKG_SUFFIX
)
82 SDK
= $(PKG_PATH
)$(PKG_BASENAME
).sdk
$(SDK_SUFFIX
)
84 MAKE_PACKAGE
= $(error What is a
$(MOZ_PKG_FORMAT
) package format?
);
86 CREATE_FINAL_TAR
= $(TAR
) -c
--owner
=0 --group
=0 --numeric-owner \
90 ifeq ($(MOZ_PKG_FORMAT
),TAR
)
92 MAKE_PACKAGE
= $(CREATE_FINAL_TAR
) - $(MOZ_PKG_DIR
) > $(PACKAGE
)
93 UNMAKE_PACKAGE
= $(UNPACK_TAR
) < $(UNPACKAGE
)
94 MAKE_SDK
= $(CREATE_FINAL_TAR
) - $(MOZ_APP_NAME
)-sdk
> $(SDK
)
96 ifeq ($(MOZ_PKG_FORMAT
),TGZ
)
98 MAKE_PACKAGE
= $(CREATE_FINAL_TAR
) - $(MOZ_PKG_DIR
) | gzip
-vf9
> $(PACKAGE
)
99 UNMAKE_PACKAGE
= gunzip
-c
$(UNPACKAGE
) |
$(UNPACK_TAR
)
100 MAKE_SDK
= $(CREATE_FINAL_TAR
) - $(MOZ_APP_NAME
)-sdk | gzip
-vf9
> $(SDK
)
102 ifeq ($(MOZ_PKG_FORMAT
),BZ2
)
103 PKG_SUFFIX
= .
tar.bz2
104 MAKE_PACKAGE
= $(CREATE_FINAL_TAR
) - $(MOZ_PKG_DIR
) | bzip2
-vf
> $(PACKAGE
)
105 UNMAKE_PACKAGE
= bunzip2
-c
$(UNPACKAGE
) |
$(UNPACK_TAR
)
106 MAKE_SDK
= $(CREATE_FINAL_TAR
) - $(MOZ_APP_NAME
)-sdk | bzip2
-vf
> $(SDK
)
108 ifeq ($(MOZ_PKG_FORMAT
),ZIP
)
110 MAKE_PACKAGE
= $(ZIP
) -r9D
$(PACKAGE
) $(MOZ_PKG_DIR
)
111 UNMAKE_PACKAGE
= $(UNZIP
) $(UNPACKAGE
)
112 MAKE_SDK
= $(ZIP
) -r9D
$(SDK
) $(MOZ_APP_NAME
)-sdk
114 ifeq ($(MOZ_PKG_FORMAT
),DMG
)
117 _APPNAME
= $(MOZ_APP_DISPLAYNAME
)Debug.app
119 _APPNAME
= $(MOZ_APP_DISPLAYNAME
).app
123 _BINPATH
= /$(_APPNAME
)/Contents
/MacOS
127 ifneq (,$(MOZ_PKG_MAC_DSSTORE
))
128 PKG_DMG_FLAGS
+= --copy
"$(MOZ_PKG_MAC_DSSTORE):/.DS_Store"
130 ifneq (,$(MOZ_PKG_MAC_BACKGROUND
))
131 PKG_DMG_FLAGS
+= --mkdir
/.background
--copy
"$(MOZ_PKG_MAC_BACKGROUND):/.background"
133 ifneq (,$(MOZ_PKG_MAC_ICON
))
134 PKG_DMG_FLAGS
+= --icon
"$(MOZ_PKG_MAC_ICON)"
136 ifneq (,$(MOZ_PKG_MAC_RSRC
))
137 PKG_DMG_FLAGS
+= --resource
"$(MOZ_PKG_MAC_RSRC)"
139 ifneq (,$(MOZ_PKG_MAC_EXTRA
))
140 PKG_DMG_FLAGS
+= $(MOZ_PKG_MAC_EXTRA
)
142 _ABS_MOZSRCDIR
= $(shell cd
$(MOZILLA_DIR
) && pwd
)
143 ifdef UNIVERSAL_BINARY
144 STAGEPATH
= universal
/
146 ifndef PKG_DMG_SOURCE
147 PKG_DMG_SOURCE
= $(STAGEPATH
)$(MOZ_PKG_DIR
)
149 MAKE_PACKAGE
= $(_ABS_MOZSRCDIR
)/build
/package
/mac_osx
/pkg-dmg \
150 --source
"$(PKG_DMG_SOURCE)" --target
"$(PACKAGE)" \
151 --volname
"$(MOZ_APP_DISPLAYNAME)" $(PKG_DMG_FLAGS
)
154 function cleanup
() { \
155 hdiutil detach
$${DEV_NAME} || \
156 { sleep
5 && hdiutil detach
$${DEV_NAME} -force; }; \
161 expect
$(_ABS_MOZSRCDIR
)/build
/package
/mac_osx
/installdmg.ex
$(UNPACKAGE
) > hdi.output
; \
162 DEV_NAME
=`perl -n -e 'if($$_=~/(\/dev\/disk[^ ]*)/) {print $$1."\n";exit;}'< hdi.output`; \
163 MOUNTPOINT
=`perl -n -e 'split(/\/dev\/disk[^ ]*/,$$_,2);if($$_[1]=~/(\/.[^\r]*)/) {print $$1;exit;}'< hdi.output` || cleanup
1; \
164 rsync
-a
"$${MOUNTPOINT}/$(_APPNAME)" $(MOZ_PKG_DIR
) || cleanup
1; \
165 test -n
"$(MOZ_PKG_MAC_DSSTORE)" && \
166 { rsync
-a
"$${MOUNTPOINT}/.DS_Store" "$(MOZ_PKG_MAC_DSSTORE)" || cleanup
1; }; \
167 test -n
"$(MOZ_PKG_MAC_BACKGROUND)" && \
168 { rsync
-a
"$${MOUNTPOINT}/.background/`basename "$(MOZ_PKG_MAC_BACKGROUND
)"`" "$(MOZ_PKG_MAC_BACKGROUND)" || cleanup
1; }; \
169 test -n
"$(MOZ_PKG_MAC_ICON)" && \
170 { rsync
-a
"$${MOUNTPOINT}/.VolumeIcon.icns" "$(MOZ_PKG_MAC_ICON)" || cleanup
1; }; \
172 if
test -n
"$(MOZ_PKG_MAC_RSRC)" ; then \
173 cp
$(UNPACKAGE
) $(MOZ_PKG_APPNAME
).tmp.dmg
&& \
174 hdiutil unflatten
$(MOZ_PKG_APPNAME
).tmp.dmg
&& \
175 { /Developer
/Tools
/DeRez
-skip plst
-skip blkx
$(MOZ_PKG_APPNAME
).tmp.dmg
> "$(MOZ_PKG_MAC_RSRC)" ||
{ rm -f
$(MOZ_PKG_APPNAME
).tmp.dmg
&& false
; }; } && \
176 rm -f
$(MOZ_PKG_APPNAME
).tmp.dmg
; \
179 # The plst and blkx resources are skipped because they belong to each
180 # individual dmg and are created by hdiutil.
181 SDK_SUFFIX
= .
tar.bz2
182 SDK
= $(MOZ_PKG_APPNAME
)-$(MOZ_PKG_VERSION
).
$(AB_CD
).mac-
$(TARGET_CPU
).sdk
$(SDK_SUFFIX
)
183 MAKE_SDK
= $(CREATE_FINAL_TAR
) - $(MOZ_APP_NAME
)-sdk | bzip2
-vf
> $(SDK
)
186 # dummy macro if we don't have PSM built
188 ifneq (1_
,$(if
$(CROSS_COMPILE
),1,0)_
$(UNIVERSAL_BINARY
))
190 SIGN_NSS
= @echo signing nss libraries
;
192 NSS_DLL_SUFFIX
= $(DLL_SUFFIX
)
193 ifdef UNIVERSAL_BINARY
194 NATIVE_ARCH
= $(shell uname
-p | sed
-e s
/powerpc
/ppc
/)
195 NATIVE_DIST
= $(DIST
:$(DEPTH
)/%=$(DEPTH
)/..
/$(NATIVE_ARCH
)/%)
196 SIGN_CMD
= $(NATIVE_DIST
)/bin
/run-mozilla.sh
$(NATIVE_DIST
)/bin
/shlibsign
-v
-i
198 ifeq ($(OS_ARCH
),OS2
)
199 # uppercase extension to get the correct output file from shlibsign
200 NSS_DLL_SUFFIX
= .DLL
201 SIGN_CMD
= $(MOZILLA_DIR
)/toolkit
/mozapps
/installer
/os2
/sign.cmd
$(DIST
)
203 SIGN_CMD
= $(RUN_TEST_PROGRAM
) $(DIST
)/bin
/shlibsign
-v
-i
207 SOFTOKN
= $(DIST
)/$(STAGEPATH
)$(MOZ_PKG_DIR
)$(_BINPATH
)/$(DLL_PREFIX
)softokn3
$(NSS_DLL_SUFFIX
)
208 FREEBL
= $(DIST
)/$(STAGEPATH
)$(MOZ_PKG_DIR
)$(_BINPATH
)/$(DLL_PREFIX
)freebl3
$(NSS_DLL_SUFFIX
)
209 FREEBL_32FPU
= $(DIST
)/$(STAGEPATH
)$(MOZ_PKG_DIR
)$(_BINPATH
)/$(DLL_PREFIX
)freebl_32fpu_3
$(DLL_SUFFIX
)
210 FREEBL_32INT
= $(DIST
)/$(STAGEPATH
)$(MOZ_PKG_DIR
)$(_BINPATH
)/$(DLL_PREFIX
)freebl_32int_3
$(DLL_SUFFIX
)
211 FREEBL_32INT64
= $(DIST
)/$(STAGEPATH
)$(MOZ_PKG_DIR
)$(_BINPATH
)/$(DLL_PREFIX
)freebl_32int64_3
$(DLL_SUFFIX
)
212 FREEBL_64FPU
= $(DIST
)/$(STAGEPATH
)$(MOZ_PKG_DIR
)$(_BINPATH
)/$(DLL_PREFIX
)freebl_64fpu_3
$(DLL_SUFFIX
)
213 FREEBL_64INT
= $(DIST
)/$(STAGEPATH
)$(MOZ_PKG_DIR
)$(_BINPATH
)/$(DLL_PREFIX
)freebl_64int_3
$(DLL_SUFFIX
)
215 SIGN_NSS
+= $(SIGN_CMD
) $(SOFTOKN
); \
216 if
test -f
$(FREEBL
); then
$(SIGN_CMD
) $(FREEBL
); fi
; \
217 if
test -f
$(FREEBL_32FPU
); then
$(SIGN_CMD
) $(FREEBL_32FPU
); fi
; \
218 if
test -f
$(FREEBL_32INT
); then
$(SIGN_CMD
) $(FREEBL_32INT
); fi
; \
219 if
test -f
$(FREEBL_32INT64
); then
$(SIGN_CMD
) $(FREEBL_32INT64
); fi
; \
220 if
test -f
$(FREEBL_64FPU
); then
$(SIGN_CMD
) $(FREEBL_64FPU
); fi
; \
221 if
test -f
$(FREEBL_64INT
); then
$(SIGN_CMD
) $(FREEBL_64INT
); fi
;
224 endif # !CROSS_COMPILE
256 chrome
/app-chrome.manifest \
258 components
/compreg.dat \
259 components
/xpti.dat \
265 # browser/locales/Makefile uses this makefile for its variable defs, but
266 # doesn't want the libs:: rule.
267 ifndef PACKAGER_NO_LIBS
271 DEFINES
+= -DDLL_PREFIX
=$(DLL_PREFIX
) -DDLL_SUFFIX
=$(DLL_SUFFIX
)
273 ifdef MOZ_PKG_REMOVALS
274 MOZ_PKG_REMOVALS_GEN
= removed-files
276 $(MOZ_PKG_REMOVALS_GEN
): $(MOZ_PKG_REMOVALS
) $(GLOBAL_DEPS
)
277 $(PYTHON
) $(MOZILLA_DIR
)/config
/Preprocessor.py
-Fsubstitution
$(DEFINES
) $(ACDEFINES
) $(MOZ_PKG_REMOVALS
) > $(MOZ_PKG_REMOVALS_GEN
)
279 GARBAGE
+= $(MOZ_PKG_REMOVALS_GEN
)
282 GARBAGE
+= $(DIST
)/$(PACKAGE
) $(PACKAGE
)
284 ifeq ($(OS_ARCH
),IRIX
)
287 ifeq ($(OS_ARCH
),BeOS
)
289 PLATFORM_EXCLUDE_LIST
= ! -name
"*.stub" ! -name
"$(MOZ_PKG_APPNAME)-bin"
291 ifeq ($(OS_ARCH
),OS2
)
292 STRIP
= $(MOZILLA_DIR
)/toolkit
/mozapps
/installer
/os2
/strip.cmd
294 PLATFORM_EXCLUDE_LIST
= ! -name
"*.ico" ! -name
"$(MOZ_PKG_APPNAME).exe"
297 ifneq (,$(filter WINNT OS2
,$(OS_ARCH
)))
303 # The following target stages files into three directories: one directory for
304 # locale-independent files, one for locale-specific files, and one for optional
305 # extensions based on the information in the MOZ_PKG_MANIFEST file and the
307 # MOZ_NONLOCALIZED_PKG_LIST
308 # MOZ_LOCALIZED_PKG_LIST
309 # MOZ_OPTIONAL_PKG_LIST
313 # Define packager macro to work around make 3.81 backslash issue (bug #339933)
315 $(PERL
) -I
$(MOZILLA_DIR
)/xpinstall
/packager
-e
'use Packager; \
316 Packager::Copy($1,$2,$3,$4,$5,$6,$7);'
319 installer-stage
: $(MOZ_PKG_MANIFEST
)
320 ifndef MOZ_PKG_MANIFEST
321 $(error MOZ_PKG_MANIFEST unspecified
!)
323 @
rm -rf
$(DEPTH
)/installer-stage
$(DIST
)/xpt
324 @echo
"Staging installer files..."
325 @
$(NSINSTALL
) -D
$(DEPTH
)/installer-stage
/nonlocalized
326 @
$(NSINSTALL
) -D
$(DEPTH
)/installer-stage
/localized
327 @
$(NSINSTALL
) -D
$(DEPTH
)/installer-stage
/optional
328 @
$(NSINSTALL
) -D
$(DIST
)/xpt
329 $(call PACKAGER_COPY
, "$(DIST)",\
330 "$(DEPTH)/installer-stage/nonlocalized", \
331 "$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1 \
332 $(foreach pkg
,$(MOZ_NONLOCALIZED_PKG_LIST
),$(PKG_ARG
)) )
333 $(call PACKAGER_COPY
, "$(DIST)",\
334 "$(DEPTH)/installer-stage/localized", \
335 "$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1 \
336 $(foreach pkg
,$(MOZ_LOCALIZED_PKG_LIST
),$(PKG_ARG
)) )
337 ifdef MOZ_OPTIONAL_PKG_LIST
338 $(call PACKAGER_COPY
, "$(DIST)",\
339 "$(DEPTH)/installer-stage/optional", \
340 "$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1 \
341 $(foreach pkg
,$(MOZ_OPTIONAL_PKG_LIST
),$(PKG_ARG
)) )
343 $(PERL
) $(MOZILLA_DIR
)/xpinstall
/packager
/xptlink.pl
-s
$(DIST
) -d
$(DIST
)/xpt
-f
$(DEPTH
)/installer-stage
/nonlocalized
/components
-v
-x
"$(XPIDL_LINK)"
345 stage-package
: $(MOZ_PKG_MANIFEST
) $(MOZ_PKG_REMOVALS_GEN
)
346 @
rm -rf
$(DIST
)/$(MOZ_PKG_DIR
) $(DIST
)/$(PKG_PATH
)$(PKG_BASENAME
).
tar $(DIST
)/$(PKG_PATH
)$(PKG_BASENAME
).dmg
$@
$(EXCLUDE_LIST
)
347 # NOTE: this must be a tar now that dist links into the tree so that we
348 # do not strip the binaries actually in the tree.
349 @echo
"Creating package directory..."
350 @mkdir
$(DIST
)/$(MOZ_PKG_DIR
)
351 ifdef MOZ_PKG_MANIFEST
352 $(RM
) -rf
$(DIST
)/xpt
353 $(call PACKAGER_COPY
, "$(DIST)",\
354 "$(DIST)/$(MOZ_PKG_DIR)", \
355 "$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1)
356 $(PERL
) $(MOZILLA_DIR
)/xpinstall
/packager
/xptlink.pl
-s
$(DIST
) -d
$(DIST
)/xpt
-f
$(DIST
)/$(MOZ_PKG_DIR
)/components
-v
-x
"$(XPIDL_LINK)"
357 else # !MOZ_PKG_MANIFEST
358 ifeq ($(MOZ_PKG_FORMAT
),DMG
)
359 # If UNIVERSAL_BINARY, the package will be made from an already-prepared
361 ifndef UNIVERSAL_BINARY
363 @cd
$(DIST
) && rsync
-auv
--copy-unsafe-links
$(_APPNAME
) $(MOZ_PKG_DIR
)
365 @cd
$(DIST
)/bin
&& tar $(TAR_CREATE_FLAGS
) - * |
(cd ..
/$(MOZ_PKG_DIR
); tar -xf
-)
369 @cd
$(DIST
)/bin
&& tar $(TAR_CREATE_FLAGS
) - * |
(cd ..
/$(MOZ_PKG_DIR
); tar -xf
-)
371 endif # MOZ_PKG_MANIFEST
372 ifndef PKG_SKIP_STRIP
373 @echo
"Stripping package directory..."
374 @cd
$(DIST
)/$(STAGEPATH
)$(MOZ_PKG_DIR
); find .
! -type d \
384 ! -name
"*.properties" \
395 $(PLATFORM_EXCLUDE_LIST
) \
396 -exec
$(STRIP
) $(STRIP_FLAGS
) {} >/dev
/null
2>&1 \
;
399 @echo
"Removing unpackaged files..."
401 cd
$(DIST
)/$(STAGEPATH
)$(MOZ_PKG_DIR
)$(_BINPATH
); rm -rf
$(NO_PKG_FILES
)
403 ifdef MOZ_PKG_REMOVALS
404 $(SYSINSTALL
) $(IFLAGS1
) $(MOZ_PKG_REMOVALS_GEN
) $(DIST
)/$(STAGEPATH
)$(MOZ_PKG_DIR
)$(_BINPATH
)
405 endif # MOZ_PKG_REMOVALS
407 make-package
: stage-package
408 @echo
"Compressing..."
409 $(NSINSTALL
) -D
$(DIST
)/$(PKG_PATH
)
410 cd
$(DIST
) && $(MAKE_PACKAGE
)
412 # The install target will install the application to prefix/lib/appname-version
413 # In addition if INSTALL_SDK is set, it will install the development headers,
414 # libraries, and IDL files as follows:
415 # dist/sdk/include -> prefix/include/appname-version/stable
416 # dist/include -> prefix/include/appname-version/unstable
417 # dist/sdk/idl -> prefix/share/idl/appname-version/stable
418 # dist/idl -> prefix/share/idl/appname-version/unstable
419 # dist/sdk/lib -> prefix/lib/appname-devel-version/lib
420 # prefix/lib/appname-devel-version/* symlinks to the above directories
421 install:: stage-package
422 ifneq (,$(filter WINNT Darwin
,$(OS_ARCH
)))
423 $(error
"make install" is not supported on this platform. Use
"make package" instead.
)
425 $(NSINSTALL
) -D
$(DESTDIR
)$(installdir
)
426 (cd
$(DIST
)/$(MOZ_PKG_DIR
) && tar $(TAR_CREATE_FLAGS
) - .
) | \
427 (cd
$(DESTDIR
)$(installdir
) && tar -xf
-)
428 $(NSINSTALL
) -D
$(DESTDIR
)$(bindir)
429 $(RM
) -f
$(DESTDIR
)$(bindir)/$(MOZ_APP_NAME
)
430 ln
-s
$(installdir
)/$(MOZ_APP_NAME
) $(DESTDIR
)$(bindir)
431 ifdef INSTALL_SDK
# Here comes the hard part
432 # include directory is stable (dist/sdk/include) and unstable (dist/include)
433 $(NSINSTALL
) -D
$(DESTDIR
)$(includedir)/stable
434 $(NSINSTALL
) -D
$(DESTDIR
)$(includedir)/unstable
435 (cd
$(DIST
)/sdk
/include && tar $(TAR_CREATE_FLAGS
) - .
) | \
436 (cd
$(DESTDIR
)$(includedir)/stable
&& tar -xf
-)
437 # The dist/include has module subdirectories that we need to flatten
438 find
$(DIST
)/include -xtype f
-exec
$(SYSINSTALL
) $(IFLAGS1
) {} $(DESTDIR
)$(includedir)/unstable \
;
439 # IDL directory is stable (dist/sdk/idl) and unstable (dist/idl)
440 $(NSINSTALL
) -D
$(DESTDIR
)$(idldir
)/stable
441 $(NSINSTALL
) -D
$(DESTDIR
)$(idldir
)/unstable
442 (cd
$(DIST
)/sdk
/idl
&& tar $(TAR_CREATE_FLAGS
) - .
) | \
443 (cd
$(DESTDIR
)$(idldir
)/stable
&& tar -xf
-)
444 (cd
$(DIST
)/idl
&& tar $(TAR_CREATE_FLAGS
) - .
) | \
445 (cd
$(DESTDIR
)$(idldir
)/unstable
&& tar -xf
-)
446 # SDK directory is the libs + a bunch of symlinks
447 $(NSINSTALL
) -D
$(DESTDIR
)$(sdkdir
)/sdk
/lib
448 if
test -f
$(DIST
)/sdk
/include/xpcom-config.h
; then \
449 $(SYSINSTALL
) $(IFLAGS1
) $(DIST
)/sdk
/include/xpcom-config.h
$(DESTDIR
)$(sdkdir
); \
451 (cd
$(DIST
)/sdk
/lib
&& tar $(TAR_CREATE_FLAGS
) - .
) |
(cd
$(DESTDIR
)$(sdkdir
)/sdk
/lib
&& tar -xf
-)
452 $(RM
) -f
$(DESTDIR
)$(sdkdir
)/lib
$(DESTDIR
)$(sdkdir
)/bin
$(DESTDIR
)$(sdkdir
)/sdk
/include $(DESTDIR
)$(sdkdir
)/include $(DESTDIR
)$(sdkdir
)/sdk
/idl
$(DESTDIR
)$(sdkdir
)/idl
453 ln
-s
$(sdkdir
)/sdk
/lib
$(DESTDIR
)$(sdkdir
)/lib
454 ln
-s
$(installdir
) $(DESTDIR
)$(sdkdir
)/bin
455 ln
-s
$(includedir)/stable
$(DESTDIR
)$(sdkdir
)/sdk
/include
456 ln
-s
$(includedir)/unstable
$(DESTDIR
)$(sdkdir
)/include
457 ln
-s
$(idldir
)/stable
$(DESTDIR
)$(sdkdir
)/sdk
/idl
458 ln
-s
$(idldir
)/unstable
$(DESTDIR
)$(sdkdir
)/idl
462 $(MAKE
) stage-package UNIVERSAL_BINARY
= STAGE_SDK
=1 MOZ_PKG_DIR
=sdk-stage
463 @echo
"Packaging SDK..."
464 $(RM
) -rf
$(DIST
)/$(MOZ_APP_NAME
)-sdk
465 $(NSINSTALL
) -D
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/bin
466 (cd
$(DIST
)/sdk-stage
&& tar $(TAR_CREATE_FLAGS
) - .
) | \
467 (cd
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/bin
&& tar -xf
-)
468 $(NSINSTALL
) -D
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/host
/bin
469 (cd
$(DIST
)/host
/bin
&& tar $(TAR_CREATE_FLAGS
) - .
) | \
470 (cd
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/host
/bin
&& tar -xf
-)
471 $(NSINSTALL
) -D
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/sdk
472 (cd
$(DIST
)/sdk
&& tar $(TAR_CREATE_FLAGS
) - .
) | \
473 (cd
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/sdk
&& tar -xf
-)
474 $(NSINSTALL
) -D
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/include
475 (cd
$(DIST
)/include && tar $(TAR_CREATE_FLAGS
) - .
) | \
476 (cd
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/include && tar -xf
-)
477 $(NSINSTALL
) -D
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/idl
478 (cd
$(DIST
)/idl
&& tar $(TAR_CREATE_FLAGS
) - .
) | \
479 (cd
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/idl
&& tar -xf
-)
480 $(NSINSTALL
) -D
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/lib
481 # sdk/lib is the same as sdk/sdk/lib
482 (cd
$(DIST
)/sdk
/lib
&& tar $(TAR_CREATE_FLAGS
) - .
) | \
483 (cd
$(DIST
)/$(MOZ_APP_NAME
)-sdk
/lib
&& tar -xf
-)
484 cd
$(DIST
) && $(MAKE_SDK
)
486 ifeq ($(OS_TARGET
), WINNT
)
487 INSTALLER_PACKAGE
= $(DIST
)/$(PKG_INST_PATH
)$(PKG_INST_BASENAME
).exe
491 $(PYTHON
) $(topsrcdir
)/build
/upload.py
--base-path
$(DIST
) $(DIST
)/$(PACKAGE
) $(INSTALLER_PACKAGE
)
493 ifndef MOZ_PKG_SRCDIR
494 MOZ_PKG_SRCDIR
= $(topsrcdir
)
497 CREATE_SOURCE_TAR
= $(TAR
) -c
--owner
=0 --group
=0 --numeric-owner \
498 --mode
="go-w" --exclude
=".hg*" --exclude
="CVS" --exclude
=".cvs*" -f
500 # source-package creates a source tarball from the files in MOZ_PKG_SRCDIR,
501 # which is either set to a clean checkout or defaults to $topsrcdir
503 @echo
"Packaging source tarball..."
504 (cd
$(MOZ_PKG_SRCDIR
) && $(CREATE_SOURCE_TAR
) - .
) | bzip2
-vf
> $(DIST
)/$(PKG_SRCPACK_PATH
)$(PKG_SRCPACK_BASENAME
).
tar.bz2