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

Diff of /trunk/js/Makefile.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 332 by siliconforks, Thu Oct 23 19:03:33 2008 UTC revision 399 by siliconforks, Tue Dec 9 03:37:47 2008 UTC
# Line 37  Line 37 
37  #  #
38  # ***** END LICENSE BLOCK *****  # ***** END LICENSE BLOCK *****
39    
40  DEPTH           = ../..  DEPTH           = .
41  topsrcdir       = @top_srcdir@  topsrcdir       = @top_srcdir@
42  srcdir          = @srcdir@  srcdir          = @srcdir@
43    
44    DIRS            = config
45    
46  include $(DEPTH)/config/autoconf.mk  include $(DEPTH)/config/autoconf.mk
47    
48  MODULE          = js  MODULE          = js
49  LIBRARY_NAME    = mozjs  LIBRARY_NAME    = mozjs
50  GRE_MODULE      = 1  GRE_MODULE      = 1
51    
52  ifdef GNU_CC  PROGRAM         = js$(BIN_SUFFIX)
53  ifdef INTEL_CC  # 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  # icc gets special optimize flags
62  ifdef MOZ_PROFILE_GENERATE  ifdef MOZ_PROFILE_GENERATE
63  MODULE_OPTIMIZE_FLAGS = -O0  MODULE_OPTIMIZE_FLAGS = -O0
# Line 56  Line 65 
65  MODULE_OPTIMIZE_FLAGS = -O2 -ip  MODULE_OPTIMIZE_FLAGS = -O2 -ip
66  #XXX: do we want different INTERP_OPTIMIZER flags here?  #XXX: do we want different INTERP_OPTIMIZER flags here?
67  endif  endif
68  else  else # not INTEL_CXX
69  MODULE_OPTIMIZE_FLAGS = -Os -fstrict-aliasing $(MOZ_OPTIMIZE_SIZE_TWEAK)  MODULE_OPTIMIZE_FLAGS = -Os -fstrict-aliasing $(MOZ_OPTIMIZE_SIZE_TWEAK)
70  # Special optimization flags for jsinterp.c  # Special optimization flags for jsinterp.c
71  INTERP_OPTIMIZER = -O3 -fstrict-aliasing  INTERP_OPTIMIZER = -O3 -fstrict-aliasing
72  endif  endif
73  else  else # not GNU_CXX
74  ifeq ($(OS_ARCH),SunOS)  ifeq ($(OS_ARCH),SunOS)
75  MODULE_OPTIMIZE_FLAGS = -xO4  MODULE_OPTIMIZE_FLAGS = -xO4
76  endif  endif
77  ifeq ($(OS_ARCH),WINNT)  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  MODULE_OPTIMIZE_FLAGS = -O2 -GL
83  endif  endif
84  endif  endif
85    endif
86    
87    
88  ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))  ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
89  LIBRARY_NAME    = js$(MOZ_BITS)$(VERSION_NUMBER)  LIBRARY_NAME    = js$(MOZ_BITS)$(VERSION_NUMBER)
90  RESFILE         = js$(MOZ_BITS)40.res  RESFILE         = js$(MOZ_BITS)40.res
91  endif  endif
92    
 PACKAGE_FILE = js.pkg  
   
93  # JavaScript must be built shared, even for static builds, as it is used by  # 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  # 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,  # the js code getting copied into xpinstall and jsd as well as mozilla-bin,
# Line 160  Line 173 
173                  jsdtracef.c                  jsdtracef.c
174  endif  endif
175    
176  EXPORTS         = \  INSTALLED_HEADERS = \
177                    js-config.h \
178                  jsautocfg.h \                  jsautocfg.h \
179                  jsautokw.h \                  jsautokw.h \
180                  js.msg \                  js.msg \
# Line 214  Line 228 
228  ifdef ENABLE_JIT  ifdef ENABLE_JIT
229  VPATH           += $(srcdir)/nanojit  VPATH           += $(srcdir)/nanojit
230    
231  EXPORTS += \  INSTALLED_HEADERS += \
232                    builtins.tbl    \
233                    jsbuiltins.h    \
234                  Assembler.h     \                  Assembler.h     \
235                  LIR.h           \                  LIR.h           \
236                  avmplus.h       \                  avmplus.h       \
                 vm_fops.h       \  
