4 # ***** BEGIN LICENSE BLOCK *****
5 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
7 # The contents of this file are subject to the Mozilla Public License Version
8 # 1.1 (the "License"); you may not use this file except in compliance with
9 # the License. You may obtain a copy of the License at
10 # http://www.mozilla.org/MPL/
12 # Software distributed under the License is distributed on an "AS IS" basis,
13 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 # for the specific language governing rights and limitations under the
17 # The Original Code is the Netscape Portable Runtime (NSPR).
19 # The Initial Developer of the Original Code is
20 # Netscape Communications Corporation.
21 # Portions created by the Initial Developer are Copyright (C) 1998-2000
22 # the Initial Developer. All Rights Reserved.
26 # Alternatively, the contents of this file may be used under the terms of
27 # either the GNU General Public License Version 2 or later (the "GPL"), or
28 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 # in which case the provisions of the GPL or the LGPL are applicable instead
30 # of those above. If you wish to allow use of your version of this file only
31 # under the terms of either the GPL or the LGPL, and not to allow others to
32 # use your version of this file under the terms of the MPL, indicate your
33 # decision by deleting the provisions above and replace them with the notice
34 # and other provisions required by the GPL or the LGPL. If you do not delete
35 # the provisions above, a recipient may use your version of this file under
36 # the terms of any one of the MPL, the GPL or the LGPL.
38 # ***** END LICENSE BLOCK *****
42 topsrcdir
= @top_srcdir@
46 include $(MOD_DEPTH
)/config
/autoconf.mk
51 # Make nsinstall use absolute symlinks by default for Mozilla OSX builds
52 # http://bugzilla.mozilla.org/show_bug.cgi?id=193164
53 ifeq ($(OS_ARCH
),Darwin
)
55 NSDISTMODE
=absolute_symlink
61 DIST_GARBAGE
= config.cache config.log config.status
63 all:: config.status
export
65 include $(topsrcdir
)/config
/rules.mk
67 config.status
:: configure
68 ifeq ($(OS_ARCH
),WINNT
)
69 sh
$(srcdir)/configure
--no-create
--no-recursion
71 .
/config.status
--recheck
&& .
/config.status
75 # The -ll option of zip converts CR LF to LF.
77 ifeq ($(OS_ARCH
),WINNT
)
81 # Delete config/autoconf.mk last because it is included by every makefile.
83 @echo
"cd pr/tests; $(MAKE) $@"
84 @
$(MAKE
) -C pr
/tests
$@
85 rm -f config
/autoconf.mk
86 rm -f
`cat unallmakefiles` unallmakefiles
89 echo
$(BUILD_NUMBER
) > $(RELEASE_DIR
)/$(BUILD_NUMBER
)/version.df
90 @if
test -f imports.df
; then \
91 echo
"cp -f imports.df $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df"; \
92 cp
-f imports.df
$(RELEASE_DIR
)/$(BUILD_NUMBER
)/imports.df
; \
94 echo
"echo > $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df"; \
95 echo
> $(RELEASE_DIR
)/$(BUILD_NUMBER
)/imports.df
; \
97 cd
$(RELEASE_DIR
)/$(BUILD_NUMBER
)/$(OBJDIR_NAME
); \
98 rm -rf META-INF
; mkdir META-INF
; cd META-INF
; \
99 echo
"Manifest-Version: 1.0" > MANIFEST.MF
; \
100 echo
"" >> MANIFEST.MF
; \
101 cd ..
; rm -f mdbinary.jar
; zip
-r mdbinary.jar META-INF bin lib
; \
104 rm -rf META-INF
; mkdir META-INF
; cd META-INF
; \
105 echo
"Manifest-Version: 1.0" > MANIFEST.MF
; \
106 echo
"" >> MANIFEST.MF
; \
107 cd ..
; rm -f mdheader.jar
; zip
$(ZIP_ASCII_OPT
) -r mdheader.jar
*; \
109 ifeq ($(OS_ARCH
),WINNT
)
110 @if
test ! -d
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
); then \
111 rm -rf
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
); \
112 echo
"making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)"; \
113 mkdir
-p
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
); \
115 @if
test ! -d
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
); then \
116 rm -rf
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
); \
117 echo
"making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)"; \
118 mkdir
-p
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
); \
121 @if
test ! -d
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
); then \
122 rm -rf
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
); \
123 echo
"making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)"; \
124 $(NSINSTALL
) -D
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
); \
125 chmod
775 $(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
); \
127 @if
test ! -d
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
); then \
128 rm -rf
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
); \
129 echo
"making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)"; \
130 $(NSINSTALL
) -D
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
); \
131 chmod
775 $(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
); \
134 cd
$(RELEASE_DIR
)/$(BUILD_NUMBER
); \
135 cp
-f version.df imports.df
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
); \
136 chmod
664 $(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/version.df
; \
137 chmod
664 $(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/imports.df
; \
139 cp
-f mdbinary.jar
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
); \
140 chmod
664 $(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
)/mdbinary.jar
; \
142 cp
-f mdheader.jar
$(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
); \
143 chmod
664 $(MDIST
)/$(MOD_NAME
)/$(BUILD_NUMBER
)/$(RELEASE_OBJDIR_NAME
)/mdheader.jar
146 @echo
"cd pkg; $(MAKE) publish"
147 $(MAKE
) -C pkg publish
150 @echo
"NSPR20 has no dependencies. Skipped."