[cmake-commits] king committed cmGlobalUnixMakefileGenerator3.cxx
1.96 1.97 cmLocalUnixMakefileGenerator3.cxx 1.171 1.172
cmMakefileTargetGenerator.cxx 1.41 1.42
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Sep 8 10:42:19 EDT 2006
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv23307
Modified Files:
cmGlobalUnixMakefileGenerator3.cxx
cmLocalUnixMakefileGenerator3.cxx
cmMakefileTargetGenerator.cxx
Log Message:
BUG: Fixed ordering of code generated in Makefile and build.make files to make sure .SUFFIXES rule comes as early as possible. Also cleaned up documentation in generated files.
Index: cmGlobalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.cxx,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- cmGlobalUnixMakefileGenerator3.cxx 29 Aug 2006 16:55:11 -0000 1.96
+++ cmGlobalUnixMakefileGenerator3.cxx 8 Sep 2006 14:42:13 -0000 1.97
@@ -215,8 +215,6 @@
"The main recursive preinstall target", "preinstall",
depends, no_commands, true);
- lg->WriteMakeVariables(makefileStream);
-
// Write out the "special" stuff
lg->WriteSpecialTargetsTop(makefileStream);
Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -d -r1.171 -r1.172
--- cmLocalUnixMakefileGenerator3.cxx 2 Sep 2006 14:51:54 -0000 1.171
+++ cmLocalUnixMakefileGenerator3.cxx 8 Sep 2006 14:42:14 -0000 1.172
@@ -256,12 +256,6 @@
ruleFileStream.SetCopyIfDifferent(true);
}
- // Include the progress variables for the target.
- ruleFileStream
- << "# Include the progress variables for this target.\n"
- << this->IncludeDirective << " "
- << "progress.make\n\n";
-
// write the all rules
this->WriteLocalAllRules(ruleFileStream);
@@ -701,15 +695,28 @@
<< "# Special targets provided by cmake.\n"
<< "\n";
+ std::vector<std::string> no_commands;
+ std::vector<std::string> no_depends;
+
+ // Special target to cleanup operation of make tool.
+ // This should be the first target except for the default_target in
+ // the interface Makefile.
+ this->WriteMakeRule(
+ makefileStream, "Disable implicit rules so canoncical targets will work.",
+ ".SUFFIXES", no_depends, no_commands, false);
+
+ // Add a fake suffix to keep HP happy. Must be max 32 chars for SGI make.
+ std::vector<std::string> depends;
+ depends.push_back(".hpux_make_needs_suffix_list");
+ this->WriteMakeRule(makefileStream, 0,
+ ".SUFFIXES", depends, no_commands, false);
+
// Write special target to silence make output. This must be after
// the default target in case VERBOSE is set (which changes the
// name). The setting of CMAKE_VERBOSE_MAKEFILE to ON will cause a
// "VERBOSE=1" to be added as a make variable which will change the
// name of this special target. This gives a make-time choice to
// the user.
- std::vector<std::string> commands;
- std::vector<std::string> no_depends;
- commands.clear();
if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
|| (this->ForceVerboseMakefiles))
{
@@ -728,28 +735,11 @@
"Suppress display of executed commands.",
"$(VERBOSE).SILENT",
no_depends,
- commands, false);
+ no_commands, false);
}
- // Special symbolic target that never exists to force dependers to
- // run their rules.
- std::vector<std::string> depends;
- this->WriteMakeRule
- (makefileStream,
- "A target that is always out of date.",
- "cmake_force", depends, commands, true);
-
- // Special target to cleanup operation of make tool.
- this->WriteMakeRule
- (makefileStream,
- "Disable implicit rules so canoncical targets will work.",
- ".SUFFIXES",
- depends, commands, false);
-
- // Add a fake suffix to keep HP happy. Must be max 32 chars for SGI make.
- depends.push_back(".hpux_make_needs_suffix_list");
- this->WriteMakeRule(makefileStream, 0,
- ".SUFFIXES", depends, commands, false);
+ // Variables for reference by other rules.
+ this->WriteMakeVariables(makefileStream);
}
//----------------------------------------------------------------------------
@@ -793,7 +783,16 @@
commands, true);
}
+ // Special symbolic target that never exists to force dependers to
+ // run their rules.
+ {
+ std::vector<std::string> no_depends;
std::vector<std::string> no_commands;
+ this->WriteMakeRule
+ (makefileStream,
+ "A target that is always out of date.",
+ "cmake_force", no_depends, no_commands, true);
+ }
}
@@ -1378,7 +1377,6 @@
::WriteLocalAllRules(std::ostream& ruleFileStream)
{
this->WriteDisclaimer(ruleFileStream);
- this->WriteMakeVariables(ruleFileStream);
// Write the main entry point target. This must be the VERY first
// target so that make with no arguments will run it.
@@ -1397,7 +1395,19 @@
no_commands, true);
}
+ this->WriteSpecialTargetsTop(ruleFileStream);
+
+ // Include the progress variables for the target.
+ ruleFileStream
+ << "# Include the progress variables for this target.\n"
+ << this->IncludeDirective << " "
+ << "progress.make\n\n";
+
// Write all global targets
+ this->WriteDivider(ruleFileStream);
+ ruleFileStream
+ << "# Targets provided globally by CMake.\n"
+ << "\n";
cmTargets* targets = &(this->Makefile->GetTargets());
cmTargets::iterator glIt;
for ( glIt = targets->begin(); glIt != targets->end(); ++ glIt )
@@ -1456,8 +1466,6 @@
}
}
- this->WriteSpecialTargetsTop(ruleFileStream);
-
std::vector<std::string> depends;
std::vector<std::string> commands;
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- cmMakefileTargetGenerator.cxx 31 Aug 2006 18:09:56 -0000 1.41
+++ cmMakefileTargetGenerator.cxx 8 Sep 2006 14:42:14 -0000 1.42
@@ -105,7 +105,6 @@
}
this->LocalGenerator->WriteDisclaimer(*this->BuildFileStream);
this->LocalGenerator->WriteSpecialTargetsTop(*this->BuildFileStream);
- this->LocalGenerator->WriteMakeVariables(*this->BuildFileStream);
}
//----------------------------------------------------------------------------
More information about the Cmake-commits
mailing list