237                  Fragmento.h     \                  Fragmento.h     \
238                  Native.h        \                  Native.h        \
239                  Native$(NANOJIT_ARCH).h \                  Native$(NANOJIT_ARCH).h \
240                  RegAlloc.h      \                  RegAlloc.h      \
241                  nanojit.h       \                  nanojit.h       \
242                  builtins.tbl \                  TraceTreeDrawer.h \
243                  $(NULL)                  $(NULL)
244    
245  CPPSRCS += \  CPPSRCS += \
# Line 239  Line 254 
254                  $(NULL)                  $(NULL)
255    
256  ifdef DEBUG  ifdef DEBUG
 EXPORTS += TraceTreeDrawer.h  
257  CPPSRCS += TraceTreeDrawer.cpp  CPPSRCS += TraceTreeDrawer.cpp
258  endif  endif
259    
# Line 247  Line 261 
261  endif  endif
262    
263  ifdef HAVE_DTRACE  ifdef HAVE_DTRACE
264  EXPORTS         += \  INSTALLED_HEADERS += \
265                  jsdtracef.h \                  jsdtracef.h \
266                  javascript-trace.h \                  $(CURDIR)/javascript-trace.h \
267                  $(NULL)                  $(NULL)
268  endif  endif
269    
270  ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))  ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
271  EXPORTS         += jscpucfg.h  INSTALLED_HEADERS += jscpucfg.h
272  endif  endif
273    
274  JS_SAFE_ARENA   = 1  JS_SAFE_ARENA   = 1
# Line 323  Line 337 
337    
338  include $(topsrcdir)/config/rules.mk  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  # our build system doesn't handle subdir srcs very gracefully today
362  export::  export::
363          mkdir -p nanojit          mkdir -p nanojit
# Line 481  Line 516 
516    
517  jsopcode.h jsopcode.cpp: jsopcode.tbl  jsopcode.h jsopcode.cpp: jsopcode.tbl
518    
519    export:: jsautocfg.h
520    
521  ifeq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH)))  ifeq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH)))
522  jsautocfg.h:  jsautocfg.h:
523          touch $@          touch $@
# Line 541  Line 578 
578  endif  endif
579  endif  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  # Extra dependancies and rules for auto-generated headers
640  host_jskwgen.$(OBJ_SUFFIX): jsversion.h jskeyword.tbl  host_jskwgen.$(OBJ_SUFFIX): jsversion.h jskeyword.tbl
641    
642  jsautokw.h: host_jskwgen$(HOST_BIN_SUFFIX)  # 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) $@          ./host_jskwgen$(HOST_BIN_SUFFIX) $@
646    
647  host_jsoplengen.$(OBJ_SUFFIX): jsopcode.tbl  host_jsoplengen.$(OBJ_SUFFIX): jsopcode.tbl
648    
649  jsautooplen.h: host_jsoplengen$(HOST_BIN_SUFFIX)  # 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) $@          ./host_jsoplengen$(HOST_BIN_SUFFIX) $@
653    
654  # Force auto-header generation before compiling any source that may use them  # Force auto-header generation before compiling any source that may use them
655  $(CPPSRCS:%.cpp=%.$(OBJ_SUFFIX)): jsautokw.h jsautooplen.h  $(CPPSRCS:%.cpp=%.$(OBJ_SUFFIX)): $(CURDIR)/jsautokw.h $(CURDIR)/jsautooplen.h
656    
657  ifdef HAVE_DTRACE  ifdef HAVE_DTRACE
658  javascript-trace.h: $(srcdir)/javascript-trace.d  $(CURDIR)/javascript-trace.h: $(srcdir)/javascript-trace.d
659          dtrace -h -s $(srcdir)/javascript-trace.d -o javascript-trace.h.in          dtrace -h -s $(srcdir)/javascript-trace.d -o javascript-trace.h.in
660          sed 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \          sed 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
661              javascript-trace.h.in > javascript-trace.h              javascript-trace.h.in > javascript-trace.h
662    
663    $(CPPSRCS:%.cpp=%.$(OBJ_SUFFIX)): $(CURDIR)/javascript-trace.h
664  endif  endif

Legend:
Removed from v.332  
changed lines
  Added in v.399

  ViewVC Help
Powered by ViewVC 1.1.24