summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-16 20:19:00 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-16 20:19:00 (GMT)
commit537e2b4ed57d5a84f140f9b9bde427e7b604b330 (patch)
tree8f7869ce7e441cdb2b45d46a235d74ca97cde6f9 /Source/cmGlobalUnixMakefileGenerator3.cxx
parent13661cdd23790dd6d8c118ba7b95b278966e7dae (diff)
downloadCMake-537e2b4ed57d5a84f140f9b9bde427e7b604b330.zip
CMake-537e2b4ed57d5a84f140f9b9bde427e7b604b330.tar.gz
CMake-537e2b4ed57d5a84f140f9b9bde427e7b604b330.tar.bz2
ENH: Implemented RPATH specification support. It is documented by the command SET_TARGET_PROPERTIES.
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 1acea61..70c0ed4 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -152,6 +152,11 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
"The main recursive all target", "all",
depends, no_commands, true);
+ // Write an empty preinstall:
+ lg->WriteMakeRule(makefileStream,
+ "The main recursive preinstall target", "preinstall",
+ depends, no_commands, true);
+
lg->WriteMakeVariables(makefileStream);
// Write out the "special" stuff
@@ -731,6 +736,25 @@ cmGlobalUnixMakefileGenerator3
lg->WriteMakeRule(ruleFileStream, "Convenience name for target.",
t->second.GetName(), depends, commands, true);
+ // Add rules to prepare the target for installation.
+ if(t->second.NeedRelinkBeforeInstall())
+ {
+ localName = lg->GetRelativeTargetDirectory(t->second);
+ localName += "/preinstall";
+ depends.clear();
+ commands.clear();
+ commands.push_back(lg->GetRecursiveMakeCall
+ (makefileName.c_str(), localName.c_str()));
+ this->AppendGlobalTargetDepends(depends,t->second);
+ lg->WriteMakeRule(ruleFileStream, "Pre-intsall 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
localName = lg->GetRelativeTargetDirectory(t->second);
makeTargetName = localName;