/[jscoverage]/trunk/js/Makefile.in
ViewVC logotype

Contents of /trunk/js/Makefile.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 399 - (show annotations)
Tue Dec 9 03:37:47 2008 UTC (11 years, 9 months ago) by siliconforks
File size: 17771 byte(s)
Use SpiderMonkey from Firefox 3.1b2.

1 # -*- Mode: makefile -*-
2 #
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 #
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
10 #
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
14 # License.
15 #
16 # The Original Code is Mozilla Communicator client code, released
17 # March 31, 1998.
18 #
19 # The Initial Developer of the Original Code is
20 # Netscape Communications Corporation.
21 # Portions created by the Initial Developer are Copyright (C) 1998
22 # the Initial Developer. All Rights Reserved.
23 #
24 # Contributor(s):
25 #
26 # Alternatively, the contents of this file may be used under the terms of
27 # either of the GNU General Public License Version 2 or later (the "GPL"),
28 # or 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.
37 #
38 # ***** END LICENSE BLOCK *****
39
40 DEPTH = .
41 topsrcdir = @top_srcdir@
42 srcdir = @srcdir@
43
44 DIRS = config
45
46 include $(DEPTH)/config/autoconf.mk
47
48 MODULE = js
49 LIBRARY_NAME = mozjs
50 GRE_MODULE = 1
51
52 PROGRAM = js$(BIN_SUFFIX)
53 # The shell uses some 'HIDDEN' symbols to produce statistics, so we
54 # link directly against the .o files, not against the JS shared
55 # library.
56 PROGOBJS = js.$(OBJ_SUFFIX) $(OBJS)
57 LIBS = $(NSPR_LIBS)
58
59 ifdef GNU_CXX
60 ifdef INTEL_CXX
61 # icc gets special optimize flags
62 ifdef MOZ_PROFILE_GENERATE
63 MODULE_OPTIMIZE_FLAGS = -O0
64 else
65 MODULE_OPTIMIZE_FLAGS = -O2 -ip
66 #XXX: do we want different INTERP_OPTIMIZER flags here?
67 endif
68 else # not INTEL_CXX
69 MODULE_OPTIMIZE_FLAGS = -Os -fstrict-aliasing $(MOZ_OPTIMIZE_SIZE_TWEAK)
70 # Special optimization flags for jsinterp.c
71 INTERP_OPTIMIZER = -O3 -fstrict-aliasing
72 endif
73 else # not GNU_CXX
74 ifeq ($(OS_ARCH),SunOS)
75 MODULE_OPTIMIZE_FLAGS = -xO4
76 endif
77 ifeq ($(OS_ARCH),WINNT)
78 ifdef WINCE
79 # -GL is not supported on windows mobile while we are using the arm-wince-link command
80 MODULE_OPTIMIZE_FLAGS = -O2
81 else
82 MODULE_OPTIMIZE_FLAGS = -O2 -GL
83 endif
84 endif
85 endif
86
87
88 ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
89 LIBRARY_NAME = js$(MOZ_BITS)$(VERSION_NUMBER)
90 RESFILE = js$(MOZ_BITS)40.res
91 endif
92
93 # JavaScript must be built shared, even for static builds, as it is used by
94 # other modules which are always built shared. Failure to do so results in
95 # the js code getting copied into xpinstall and jsd as well as mozilla-bin,
96 # and then the static data cells used for locking no longer work.
97
98 ifndef JS_STATIC_BUILD
99 FORCE_SHARED_LIB = 1
100 endif
101
102 ifeq (86,$(findstring 86,$(OS_TEST)))
103 ifeq (64,$(findstring 64,$(OS_TEST)))
104 else
105 DEFINES += -DAVMPLUS_IA32
106 NANOJIT_ARCH = i386
107 ENABLE_JIT = 1
108 endif
109 endif
110
111 ifeq (arm,$(findstring arm,$(OS_TEST)))
112 DEFINES += -DAVMPLUS_ARM
113 NANOJIT_ARCH = ARM
114 ENABLE_JIT = 1
115 endif
116
117 ifneq (,$(filter Linux Darwin SunOS FreeBSD,$(OS_ARCH)))
118 DEFINES += -DAVMPLUS_UNIX
119 endif
120
121 ifeq ($(OS_ARCH),Linux)
122 DEFINES += -DAVMPLUS_LINUX
123 endif
124
125 ifeq ($(OS_ARCH),WINNT)
126 DEFINES += -DAVMPLUS_WIN32
127 endif
128
129 VPATH = $(srcdir)
130
131 CPPSRCS = \
132 jsapi.cpp \
133 jsarena.cpp \
134 jsarray.cpp \
135 jsatom.cpp \
136 jsbool.cpp \
137 jscntxt.cpp \
138 jsdate.cpp \
139 jsdbgapi.cpp \
140 jsdhash.cpp \
141 jsdtoa.cpp \
142 jsemit.cpp \
143 jsexn.cpp \
144 jsfun.cpp \
145 jsgc.cpp \
146 jshash.cpp \
147 jsinterp.cpp \
148 jsinvoke.cpp \
149 jsiter.cpp \
150 jslock.cpp \
151 jslog2.cpp \
152 jslong.cpp \
153 jsmath.cpp \
154 jsnum.cpp \
155 jsobj.cpp \
156 json.cpp \
157 jsopcode.cpp \
158 jsparse.cpp \
159 jsprf.cpp \
160 jsregexp.cpp \
161 jsscan.cpp \
162 jsscope.cpp \
163 jsscript.cpp \
164 jsstr.cpp \
165 jsutil.cpp \
166 jsxdrapi.cpp \
167 jsxml.cpp \
168 prmjtime.cpp \
169 $(NULL)
170
171 ifdef HAVE_DTRACE
172 CSRCS += \
173 jsdtracef.c
174 endif
175
176 INSTALLED_HEADERS = \
177 js-config.h \
178 jsautocfg.h \
179 jsautokw.h \
180 js.msg \
181 jsapi.h \
182 jsarray.h \
183 jsarena.h \
184 jsatom.h \
185 jsbit.h \
186 jsbool.h \
187 jsclist.h \
188 jscntxt.h \
189 jscompat.h \
190 jsdate.h \
191 jsdbgapi.h \
192 jsdhash.h \
193 jsdtoa.h \
194 jsemit.h \
195 jsfun.h \
196 jsgc.h \
197 jshash.h \
198 jsinterp.h \
199 jsiter.h \
200 jslock.h \
201 jslong.h \
202 jsmath.h \
203 jsnum.h \
204 jsobj.h \
205 json.h \
206 jsopcode.tbl \
207 jsopcode.h \
208 jsotypes.h \
209 jsparse.h \
210 jsprf.h \
211 jsproto.tbl \
212 jsprvtd.h \
213 jspubtd.h \
214 jsregexp.h \
215 jsscan.h \
216 jsscope.h \
217 jsscript.h \
218 jsstddef.h \
219 jsstr.h \
220 jstracer.h \
221 jstypes.h \
222 jsutil.h \
223 jsversion.h \
224 jsxdrapi.h \
225 jsxml.h \
226 $(NULL)
227
228 ifdef ENABLE_JIT
229 VPATH += $(srcdir)/nanojit
230
231 INSTALLED_HEADERS += \
232 builtins.tbl \
233 jsbuiltins.h \
234 Assembler.h \
235 LIR.h \
236 avmplus.h \
237 Fragmento.h \
238 Native.h \
239 Native$(NANOJIT_ARCH).h \
240 RegAlloc.h \
241 nanojit.h \
242 TraceTreeDrawer.h \
243 $(NULL)
244
245 CPPSRCS += \
246 jstracer.cpp \
247 Assembler.cpp \
248 Fragmento.cpp \
249 LIR.cpp \
250 RegAlloc.cpp \
251 avmplus.cpp \
252 Native$(NANOJIT_ARCH).cpp \
253 jsbuiltins.cpp \
254 $(NULL)
255
256 ifdef DEBUG
257 CPPSRCS += TraceTreeDrawer.cpp
258 endif
259
260 DEFINES += -DFEATURE_NANOJIT -DJS_TRACER
261 endif
262
263 ifdef HAVE_DTRACE
264 INSTALLED_HEADERS += \
265 jsdtracef.h \
266 $(CURDIR)/javascript-trace.h \
267 $(NULL)
268 endif
269
270 ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
271 INSTALLED_HEADERS += jscpucfg.h
272 endif
273
274 JS_SAFE_ARENA = 1
275
276 DASH_R = -r
277
278 ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
279 SDK_LIBRARY = $(IMPORT_LIBRARY)
280 else
281 SDK_LIBRARY = $(SHARED_LIBRARY)
282 endif
283
284 include $(topsrcdir)/config/config.mk
285
286 EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
287
288 ifdef MOZ_MEMORY
289 ifeq ($(OS_ARCH),SunOS)
290 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DIST)/lib)
291 endif
292 endif
293
294 # When using gcc the assembly is inlined in the C-file (see jslock.cpp)
295 ifeq ($(OS_ARCH),SunOS)
296 ifneq (86,$(findstring 86,$(OS_TEST)))
297 ifndef GNU_CC
298 ASFILES = lock_$(OS_ARCH).s
299 endif
300 endif
301 endif
302
303 ifndef BUILD_OPT
304 MOCHAFILE = 1
305 endif
306
307 ifndef NSBUILDROOT
308 JSJAVA_STUBHEADERS = \
309 -I$(topsrcdir)/sun-java/include/_gen \
310 -I$(topsrcdir)/sun-java/netscape/javascript/_jri \
311 -I$(topsrcdir)/sun-java/netscape/security/_jri
312 else
313 JSJAVA_STUBHEADERS = -I$(JRI_GEN_DIR) -I$(JDK_GEN_DIR)
314 endif
315
316 JSJAVA_CFLAGS = \
317 -I$(topsrcdir)/sun-java/md-include \
318 -I$(topsrcdir)/sun-java/include \
319 $(JSJAVA_STUBHEADERS)
320
321 # Define keyword generator before rules.mk, see bug 323979 comment 50
322
323 HOST_SIMPLE_PROGRAMS += host_jskwgen$(HOST_BIN_SUFFIX)
324 GARBAGE += jsautokw.h host_jskwgen$(HOST_BIN_SUFFIX)
325
326 HOST_SIMPLE_PROGRAMS += host_jsoplengen$(HOST_BIN_SUFFIX)
327 GARBAGE += jsautooplen.h host_jsoplengen$(HOST_BIN_SUFFIX)
328
329 USE_HOST_CXX = 1
330
331 ifdef HAVE_DTRACE
332 ifneq ($(OS_ARCH),Darwin)
333 DTRACE_PROBE_OBJ = $(LIBRARY_NAME)-dtrace.$(OBJ_SUFFIX)
334 endif
335 MOZILLA_DTRACE_SRC = $(srcdir)/javascript-trace.d
336 endif
337
338 include $(topsrcdir)/config/rules.mk
339
340 ifdef MOZ_SYNC_BUILD_FILES
341 # Because the SpiderMonkey can be distributed and built independently
342 # of the Mozilla source tree, it contains its own copies of many of
343 # the files used by the top-level Mozilla build process, from the
344 # 'config' and 'build' subtrees.
345 #
346 # To make it simpler to keep the copies in sync, we follow the policy
347 # that the SpiderMonkey copies must always be exact copies of those in
348 # the containing Mozilla tree. If you've made a change in one, it
349 # belongs in the other as well. If the change isn't right for both
350 # places, then that's something to bring up with the other developers.
351 #
352 # Some files are reasonable to diverge; for example,
353 # js/config/autoconf.mk.in doesn't need most of the stuff in
354 # config/autoconf.mk.in.
355 check-sync-dirs = $(PYTHON) $(srcdir)/config/check-sync-dirs.py
356 check::
357 $(check-sync-dirs) $(srcdir)/config $(MOZ_SYNC_BUILD_FILES)/config
358 $(check-sync-dirs) $(srcdir)/build $(MOZ_SYNC_BUILD_FILES)/build
359 endif
360
361 # our build system doesn't handle subdir srcs very gracefully today
362 export::
363 mkdir -p nanojit
364
365 DEFINES += -DEXPORT_JS_API
366
367 INCLUDES += -I$(srcdir)
368
369 # MSVC '-Gy' cc flag and '/OPT:REF' linker flag cause JS_GetArgument and
370 # JS_GetLocalVariable to be folded to the same address by the linker,
371 # leading to a crash on startup. See bug 151066. So, in optimized builds,
372 # add the /OPT:NOICF flag, which turns off 'identical COMDAT folding'.
373 #
374 # N.B.: 'identical COMDAT folding' that folds functions whose addresses
375 # are taken violates the ISO C and C++ standards.
376 ifndef MOZ_DEBUG
377 ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
378 LDFLAGS += -OPT:NOICF
379 endif
380 endif
381
382 GARBAGE += jscpucfg.o jsautocfg.h jsautocfg.tmp jscpucfg
383
384 ifneq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH)))
385 TARGETS += jscpucfg$(HOST_BIN_SUFFIX)
386 endif
387
388 ifdef JS_SAFE_ARENA
389 DEFINES += -DJS_USE_SAFE_ARENA
390 endif
391
392 ifdef JS_THREADSAFE
393 DEFINES += -DJS_THREADSAFE
394 endif
395
396 ifdef JS_NO_THIN_LOCKS
397 DEFINES += -DJS_USE_ONLY_NSPR_LOCKS
398 endif
399
400 ifdef JS_VERSION
401 DEFINES += -DJS_VERSION=$(JS_VERSION)
402 endif
403
404 ifneq ($(findstring -L,$(NSPR_LIBS)),)
405 NSPR_STATIC_PATH = $(subst -L,,$(findstring -L,$(NSPR_LIBS)))
406 else
407 NSPR_STATIC_PATH = $(DIST)/lib
408 endif
409
410 ifdef MOZ_SHARK
411 CFLAGS += -F/System/Library/PrivateFrameworks
412 CXXFLAGS += -F/System/Library/PrivateFrameworks
413 LDFLAGS += -F/System/Library/PrivateFrameworks -framework CHUD
414 endif
415
416 ifdef MOZ_VTUNE
417 CXXFLAGS += -IC:/Program\ Files/Intel/VTune/Analyzer/Include
418 EXTRA_DSO_LDOPTS += C:/Program\ Files/Intel/VTune/Analyzer/Lib/VtuneApi.lib
419 LIBS += C:/Program\ Files/Intel/VTune/Analyzer/Lib/VtuneApi.lib
420 endif
421
422 # BeOS and HP-UX do not require the extra linking of "-lm"
423 ifeq (,$(filter BeOS HP-UX WINNT WINCE OpenVMS,$(OS_ARCH)))
424 EXTRA_LIBS += -lm
425 endif
426
427 # Prevent floating point errors caused by VC++ optimizations
428 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
429 ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
430 CFLAGS += -Op
431 else
432 CFLAGS += -fp:precise
433 endif
434 endif # WINNT
435
436 ifeq ($(OS_ARCH),FreeBSD)
437 EXTRA_LIBS += -pthread
438 endif
439 ifeq ($(OS_ARCH),IRIX)
440 ifdef USE_N32
441 DASH_R += -n32
442 endif
443 endif
444 ifeq ($(OS_ARCH),Linux)
445 EXTRA_LIBS += -ldl
446 endif
447 ifeq ($(OS_ARCH),OSF1)
448 EXTRA_LIBS += -lc_r
449 endif
450 ifeq ($(OS_ARCH),SunOS)
451 ifeq ($(TARGET_CPU),sparc)
452
453 ifdef JS_ULTRASPARC_OPTS
454 DEFINES += -DULTRA_SPARC
455 ifdef GNU_CC
456 CFLAGS += -Wa,-xarch=v8plus,-DULTRA_SPARC,-P,-L,-D_ASM,-D__STDC__=0
457 CXXFLAGS += -Wa,-xarch=v8plus,-DULTRA_SPARC,-P,-L,-D_ASM,-D__STDC__=0,-K,PIC
458 else
459 ASFLAGS += -xarch=v8plus -DULTRA_SPARC -P -L -D_ASM -D__STDC__=0 -K PIC
460 endif # GNU_CC
461 endif # JS_ULTRASPARC_OPTS
462
463 endif
464 ifeq ($(OS_RELEASE),4.1)
465 EXTRA_LIBS += -ldl -lnsl
466 else
467 EXTRA_LIBS += -lposix4 -ldl -lnsl -lsocket
468 endif
469 endif
470
471 ifdef MOZ_MEMORY
472 ifeq ($(OS_ARCH),Darwin)
473 LDFLAGS += -ljemalloc
474 endif
475 endif
476
477 # Sun Studio x86 has an optimization bug with LIR.cpp, use -xO2 instead.
478 ifeq ($(OS_ARCH),SunOS)
479 ifeq (86,$(findstring 86,$(OS_TEST)))
480 ifndef GNU_CC
481 LIR.o: LIR.cpp Makefile.in
482 $(REPORT_BUILD)
483 @$(MAKE_DEPS_AUTO_CXX)
484 $(CXX) -o $@ -c $(patsubst -xO%,-xO2,$(COMPILE_CFLAGS)) $<
485 endif
486 endif
487 endif
488
489 # Allow building jsinterp.c with special optimization flags
490 ifdef INTERP_OPTIMIZER
491 jsinterp.$(OBJ_SUFFIX): MODULE_OPTIMIZE_FLAGS=$(INTERP_OPTIMIZER)
492 endif
493
494 ifeq ($(OS_ARCH),IRIX)
495 ifndef GNU_CC
496 _COMPILE_CFLAGS = $(patsubst -O%,-O1,$(COMPILE_CFLAGS))
497 jsapi.o jsxdrapi.o jsarena.o jsarray.o jsatom.o jsemit.o jsfun.o jsinterp.o jsregexp.o jsparse.o jsopcode.o jsscript.o: %.o: %.cpp Makefile.in
498 $(REPORT_BUILD)
499 @$(MAKE_DEPS_AUTO_CXX)
500 $(CXX) -o $@ -c $(_COMPILE_CFLAGS) $<
501 endif
502 endif
503
504 # An AIX Optimization bug causes PR_dtoa() & JS_dtoa to produce wrong result.
505 # This suppresses optimization for this single compilation unit.
506 ifeq ($(OS_ARCH),AIX)
507 jsatom.o: jsatom.cpp Makefile.in
508 $(REPORT_BUILD)
509 @$(MAKE_DEPS_AUTO_CXX)
510 $(CXX) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
511 jsdtoa.o: jsdtoa.cpp Makefile.in
512 $(REPORT_BUILD)
513 @$(MAKE_DEPS_AUTO_CXX)
514 $(CXX) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
515 endif
516
517 jsopcode.h jsopcode.cpp: jsopcode.tbl
518
519 export:: jsautocfg.h
520
521 ifeq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH)))
522 jsautocfg.h:
523 touch $@
524 else
525 ifeq ($(OS_ARCH),WINCE)
526 jsautocfg.h:
527 touch $@
528 else
529 jsautocfg.h: jscpucfg$(HOST_BIN_SUFFIX)
530 @rm -f $@ jsautocfg.tmp
531 ./jscpucfg > jsautocfg.tmp
532 mv jsautocfg.tmp $@
533 endif
534 endif
535
536 # jscpucfg is a strange target
537 # Needs to be built with the host compiler but needs to include
538 # the mdcpucfg for the target so it needs the appropriate target defines
539 ifdef HOST_NSPR_MDCPUCFG
540 HOST_CXX := $(HOST_CXX) -DMDCPUCFG=$(TARGET_NSPR_MDCPUCFG)
541 HOST_CXXFLAGS := $(patsubst -DXP_%,,$(HOST_CXXFLAGS))
542 endif
543
544 ifdef CROSS_COMPILE
545 # jscpucfg needs to know when it's supposed to produce a config for the target
546 JSCPUCFG_DEFINES = $(ACDEFINES)
547
548 # This is incredibly hacky. Darwin NSPR uses the same MDCPUCFG for multiple
549 # processors, and determines which processor to configure for based on
550 # #ifdef i386. This macro is among the NSPR defines, but is also automatically
551 # defined by the compiler when building for i386. It therefore needs to be
552 # defined here if targeting i386, and explicitly undefined otherwise.
553 ifeq ($(OS_ARCH),Darwin)
554 ifeq ($(TARGET_CPU),powerpc)
555 JSCPUCFG_DEFINES += -Ui386
556 else
557 JSCPUCFG_DEFINES += -Di386=1
558 endif
559 endif
560 endif
561
562 ifeq ($(OS_ARCH),QNX)
563 ifneq ($(OS_TARGET),NTO)
564 # QNX's compiler apparently can't build a binary directly from a source file.
565 jscpucfg.o: jscpucfg.cpp Makefile.in
566 $(HOST_CXX) $(HOST_CXXFLAGS) -c $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) -o $@ $<
567
568 jscpucfg: jscpucfg.o
569 $(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) -o $@ $<
570 endif
571 else
572 ifeq ($(OS_ARCH),WINCE)
573 jscpucfg$(HOST_BIN_SUFFIX):
574 echo no need to build jscpucfg $<
575 else
576 jscpucfg$(HOST_BIN_SUFFIX): jscpucfg.cpp Makefile.in
577 $(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) $(HOST_OUTOPTION)$@ $<
578 endif
579 endif
580
581 # Compute the linker flags that programs linking against SpiderMonkey should
582 # pass to get SpiderMonkey and its dependencies, beyond just the -L and -l
583 # for the SpiderMonkey library itself.
584 # - EXTRA_DSO_LDOPTS includes the NSPR -L and -l flags.
585 # - OS_LIBS includes libraries selected by the configure script.
586 # - EXTRA_LIBS includes libraries selected by this Makefile.
587 JS_CONFIG_LIBS=$(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS)
588
589 # The configure script invokes this rule explicitly at configure time!
590 # It's important that js-config be ready by the time we're done
591 # configuring, because we may be running other configure scripts that
592 # would like to run js-config themselves, before js is built.
593 #
594 # This file and rules.mk go through a certain amount of work to decide
595 # which libraries to build, what to name them, and what flags to pass
596 # when linking them (and thus what flags its own clients must pass).
597 # All this information needs to go into the js-config script. To
598 # avoid trying to re-compute all that in the configure script, we just
599 # have the configure script generate this Makefile, and then invoke
600 # this rule.
601 at=@
602 js-config: js-config.in Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk $(topsrcdir)/config/rules.mk
603 rm -f js-config.tmp
604 sed < $< > js-config.tmp \
605 -e 's|$(at)prefix$(at)|$(prefix)|' \
606 -e 's|$(at)exec_prefix$(at)|$(exec_prefix)|' \
607 -e 's|$(at)includedir$(at)|$(includedir)|' \
608 -e 's|$(at)libdir$(at)|$(libdir)|' \
609 -e 's|$(at)MOZILLA_VERSION$(at)|$(MOZILLA_VERSION)|' \
610 -e 's|$(at)LIBRARY_NAME$(at)|$(LIBRARY_NAME)|' \
611 -e 's|$(at)NSPR_CFLAGS$(at)|$(NSPR_CFLAGS)|' \
612 -e 's|$(at)JS_CONFIG_LIBS$(at)|$(JS_CONFIG_LIBS)|' \
613 -e 's|$(at)MOZ_JS_LIBS$(at)|$(MOZ_JS_LIBS)|' \
614 && mv js-config.tmp $@ && chmod +x $@
615
616 SCRIPTS = js-config
617
618 install:: $(INSTALLED_HEADERS)
619 $(SYSINSTALL) $(IFLAGS1) $^ $(includedir)/$(MODULE)
620
621 install:: $(SCRIPTS) $(PROGRAM)
622 $(SYSINSTALL) $(IFLAGS2) $^ $(bindir)
623
624 # The Mozilla top-level makefiles use install-runtime-libs directly to
625 # place an additional copy of the libraries in the 'dist/bin'
626 # directory.
627 install:: install-runtime-libs
628 install-runtime-libs:: $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
629 ifneq (,$(LIBRARY))
630 $(SYSINSTALL) $(IFLAGS1) $(LIBRARY) $(libdir)
631 endif
632 ifneq (,$(SHARED_LIBRARY))
633 $(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(libdir)
634 endif
635 ifneq (,$(IMPORT_LIBRARY))
636 $(SYSINSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(libdir)
637 endif
638
639 # Extra dependancies and rules for auto-generated headers
640 host_jskwgen.$(OBJ_SUFFIX): jsversion.h jskeyword.tbl
641
642 # Use CURDIR to avoid finding a jsautokw.h in the source tree (from a
643 # previous build?) via VPATH when we're building in a separate tree.
644 $(CURDIR)/jsautokw.h: host_jskwgen$(HOST_BIN_SUFFIX)
645 ./host_jskwgen$(HOST_BIN_SUFFIX) $@
646
647 host_jsoplengen.$(OBJ_SUFFIX): jsopcode.tbl
648
649 # Use CURDIR to avoid finding a jsautooplen.h in the source tree (from
650 # a previous build?) via VPATH when we're building in a separate tree.
651 $(CURDIR)/jsautooplen.h: host_jsoplengen$(HOST_BIN_SUFFIX)
652 ./host_jsoplengen$(HOST_BIN_SUFFIX) $@
653
654 # Force auto-header generation before compiling any source that may use them
655 $(CPPSRCS:%.cpp=%.$(OBJ_SUFFIX)): $(CURDIR)/jsautokw.h $(CURDIR)/jsautooplen.h
656
657 ifdef HAVE_DTRACE
658 $(CURDIR)/javascript-trace.h: $(srcdir)/javascript-trace.d
659 dtrace -h -s $(srcdir)/javascript-trace.d -o javascript-trace.h.in
660 sed 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
661 javascript-trace.h.in > javascript-trace.h
662
663 $(CPPSRCS:%.cpp=%.$(OBJ_SUFFIX)): $(CURDIR)/javascript-trace.h
664 endif

  ViewVC Help
Powered by ViewVC 1.1.24