mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 14:56:07 +00:00
Bug 61314 Makefile rules for "jsmath.o" and "jsmathtemp.o" cause stale object files, obscure bugs
patch by mang@subcarrier.org r=rogerl sr=brendan a=asa
This commit is contained in:
parent
d2bc38bc28
commit
0a6eb6a388
@ -20,6 +20,7 @@
|
||||
#
|
||||
# Contributor(s):
|
||||
# Michael Ang <mang@subcarrier.org>
|
||||
# Kevin Buhr <buhr@stat.wisc.edu>
|
||||
#
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
@ -36,6 +37,10 @@
|
||||
#
|
||||
# JSRef GNUmake makefile.
|
||||
#
|
||||
# Note: dependency rules are missing for some files (some
|
||||
# .h, all .msg, etc.) Re-make clean if in doubt.
|
||||
#
|
||||
|
||||
|
||||
DEPTH = .
|
||||
|
||||
@ -316,7 +321,13 @@ endif
|
||||
|
||||
# special rule for jsmath.o since we want to incrementally link
|
||||
# against fdlibm to pull in only what is needed
|
||||
$(OBJDIR)/jsmath.o: $(FDLIBM_LIBRARY) $(JSMATH_PRELINK)
|
||||
$(OBJDIR)/jsmath.o: jsmath.c jsmath.h jslibmath.h $(FDLIBM_LIBRARY)
|
||||
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
||||
$(CC) -Fo$(JSMATH_PRELINK) -c $(CFLAGS) $<
|
||||
else
|
||||
$(CC) -o $(JSMATH_PRELINK) -c $(CFLAGS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),QNX)
|
||||
ifneq ($(OS_TARGET),NTO)
|
||||
@cp $(JSMATH_PRELINK) $@
|
||||
@ -331,13 +342,6 @@ endif
|
||||
$(LD) $(DASH_R) -o $@ $(JSMATH_PRELINK) $(FDLIBM_LIBRARY)
|
||||
endif
|
||||
|
||||
$(JSMATH_PRELINK): jsmath.c
|
||||
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
||||
$(CC) -Fo$@ -c $(CFLAGS) $<
|
||||
else
|
||||
$(CC) -o $@ -c $(CFLAGS) $<
|
||||
endif
|
||||
|
||||
# Note: generated headers must be built before descending
|
||||
# into fdlibm directory
|
||||
$(FDLIBM_LIBRARY) :
|
||||
|
@ -19,6 +19,7 @@
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Michael Ang <mang@subcarrier.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU Public License (the "GPL"), in which case the
|
||||
@ -32,6 +33,10 @@
|
||||
# file under either the NPL or the GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# JSRef GNUmake makefile rules
|
||||
#
|
||||
|
||||
ifdef USE_MSVC
|
||||
LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CFILES:.c=.obj))
|
||||
PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CFILES:.c=.obj))
|
||||
@ -62,6 +67,12 @@ $(OBJDIR)/%: %.c
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ $(CFLAGS) $*.c $(LDFLAGS)
|
||||
|
||||
# This rule must come before the rule with no dep on header
|
||||
$(OBJDIR)/%.o: %.c %.h
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ -c $(CFLAGS) $*.c
|
||||
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ -c $(CFLAGS) $*.c
|
||||
@ -70,7 +81,11 @@ $(OBJDIR)/%.o: %.s
|
||||
@$(MAKE_OBJDIR)
|
||||
$(AS) -o $@ $(ASFLAGS) $*.s
|
||||
|
||||
# windows only
|
||||
# This rule must come before rule with no dep on header
|
||||
$(OBJDIR)/%.obj: %.c %.h
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.c
|
||||
|
||||
$(OBJDIR)/%.obj: %.c
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.c
|
||||
|
Loading…
x
Reference in New Issue
Block a user