Closed Bug 388955 Opened 17 years ago Closed 17 years ago

js/src/Makefile.ref dependencies are broken on Mac, Linux

Categories

(Firefox Build System :: General, defect)

Other Branch
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

Attachments

(2 files)

They're broken on other platforms too, but these are the ones I know how to fix.

Note:  Patch is against actionmonkey branch, should work against mozilla-central; but some tweaks will be required if you want it in CVS.  In particular the "%.cpp=" bit would be "%.c=" there.
Attachment #273122 - Flags: review?(mrbkap)
Comment on attachment 273122 [details] [diff] [review]
use gcc -MMD to generate make dependencies

>--- a/js/src/Makefile.ref	Fri Jul 20 10:25:27 2007 -0400
>+DEPENDENCIES    = $(CPPFILES:%.cpp=$(OBJDIR)/%.d)

CPPFILES doesn't exist. I think you want JS_CPPFILES. Once I make that change (with s/CPP/C/) this works beautifully. Thanks a bundle!
Attachment #273122 - Flags: review?(mrbkap) → review-
We should also file a bug on generating the .d files only when needed (and not every time, as this patch does) unless you want to tackle that here.
mrbkap: What did you have in mind in comment 2?

Not all the .d files are regenerated every time you build.  They're only generated for source files that are actually compiled (it happens as a side effect of compilation).  This is a fairly close approximation of "only when needed", close enough for me anyway.
Status: NEW → ASSIGNED
Comment on attachment 273122 [details] [diff] [review]
use gcc -MMD to generate make dependencies

I think this is OK, because:

Makefile.ref:288:include rules.mk

rules.mk:54:CPPFILES = $(LIB_CPPFILES) $(PROG_CPPFILES)

I tried it out and it seems to work; also "make clobber" deletes the .d files, so I think DEPENDENCIES is getting set properly.
Attachment #273122 - Flags: review- → review?(mrbkap)
Comment on attachment 273122 [details] [diff] [review]
use gcc -MMD to generate make dependencies

Huh, I wonder what I was seeing before.
Attachment #273122 - Flags: review?(mrbkap) → review+
Pushed to actionmonkey.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attached patch For CVSSplinter Review
This patch makes CVS happy. I don't know why I didn't do this before.
Attachment #306813 - Flags: review?(brendan)
Comment on attachment 306813 [details] [diff] [review]
For CVS

NPOTB ;-) -- great to have after all these years of living in the early 80s.

/be
Attachment #306813 - Flags: review?(brendan)
Attachment #306813 - Flags: review+
Attachment #306813 - Flags: approval1.9+
I checked the CVS patch into ... well ... CVS.
Status: RESOLVED → VERIFIED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: