[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-bugs
Subject: [Bug 87669] adding new target breaks configure.in
From: Megan Webb <kdeveloper.megan () gmail ! com>
Date: 2006-11-02 9:57:42
Message-ID: 20061102095742.6342.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=87669
kdeveloper.megan gmail com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From kdeveloper.megan gmail com 2006-11-02 10:57 -------
SVN commit 601146 by webb:
BUG: 87669
Parse the AC_OUTPUT line and handle the backslash character as a line continuation.
M +48 -13 misc.cpp
--- branches/kdevelop/3.4/buildtools/autotools/misc.cpp #601145:601146
@ -31,8 +31,8 @
kdDebug( 9020 ) << "Can't find service " << name;
return 0;
}
-
-
+
+
KLibFactory *factory = KLibLoader::self()->factory(QFile::encodeName(service->library()));
if (!factory) {
QString errorMessage = KLibLoader::self()->lastErrorMessage();
@ -56,7 +56,7 @
KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj;
return dlg;
-
+
/*
QStringList args;
QVariant prop = service->property( "X-KDevelop-Args" );
@ -291,22 +291,43 @
QString ac_match("^AC_OUTPUT");
QRegExp ac_regex(ac_match);
-
+ bool multiLine=false;
+ QChar cont('\\');
+ QRegExp close("\\)");
while ( !stream.eof() ) {
- QString line = stream.readLine();
- if ( ac_regex.search(line) >= 0 ) {
+ QString line = stream.readLine().stripWhiteSpace();
+ if ( multiLine){
+ if (close.search(line) >= 0){
+ line = line.replace(close.search(line), 1, "");
+ list += QStringList::split(" ", line);
+ break;
+ }
+ else{
+ line.setLength(line.length()-1);
+ list += QStringList::split(" ", line);
+ }
+ }else if ( ac_regex.search(line) >= 0 ) {
QRegExp open("\\(");
- QRegExp close("\\)");
line = line.replace(ac_regex.search(line), ac_match.length() - 1, "");
- if (open.search(line) >= 0)
+ if (open.search(line) >= 0){
line = line.replace(open.search(line), 1, "");
+ }
- if (close.search(line) >= 0)
- line = line.replace(close.search(line), 1, "");
+ if ( line.endsWith(cont) ){
+ line.setLength(line.length()-1);
+ multiLine=true;
+ }else{
+ if (close.search(line) >= 0){
+ line = line.replace(close.search(line), 1, "");
+ }
+ }
list = QStringList::split(" ", line);
- break;
+
+ if (!multiLine){
+ break;
+ }
}
}
@ -340,19 +361,33 @
configurein.open ( IO_WriteOnly );
QTextStream outstream( &configurein);
+ QRegExp close("\\)");
+ bool multiLine=false;
QStringList::iterator it;
for ( it = origfilecontent.begin(); it != origfilecontent.end(); it++ ) {
QRegExp ac_regexp("^AC_OUTPUT");
QString currline = (QString) (*it);
if ( ac_regexp.search(currline) >= 0 ) {
+ QChar cont('\\');
+ if ( currline.endsWith(cont)){
+ multiLine=true;
+ }
QString acline("AC_OUTPUT(");
acline = acline.append(makefiles.join(" "));
acline = acline.append(")");
outstream << acline << "\n";
}
- else
- outstream << currline << "\n";
+ else{
+ if (multiLine){
+ if (close.search(currline) >= 0){
+ multiLine=false;
+ }
+ }
+ else{
+ outstream << currline << "\n";
+ }
+ }
}
configurein.close();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic