RESOLVED FIXED 16818
dftables should be rewritten as a script
https://bugs.webkit.org/show_bug.cgi?id=16818
Summary dftables should be rewritten as a script
David Kilzer (:ddkilzer)
Reported 2008-01-10 10:25:34 PST
* SUMMARY The dftables script should be rewritten as a script. This will solve issues such as Bug 14744. * NOTES <rdar://problem/5681463>
Attachments
dftables in Perl (7.87 KB, text/plain)
2008-01-10 14:41 PST, David Kilzer (:ddkilzer)
no flags
Patch v1 (40.16 KB, patch)
2008-01-10 15:01 PST, David Kilzer (:ddkilzer)
darin: review+
Patch v2 (47.41 KB, patch)
2008-01-10 15:30 PST, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2008-01-10 14:41:26 PST
Created attachment 18376 [details] dftables in Perl Here's the rewrite of the dftables script in everyone's favorite scripting language: Perl! Since the original C++ program was pulling values from the pcre_internal.h header file, the script creates a file that is pre-processed using cpp to generate Perl code, which is then eval-ed. The Perl will look very C-like because I mostly kept the same logic/structures as the original C code to make it easier to verify.
David Kilzer (:ddkilzer)
Comment 2 2008-01-10 14:41:41 PST
Will post a patch shortly.
David Kilzer (:ddkilzer)
Comment 3 2008-01-10 14:58:50 PST
Copying people familiar with other build systems that I haven't tested (Qt, GTK, WX, Windows).
David Kilzer (:ddkilzer)
Comment 4 2008-01-10 15:01:05 PST
Created attachment 18377 [details] Patch v1 Proposed patch. Please review changes for your build system (qmake, GNU autotools/make, Bakefiles, Visual C++). All build system changes were made "blind" except the Xcode change.
Adam Roben (:aroben)
Comment 5 2008-01-10 15:04:36 PST
Comment on attachment 18377 [details] Patch v1 You'll need to remove the dftables project from WebKit/win/WebKit.vcproj/WebKit.sln as well In the .sln files you not only need to remove the project itself but also remove its GUID from any dependency listings.
David Kilzer (:ddkilzer)
Comment 6 2008-01-10 15:05:01 PST
(In reply to comment #4) > Created an attachment (id=18377) [edit] > Patch v1 I should note that output from the Perl script is identical to the compiled C++ program when I built on Mac OS X 10.5.1 (9B18).
Darin Adler
Comment 7 2008-01-10 15:06:01 PST
Comment on attachment 18377 [details] Patch v1 + $(JavaScriptCore)/pcre Should have a backslash at the end of this line, or you could delete the "#" at the beginning of the next line which is supposed to be a sort of reminder that you're at the end of the script. Looks fine, r=me (Too bad I have saved patches with changes to the tool -- should be easy enough to port, though.)
David Kilzer (:ddkilzer)
Comment 8 2008-01-10 15:30:40 PST
Created attachment 18381 [details] Patch v2 Contains fixes for Darin's and Adam's issues.
Adam Roben (:aroben)
Comment 9 2008-01-10 15:34:54 PST
Comment on attachment 18381 [details] Patch v2 Looks good on the Windows side.
Alp Toker
Comment 10 2008-01-10 15:39:12 PST
Nice. -JavaScriptCore/pcre/chartables.c: $(top_builddir)/Programs/dftables$(EXEEXT) - ./Programs/dftables $@ +JavaScriptCore/pcre/chartables.c: + $(srcdir)/JavaScriptCore/pcre/dftables $@ This should probably be: JavaScriptCore/pcre/chartables.c: $(srcdir)/JavaScriptCore/pcre/dftables $^ $@
David Kilzer (:ddkilzer)
Comment 11 2008-01-10 16:20:05 PST
(In reply to comment #10) > -JavaScriptCore/pcre/chartables.c: $(top_builddir)/Programs/dftables$(EXEEXT) > - ./Programs/dftables $@ > +JavaScriptCore/pcre/chartables.c: > + $(srcdir)/JavaScriptCore/pcre/dftables $@ > > This should probably be: > > JavaScriptCore/pcre/chartables.c: $(srcdir)/JavaScriptCore/pcre/dftables > $^ $@ Fixed. Thanks!
David Kilzer (:ddkilzer)
Comment 12 2008-01-10 16:35:41 PST
Committed revision 29381.
David Kilzer (:ddkilzer)
Comment 13 2008-01-10 16:42:10 PST
(In reply to comment #12) > Committed revision 29381. It helps if dftables is executable, too. Committed revision 29382.
David Kilzer (:ddkilzer)
Comment 14 2008-01-10 16:52:05 PST
Looks like Qt Linux/Windows and Gtk builds failed. I must not have made the correct changes to the qmake files.
Note You need to log in before you can comment on or make changes to this bug.