Bug 16669 - autotools update and fixes
Summary: autotools update and fixes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2007-12-29 11:03 PST by Jan Alonzo
Modified: 2008-01-01 22:29 PST (History)
1 user (show)

See Also:


Attachments
various autotools update and fixes patch (21.98 KB, patch)
2007-12-29 11:04 PST, Jan Alonzo
darin: review-
Details | Formatted Diff | Diff
Fix database inclusion and few fixes to the patch (33.75 KB, patch)
2007-12-29 18:36 PST, Jan Alonzo
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Alonzo 2007-12-29 11:03:33 PST
Updated autotools to match ToT, allow disabling of database and icon database in the Gtk port, and merge patches and various autotools fixes.
Comment 1 Jan Alonzo 2007-12-29 11:04:18 PST
Created attachment 18171 [details]
various autotools update and fixes patch
Comment 2 Darin Adler 2007-12-29 14:22:36 PST
Comment on attachment 18171 [details]
various autotools update and fixes patch

Although it's not new to this patch, I think it's a seriously bad idea that GNUMakeFile.am has a copy of the contents of DerivedSources.make -- the whole idea of DerivedSources.make is to have a shared makefile for these more complicated rules. Surely we can find a way to incorporate those rules without copying and pasting the entire file.

+#if ENABLE(DATABASE)
+#include "Database.h"
+#endif

This change is wrong. The file "Database.h" already has an #if ENABLE(DATABASE) around its contents. We don't want to ifdef it in both places.

+#if ENABLE(DATABASE)
+#include "DatabaseTracker.h"
+#endif

We need to be consistent. The ENABLE #if statements are inside Database.h and should go inside DatabaseTracker.h too. Or we could go the other way and change how we handle optional things like database.

ENABLE_XBL should not be in the makefile. XBL was an experiment done more than two years ago. It doesn't make sense to have it commented-out code in there with a FIXME.

Everything else looks fine.

review- because of the database include files issue.
Comment 3 Jan Alonzo 2007-12-29 18:36:03 PST
Created attachment 18172 [details]
Fix database inclusion and few fixes to the patch

Hi Darin

> +#if ENABLE(DATABASE)
> +#include "Database.h"
> +#endif
>
> This change is wrong. The file "Database.h" already has an #if 
> ENABLE(DATABASE) around its contents. We don't want to ifdef it in both 
> places.

Removed the ifdef in Database.h. See explanation below.

> +#if ENABLE(DATABASE)
> +#include "DatabaseTracker.h"
> +#endif
>
> We need to be consistent. The ENABLE #if statements are inside Database.h and
> should go inside DatabaseTracker.h too. Or we could go the other way and 
> change how we handle optional things like database.

I went the other way around to make Database consistent with the other features, since Database ifdefs are already there, it's just a matter of adding a guard before including Database.h, which pretty much what the other features are doing (e.g. include xpath headers only if xpath is enabled). 

> ENABLE_XBL should not be in the makefile. XBL was an experiment done more than
> two years ago. It doesn't make sense to have it commented-out code in there
> with a FIXME.

Removed XBL from the makefile/configure scripts.

Also, ideally we should be using DerivedSources.make but i had some issues with the existing makefile (e.g., vpath mangling, some make constructs do not work well with automake) as well as the risk of making untested changes that affects the other platforms (i dont have a mac for example). But anyway, patches are always welcome if somebody wants to work on it.

Thanks for the review!
Comment 4 Alp Toker 2007-12-29 19:28:04 PST
Comment on attachment 18172 [details]
Fix database inclusion and few fixes to the patch

r=me

The database header include change justification makes sense to me. We should keep an eye on the build bots to make sure this doesn't cause any issues in other ports after landing though.
Comment 5 Alp Toker 2007-12-29 19:34:16 PST
Landed in r29033.
Comment 6 Darin Adler 2007-12-31 13:52:11 PST
(In reply to comment #3)
> I went the other way around to make Database consistent with the other
> features, since Database ifdefs are already there, it's just a matter of adding
> a guard before including Database.h, which pretty much what the other features
> are doing (e.g. include xpath headers only if xpath is enabled). 

You say this is consistent with "the other features" but:

    1) The XPath header files like XPathEvaluator.h all have guards in the header files.
    2) The SVG header files like SVGUseElement.h all have guards in the header files.
    3) The XSLT header files like XSTLProcessor.h all have guards in the header files.

While I'm sure that there are some extra #if statements that aren't needed around some includes, I thinkt he pattern is that we put the guards in the header files, not at the include sites.

I'd appreciate following one consistent approach. I think the current one is the "in the header file" approach and should be changed to be consistently that.

> Also, ideally we should be using DerivedSources.make but i had some issues with
> the existing makefile (e.g., vpath mangling, some make constructs do not work
> well with automake)

We need to do that work if possible. Putting the VPATH into a different file would be fine.
Comment 7 Darin Adler 2007-12-31 13:53:47 PST
Looks like this was landed with the changes to make ENABLE(DATABASE) inconsistent with the other ENABLE use in headers. I'd prefer these things be consistent. See my comment above.
Comment 8 Jan Alonzo 2007-12-31 14:47:30 PST
(In reply to comment #6)

Hi Darin. Thanks for the reply.

> While I'm sure that there are some extra #if statements that aren't needed
> around some includes, I thinkt he pattern is that we put the guards in the
> header files, not at the include sites.

This is what confused me. dom/Document.cpp is a good example of this.

> I'd appreciate following one consistent approach. I think the current one is
> the "in the header file" approach and should be changed to be consistently
> that.

May I ask, what are the reasons why guards are put in the header files instead of in the include sites?

> We need to do that work if possible. Putting the VPATH into a different file
> would be fine.

Ok. There's already a bit of discussion on this but no definite plan yet on when it will happen. 

Thanks again.

Reopening the bug for patch submission as per outcome of this discussion. 
Comment 9 Darin Adler 2008-01-01 22:29:05 PST
(In reply to comment #8)
> May I ask, what are the reasons why guards are put in the header files instead
> of in the include sites?

The main reason is that there are more include sites than header files. We discussed some other reasons on the webkit-dev mailing list.

My main concern is consistency. This patch made DATABASE inconsistent with the others, and I don't like that.

> > We need to do that work if possible. Putting the VPATH into a different file
> > would be fine.
> 
> Ok. There's already a bit of discussion on this but no definite plan yet on
> when it will happen. 
> 
> Thanks again.
> 
> Reopening the bug for patch submission as per outcome of this discussion. 

It doesn't seem right to reopen this bug for the task of sharing DerivedSources.make. That task should be tracked with another bug.