Version: 3.0.1 (using KDE KDE 3.2.0) Installed from: Gentoo Packages OS: Linux I deleted a target of my "test" subproject in the automake manager to add it again with a different type (changed "Program in bin" to "Program in noinst"). Then I added the one existing file that was in the old target to the new one and tried to compile. The compiler gave an error about main() being defined twice. The cause was this line in Makefile.am: test_otocs_SOURCES = test-otocs.cpp test-otocs.cpp The rest of Makefile.am looked OK. I also added two other (new) targets in the same subproject after re-creating the first one if that matters.
I think the solution is to rerun configure after removing a target. Then add as many targests as you want. Reconfigure and that's it
No, configuring didn't remove the second entry. I also tried distclean, which resulted in doing "autoconf & friends" and configure. It didn't remove the second entry. Aren't Makefile.am-s the files one writes oneself if not using and IDE? In KDevelop 2 there was a selection to update all Makefile.am-s but I can't find it in KDevelop 3 (which is good since it should be fully automatic IMO).
SVN commit 598371 by mattr: Patch from Megan Webb to fix bug 76263: Correctly remove files from the interal data storage of the automake manager when removing targets. BUG: 76263 CCMAIL: mwebb@unwired.com.au M +3 -0 removetargetdlg.cpp --- branches/kdevelop/3.4/buildtools/autotools/removetargetdlg.cpp #598370:598371 @@ -203,6 +203,9 @@ // they are ignored removeMap.insert ( canonname + "_SOURCES", "" ); + // remove from our internal list + m_spitem->variables.erase(canonname+"_SOURCES"); + if ( m_titem->primary == "PROGRAMS" || m_titem->primary == "LTLIBRARIES" ) { removeMap.insert ( canonname + "_LDFLAGS", "" );