Closed
Bug 140171
Opened 23 years ago
Closed 23 years ago
non-md dependencies are broken when ACDEFINES change
Categories
(SeaMonkey :: Build Config, defect, P2)
SeaMonkey
Build Config
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.1alpha
People
(Reporter: netscape, Assigned: netscape)
Details
Attachments
(2 files)
4.78 KB,
patch
|
Details | Diff | Splinter Review | |
915 bytes,
patch
|
bryner
:
review+
|
Details | Diff | Splinter Review |
So I've been running with --disable-md for a bit trying to track down potential
dependency problems and I ran across this one. We're not tracking
configure-level define changes in non-md builds.
In a -md build, we generate config-defs.h and use gcc's -include flag to include
that file whenever we compile a file. That include is tracked by gcc's -MD
dependency generator and is listed in the various .deps/*.pp files. Anytime
that config-defs.h gets changed, we basically have a tree rebuild.
In a non-md build, we just put the defines in autoconf.mk. We don't have any
extra dependencies upon autoconf.mk as we didn't want to trigger a tree rebuild
everytime someone just added a configure option (which may or may not add
defines).
I see two acceptible ways to fix this:
1) Always create config-defs.h (possibly rename it) and have that file be
included by every source file in the main Mozilla tree. It only requires
touching ~5800 or so files. :-P
2) Generate a separate config/defs.mk and have every compile rule depend upon it.
I much prefer (1) as it allows us to use the same dependency "path" for both -md
& non-md builds. It should also workaround the longstanding Forte problem in
bug 80812. It does have the unfortunate side-effect of requiring developers to
add a #ifdef HAVE_CONFIG_DEFS_H/#include/#endif to every new file that they add.
Hmm, thinking about this a bit longer; it may be just enough to have
config-defs.h always be generated and add the compile rule dependencies but
still use the defines from autoconf.mk. It still leaves us in our hacky
md/non-md split state but should fix this particular dependency problem.
Assignee | ||
Comment 1•23 years ago
|
||
This patch:
* always generates config-defs.h with an updated message about config-defs.h
being used for dependency purposes.
* adds explicit dependencies to $(DEPTH)/config-defs.h for $(OBJS)
Assignee | ||
Comment 2•23 years ago
|
||
> In a non-md build, we just put the defines in autoconf.mk.
A slight correction is needed here. If we're using gcc, we *still* use the
-include flag which is partially (maybe wholly) why mkdepend misses the flags
set in define. If we don't use the -include flag, the defines should be all on
the commandline and mkdepend should catch them accordingly. So an alternative
fix may be just to stop using -include if --disable-md is specified.
Assignee | ||
Comment 3•23 years ago
|
||
Comment 4•23 years ago
|
||
Comment on attachment 83313 [details] [diff] [review]
do not use -include if --disable-md is set
r=bryner
Attachment #83313 -
Flags: review+
Assignee | ||
Comment 5•23 years ago
|
||
.
No longer blocks: 138348
Status: NEW → RESOLVED
Closed: 23 years ago
Keywords: mozilla1.0
Resolution: --- → FIXED
Whiteboard: [fixed on trunk]
Target Milestone: mozilla1.0.1 → mozilla1.1alpha
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•