Alexandru Ciobanu wrote:
> You are right. The patch does not do the right thing.
> I just observed that it also completely removes the
> preinstall rule for excluded directories.
> 
> So make install insde those dirs will fail because there
> is no preinstall.
> 
> Alexander Neundorf wrote:
>>
>> I guess the EXCLUDE_FROM_ALL targets will then also not be relinked if
>> they are installed, right ?
>>
>> Maybe for EXCLUDE_FROM_ALL targets the relinking should happen when
>> the target gets built, not when it's installed ?

Actually the patch may not have been as far off as you think.  It just
has to be applied to half of the contents inside the if statement.  The
full patch against 2.4.7 is attached.

I'll submit this for inclusion in the 2.4 branch.  It has been fixed in
the CVS version.

-Brad
Index: Source/cmGlobalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.cxx,v
retrieving revision 1.56.2.9
diff -c -3 -p -r1.56.2.9 cmGlobalUnixMakefileGenerator3.cxx
*** Source/cmGlobalUnixMakefileGenerator3.cxx	13 Oct 2006 14:52:02 -0000	1.56.2.9
--- Source/cmGlobalUnixMakefileGenerator3.cxx	3 Aug 2007 19:49:29 -0000
*************** cmGlobalUnixMakefileGenerator3
*** 861,871 ****
            lg->WriteMakeRule(ruleFileStream, 
                              "Pre-install relink rule for target.",
                            localName.c_str(), depends, commands, true);
!         depends.clear();
!         depends.push_back(localName);
!         commands.clear();
!         lg->WriteMakeRule(ruleFileStream, "Prepare target for install.",
!                           "preinstall", depends, commands, true);
          }
  
        // add the clean rule
--- 861,875 ----
            lg->WriteMakeRule(ruleFileStream, 
                              "Pre-install relink rule for target.",
                            localName.c_str(), depends, commands, true);
! 
!         if (!exclude && t->second.IsInAll())
!           {
!           depends.clear();
!           depends.push_back(localName);
!           commands.clear();
!           lg->WriteMakeRule(ruleFileStream, "Prepare target for install.",
!                             "preinstall", depends, commands, true);
!           }
          }
  
        // add the clean rule
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to