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

Diff of /trunk/js/Makefile.ref

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 78  Line 78 
78  DEFINES += -DNARCISSUS  DEFINES += -DNARCISSUS
79  endif  endif
80    
81  # Look in OBJDIR to find jsautocfg.h and jsautokw.h  # Look in OBJDIR to find jsautocfg.h, jsautokw.h, and js-config.h
82  INCLUDES   += -I. -I$(OBJDIR)  INCLUDES   += -I. -I$(OBJDIR)
83    
84  ifdef JS_THREADSAFE  ifdef JS_THREADSAFE
# Line 99  Line 99 
99  DEFINES += -DJS_HAS_FILE_OBJECT  DEFINES += -DJS_HAS_FILE_OBJECT
100  endif  endif
101    
102    ifdef JS_GC_ZEAL
103    DEFINES += -DJS_GC_ZEAL
104    endif
105    
106  #  #
107  # XCFLAGS may be set in the environment or on the gmake command line  # XCFLAGS may be set in the environment or on the gmake command line
108  #  #
109  #CFLAGS += -DDEBUG -DDEBUG_brendan -DJS_ARENAMETER -DJS_HASHMETER -DJS_DUMP_PROPTREE_STATS -DJS_DUMP_SCOPE_METERS -DJS_SCOPE_DEPTH_METER -DJS_BASIC_STATS  #CFLAGS += -DDEBUG -DDEBUG_brendan -DJS_ARENAMETER -DJS_HASHMETER -DJS_DUMP_PROPTREE_STATS -DJS_DUMP_SCOPE_METERS -DJS_SCOPE_DEPTH_METER -DJS_BASIC_STATS
110  CFLAGS          += $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS)  CFLAGS          += $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS)
 INTERP_CFLAGS   += $(INTERP_OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) $(INTERP_XCFLAGS)  
 BUILTINS_CFLAGS += $(BUILTINS_OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) $(BUILTINS_XCFLAGS)  
111    
112  LDFLAGS         = $(XLDFLAGS)  LDFLAGS         = $(XLDFLAGS)
113  LDFLAGS += $(OS_LDFLAGS)  LDFLAGS += $(OS_LDFLAGS)
# Line 259  Line 260 
260  ifndef PREBUILT_CPUCFG  ifndef PREBUILT_CPUCFG
261  OTHER_HFILES += $(OBJDIR)/jsautocfg.h  OTHER_HFILES += $(OBJDIR)/jsautocfg.h
262  endif  endif
263  OTHER_HFILES += $(OBJDIR)/jsautokw.h  OTHER_HFILES += $(OBJDIR)/jsautokw.h $(OBJDIR)/js-config.h
264    
265  HFILES = $(JS_HFILES) $(API_HFILES) $(OTHER_HFILES)  HFILES = $(JS_HFILES) $(API_HFILES) $(OTHER_HFILES)
266    
# Line 361  Line 362 
362  # Automatic header generation  # Automatic header generation
363  #  #
364    
365  AUTO_HEADERS = $(OBJDIR)/jsautokw.h $(OBJDIR)/jsautooplen.h  AUTO_HEADERS =                                  \
366            $(OBJDIR)/jsautokw.h                    \
367            $(OBJDIR)/jsautooplen.h                 \
368            $(NULL)
369    
370  $(OBJDIR)/jsautokw.h: jskeyword.tbl  $(OBJDIR)/jsautokw.h: jskeyword.tbl
371    
# Line 376  Line 380 
380    
381  $(AUTO_HEADERS): $(OBJDIR)/jsauto%.h: js%gen.cpp  $(AUTO_HEADERS): $(OBJDIR)/jsauto%.h: js%gen.cpp
382          @$(MAKE_OBJDIR)          @$(MAKE_OBJDIR)
383          $(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $<          $(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(OPTIMIZER) $<
384          link.exe -out:"$(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX)" $(EXE_LINK_FLAGS) $(OBJDIR)/js$*gen.obj          link.exe -out:"$(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX)" $(EXE_LINK_FLAGS) $(OBJDIR)/js$*gen.obj
385          $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $@          $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $@
386  else  else
# Line 384  Line 388 
388  GARBAGE += $(AUTO_HEADERS:$(OBJDIR)/jsauto%.h=$(OBJDIR)/js%gen.d)  GARBAGE += $(AUTO_HEADERS:$(OBJDIR)/jsauto%.h=$(OBJDIR)/js%gen.d)
389  $(AUTO_HEADERS): $(OBJDIR)/jsauto%.h: js%gen.cpp  $(AUTO_HEADERS): $(OBJDIR)/jsauto%.h: js%gen.cpp
390          @$(MAKE_OBJDIR)          @$(MAKE_OBJDIR)
391          $(CXX) -o $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $(CFLAGS) $(LDFLAGS) $<          $(CXX) -o $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $(CFLAGS) $(OPTIMIZER) $(LDFLAGS) $<
392          $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $@          $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $@
393    
394  endif  endif
# Line 393  Line 397 
397  $(LIB_OBJS) : $(AUTO_HEADERS)  $(LIB_OBJS) : $(AUTO_HEADERS)
398    
399  #  #
400    # An installed header file describing configuration options that affect
401    # the API.
402    #
403    
404    # Avoid rebuilding unless js-config.h's contents actually change.  The
405    # timestamp on js-config.h.stamp corresponds to the last time we
406    # checked that js-config.h was up to date.  If the stamp changes but
407    # js-config.h does not, then make concludes that targets depending on
408    # js-config.h don't need to be rebuilt.  The dummy '@true' rule here
409    # keeps make from concluding that js-config.h never changes.
410    $(OBJDIR)/js-config.h: $(OBJDIR)/js-config.h.stamp
411            @true
412    
413    js-config-switch=$(if $(value $($1)),-e 's/\#undef $1/\#define $1/')
414    $(OBJDIR)/js-config.h.stamp: js-config.h.in Makefile.ref
415            sed < $< > $(@:.stamp=.tmp)                     \
416                $(call js-config-switch,JS_THREADSAFE)      \
417                $(call js-config-switch,JS_GC_ZEAL)         \
418                -e :dummy
419            if ! [ -f $(@:.stamp=) ] || ! cmp $(@:.stamp=.tmp) $(@:.stamp=); then \
420                mv $(@:.stamp=.tmp) $(@:.stamp=);                                 \
421            fi
422            touch $@
423    
424    GARBAGE += $(OBJDIR)/js-config.h $(OBJDIR)/js-config.h.stamp
425    
426    # Force creation of js-config.h before compiling any source that may use it.
427    $(LIB_OBJS) : $(OBJDIR)/js-config.h
428    
429    #
430  # JS shell executable  # JS shell executable
431  #  #
432    

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

  ViewVC Help
Powered by ViewVC 1.1.24