[Kde-bindings] cleaning up smoke
Caleb Tennis
caleb at aei-tech.com
Sun Mar 4 15:59:07 UTC 2007
Here's my proposed change to generate.pl.cmake:
This goes along with removing all prefix directories (QtCore, QtGui,
etc) from the header_list fie.
===================================================================
--- generate.pl.cmake (revision 639155)
+++ generate.pl.cmake (working copy)
@@ -155,23 +155,23 @@
# List Qt headers, and exclude the ones listed above
my @headers = ();
-$qtinc= '@QT_INCLUDE_DIR@';
+ at qtinc= ('@QT_QTCORE_INCLUDE_DIR@', '@QT_QTGUI_INCLUDE_DIR@',
'@QT_QTNETWORK_INCLUDE_DIR@','@QT_QT3SUPPORT_INCLUDE_DIR@','@QT_QTSQL_IN
CLUDE_DIR@','@QT_QTUITOOLS_INCLUDE_DIR@','@QT_QTXML_INCLUDE_DIR@');
find(
{ wanted => sub {
(-e || -l and !-d) and do {
- $f = substr($_, 1 + length $qtinc);
+ $f = $_;
if( !defined $excludes{$f} # Not excluded
&& $includes{$f} # Known header
&& /\.h$/) # Not a backup file etc. Only
headers.
{
- my $header = $_;
- open(FILE, $_);
+ my $header = $File::Find::name;
+ open(FILE, $header);
my @header_lines = <FILE>;
if (@header_lines == 1) {
$line = $header_lines[0];
if ($line =~ /^#include "(.*)"/) {
- push ( @headers, $qtinc . substr($1, 2) );
+ push ( @headers, $File::Find::dir .
substr($1, 2) );
} else {
push ( @headers, $header );
}
@@ -184,8 +184,8 @@
},
follow_fast => 1,
follow_skip => 2,
- no_chdir => 1
- }, $qtinc
+ no_chdir => 0
+ }, @qtinc
);
$qwtinc = '@QWT_INCLUDE_DIR@';
More information about the Kde-bindings
mailing list