Summary: | automake manager: "data in noinst" only displayed when other target is available also | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Daniel Franke <franke.daniel> |
Component: | Build tools: Automake | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.0.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Daniel Franke
2004-02-09 17:32:44 UTC
This is ugly behaviour, indeed. Still valid in kdevelop-3.1.91, KDE-3.3.91, CVS 050113 SVN commit 597620 by mattr: Commit patch from Megan Webb to fix bug 74724. Add data to the noinst target correctly when there are no other targets Thanks for the patch! CCMAIL: mwebb@unwired.com.au BUG: 74724 M +8 -23 addtargetdlg.cpp M +1 -4 autoprojectwidget.cpp --- branches/kdevelop/3.4/buildtools/autotools/addtargetdlg.cpp #597619:597620 @@ -141,23 +141,6 @@ default: ; } - if (primary == "DATA"){ - // DATA does not need a name; DATA may already exist. - TargetItem *titem = m_widget->createTargetItem(name, prefix, primary, true); - QPtrListIterator<TargetItem> it( m_subproject->targets ); - for( ; it.current(); ++it ){ - if( (*it)->text(0) == titem->text(0) ){ - /// \FIXME Add message box here, after string-freeze is over - /// something like: "This data target already exists." - QDialog::accept(); - return; - } - } - m_subproject->targets.append( titem ); - QDialog::accept(); - return; - } - if (name.isEmpty()) { KMessageBox::sorry(this, i18n("You have to give the target a name")); return; @@ -219,12 +202,14 @@ QMap<QString,QString> replaceMap; - if( primary == "PROGRAMS" || primary == "LIBRARIES" || primary == "LTLIBRARIES" ){ - QString varname = prefix + "_" + primary; - m_subproject->variables[varname] += (" " + name); - replaceMap.insert(varname, m_subproject->variables[varname]); - replaceMap.insert(canonname + "_SOURCES", ""); - } + if( primary == "PROGRAMS" || primary == "LIBRARIES" || primary == "LTLIBRARIES" || primary == "DATA" ){ + QString varname = prefix + "_" + primary; + m_subproject->variables[varname] += (" " + name); + replaceMap.insert(varname, m_subproject->variables[varname]); + if ( primary != "DATA" ){ + replaceMap.insert(canonname + "_SOURCES", ""); + } + } if (primary == "LTLIBRARIES" || primary == "PROGRAMS") replaceMap.insert(canonname + "_LDFLAGS", ldflags); --- branches/kdevelop/3.4/buildtools/autotools/autoprojectwidget.cpp #597619:597620 @@ -585,18 +585,15 @@ const QString &prefix, const QString &primary, bool take ) { - bool group = !( primary == "PROGRAMS" || primary == "LIBRARIES" - || primary == "LTLIBRARIES" || primary == "JAVA" ); bool docgroup = ( primary == "KDEDOCS" ); bool icongroup = ( primary == "KDEICON" ); + bool group = !(docgroup || icongroup); QString text; if ( docgroup ) text = i18n( "Documentation data" ); else if ( icongroup ) text = i18n( "KDE Icon data" ).arg( prefix ); - else if ( group ) - text = i18n( "%1 in %2" ).arg( nicePrimary( primary ) ).arg( prefix ); else text = i18n( "%1 (%2 in %3)" ).arg( name ).arg( nicePrimary( primary ) ).arg( prefix ); |