source: trunk/third/mozilla/js/src/jsconfig.mk @ 18860

Revision 18860, 5.2 KB checked in by rbasch, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18859, which included commits to RCS files with non-trunk default branches.
Line 
1# -*- Mode: makefile -*-
2#
3# The contents of this file are subject to the Netscape Public
4# License Version 1.1 (the "License"); you may not use this file
5# except in compliance with the License. You may obtain a copy of
6# the License at http://www.mozilla.org/NPL/
7#
8# Software distributed under the License is distributed on an "AS
9# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10# implied. See the License for the specific language governing
11# rights and limitations under the License.
12#
13# The Original Code is Mozilla Communicator client code, released
14# March 31, 1998.
15#
16# The Initial Developer of the Original Code is Netscape
17# Communications Corporation. Portions created by Netscape are
18# Copyright (C) 1998-1999 Netscape Communications Corporation. All
19# Rights Reserved.
20#
21# Contributor(s):
22#
23# Alternatively, the contents of this file may be used under the
24# terms of the GNU Public License (the "GPL"), in which case the
25# provisions of the GPL are applicable instead of those above.
26# If you wish to allow use of your version of this file only
27# under the terms of the GPL and not to allow others to use your
28# version of this file under the NPL, indicate your decision by
29# deleting the provisions above and replace them with the notice
30# and other provisions required by the GPL.  If you do not delete
31# the provisions above, a recipient may use your version of this
32# file under either the NPL or the GPL.
33#
34
35ifndef OBJDIR
36  ifdef OBJDIR_NAME
37    OBJDIR = $(OBJDIR_NAME)
38  endif
39endif
40
41NSPR_VERSION = v4.0
42NSPR_LIBSUFFIX = 4
43
44NSPR_LOCAL       = $(MOZ_DEPTH)/dist/$(OBJDIR)/nspr
45NSPR_DIST        = $(MOZ_DEPTH)/dist/$(OBJDIR)
46NSPR_OBJDIR      = $(OBJDIR)
47ifeq ($(OS_ARCH), SunOS)
48  NSPR_OBJDIR   := $(subst _sparc,,$(NSPR_OBJDIR))
49endif
50ifeq ($(OS_ARCH), Linux)
51  LINUX_REL     := $(shell uname -r)
52  ifneq (,$(findstring 2.0,$(LINUX_REL)))
53    NSPR_OBJDIR := $(subst _All,2.0_x86_glibc_PTH,$(NSPR_OBJDIR))
54  else
55    NSPR_OBJDIR := $(subst _All,2.2_x86_glibc_PTH,$(NSPR_OBJDIR))
56  endif
57endif
58ifeq ($(OS_ARCH), AIX)
59  NSPR_OBJDIR   := $(subst 4.1,4.2,$(NSPR_OBJDIR))
60endif
61ifeq ($(OS_CONFIG), IRIX6.2)
62  NSPR_OBJDIR   := $(subst 6.2,6.2_n32_PTH,$(NSPR_OBJDIR))
63endif
64ifeq ($(OS_CONFIG), IRIX6.5)
65  NSPR_OBJDIR   := $(subst 6.5,6.5_n32_PTH,$(NSPR_OBJDIR))
66endif
67ifeq ($(OS_ARCH), WINNT)
68  ifeq ($(OBJDIR), WIN32_D.OBJ)
69    NSPR_OBJDIR  = WINNT4.0_DBG.OBJ
70  endif
71  ifeq ($(OBJDIR), WIN32_O.OBJ)
72    NSPR_OBJDIR  = WINNT4.0_OPT.OBJ
73  endif
74endif
75NSPR_SHARED      = /share/builds/components/nspr20/$(NSPR_VERSION)/$(NSPR_OBJDIR)
76ifeq ($(OS_ARCH), WINNT)
77  NSPR_SHARED    = nspr20/$(NSPR_VERSION)/$(NSPR_OBJDIR)
78endif
79NSPR_VERSIONFILE = $(NSPR_LOCAL)/Version
80NSPR_CURVERSION := $(shell cat $(NSPR_VERSIONFILE))
81
82get_nspr:
83        @echo "Grabbing NSPR component..."
84ifeq ($(NSPR_VERSION), $(NSPR_CURVERSION))
85        @echo "No need, NSPR is up to date in this tree (ver=$(NSPR_VERSION))."
86else
87        mkdir -p $(NSPR_LOCAL)
88        mkdir -p $(NSPR_DIST)
89  ifneq ($(OS_ARCH), WINNT)
90        cp       $(NSPR_SHARED)/*.jar $(NSPR_LOCAL)
91  else
92        sh       $(MOZ_DEPTH)/../reltools/compftp.sh $(NSPR_SHARED) $(NSPR_LOCAL) *.jar
93  endif
94        unzip -o $(NSPR_LOCAL)/mdbinary.jar -d $(NSPR_DIST)
95        mkdir -p $(NSPR_DIST)/include
96        unzip -o $(NSPR_LOCAL)/mdheader.jar -d $(NSPR_DIST)/include
97        rm -rf   $(NSPR_DIST)/META-INF
98        rm -rf   $(NSPR_DIST)/include/META-INF
99        echo $(NSPR_VERSION) > $(NSPR_VERSIONFILE)
100endif
101
102SHIP_DIST  = $(MOZ_DEPTH)/dist/$(OBJDIR)
103SHIP_DIR   = $(SHIP_DIST)/SHIP
104
105SHIP_LIBS      = libjs.$(SO_SUFFIX) libjs.a
106ifdef JS_LIVECONNECT
107  SHIP_LIBS   += libjsj.$(SO_SUFFIX) libjsj.a
108endif
109ifeq ($(OS_ARCH), WINNT)
110  SHIP_LIBS    = js32.dll js32.lib
111  ifdef JS_LIVECONNECT
112    SHIP_LIBS += jsj.dll jsj.lib
113  endif
114endif
115SHIP_LIBS     += $(LCJAR)
116SHIP_LIBS     := $(addprefix $(SHIP_DIST)/lib/, $(SHIP_LIBS))
117
118SHIP_INCS      = js*.h prmjtime.h resource.h *.msg *.tbl
119ifdef JS_LIVECONNECT
120  SHIP_INCS   += netscape*.h nsC*.h nsI*.h
121endif
122SHIP_INCS     := $(addprefix $(SHIP_DIST)/include/, $(SHIP_INCS))
123
124SHIP_BINS      = js
125ifdef JS_LIVECONNECT
126  SHIP_BINS   += lcshell
127endif
128ifeq ($(OS_ARCH), WINNT)
129  SHIP_BINS   := $(addsuffix .exe, $(SHIP_BINS))
130endif
131SHIP_BINS     := $(addprefix $(SHIP_DIST)/bin/, $(SHIP_BINS))
132
133ifdef BUILD_OPT
134  JSREFJAR = jsref_opt.jar
135else
136ifdef BUILD_IDG
137  JSREFJAR = jsref_idg.jar
138else
139  JSREFJAR = jsref_dbg.jar
140endif
141endif
142
143ship:
144        mkdir -p $(SHIP_DIR)/lib
145        mkdir -p $(SHIP_DIR)/include
146        mkdir -p $(SHIP_DIR)/bin
147        cp $(SHIP_LIBS) $(SHIP_DIR)/lib
148        cp $(SHIP_INCS) $(SHIP_DIR)/include
149        cp $(SHIP_BINS) $(SHIP_DIR)/bin
150        cd $(SHIP_DIR); \
151          zip -r $(JSREFJAR) bin lib include
152ifdef BUILD_SHIP
153        cp $(SHIP_DIR)/$(JSREFJAR) $(BUILD_SHIP)
154endif
155
156CWD = $(shell pwd)
157shipSource: $(SHIP_DIR)/jsref_src.lst .FORCE
158        mkdir -p $(SHIP_DIR)
159        cd $(MOZ_DEPTH)/.. ; \
160          zip $(CWD)/$(SHIP_DIR)/jsref_src.jar -@ < $(CWD)/$(SHIP_DIR)/jsref_src.lst
161ifdef BUILD_SHIP
162        cp $(SHIP_DIR)/jsref_src.jar $(BUILD_SHIP)
163endif
164
165JSREFSRCDIRS := $(shell cat $(DEPTH)/SpiderMonkey.rsp)
166$(SHIP_DIR)/jsref_src.lst: .FORCE
167        mkdir -p $(SHIP_DIR)
168        rm -f $@
169        touch $@
170        for d in $(JSREFSRCDIRS); do                                \
171          cd $(MOZ_DEPTH)/..;                                       \
172          ls -1 -d $$d | grep -v CVS | grep -v \.OBJ >> $(CWD)/$@;  \
173          cd $(CWD);                                                \
174        done
175
176.FORCE:
Note: See TracBrowser for help on using the repository browser.