STYLE: fix line length

This commit is contained in:
Ken Martin 2006-05-15 10:19:57 -04:00
parent ed1ea24cef
commit 000bce884d
5 changed files with 66 additions and 47 deletions

View File

@ -69,17 +69,20 @@ union cmDependsFortran_yystype_u
/* Setup the proper yylex interface. */ /* Setup the proper yylex interface. */
#define YY_EXTRA_TYPE cmDependsFortranParser* #define YY_EXTRA_TYPE cmDependsFortranParser*
#define YY_DECL int cmDependsFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner) #define YY_DECL \
int cmDependsFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
#define YYSTYPE cmDependsFortran_yystype #define YYSTYPE cmDependsFortran_yystype
#define YYSTYPE_IS_DECLARED 1 #define YYSTYPE_IS_DECLARED 1
#if !defined(cmDependsFortranLexer_cxx) #if !defined(cmDependsFortranLexer_cxx)
# include "cmDependsFortranLexer.h" # include "cmDependsFortranLexer.h"
#endif #endif
#if !defined(cmDependsFortranLexer_cxx) && !defined(cmDependsFortranParser_cxx) #if !defined(cmDependsFortranLexer_cxx)
#if !defined(cmDependsFortranParser_cxx)
# undef YY_EXTRA_TYPE # undef YY_EXTRA_TYPE
# undef YY_DECL # undef YY_DECL
# undef YYSTYPE # undef YYSTYPE
# undef YYSTYPE_IS_DECLARED # undef YYSTYPE_IS_DECLARED
#endif #endif
#endif
#endif #endif

View File

@ -1,7 +1,7 @@
/* A Bison parser, made by GNU Bison 1.875d. */ /* A Bison parser, made by GNU Bison 1.875d. */
/* Skeleton parser for Yacc-like parsing with Bison, /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -299,7 +299,9 @@ This file must be translated to C and modified to build everywhere.
Run bison like this: Run bison like this:
bison --yacc --name-prefix=cmDependsJava_yy --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx cmDependsJavaParser.y bison --yacc --name-prefix=cmDependsJava_yy
--defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx
cmDependsJavaParser.y
Modify cmDependsJavaParser.c: Modify cmDependsJavaParser.c:
- remove TABs - remove TABs
@ -331,14 +333,16 @@ static void cmDependsJavaError(yyscan_t yyscanner, const char* message);
#define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp); #define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp);
#define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval) #define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval)
#define jpStoreClass(str) yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str)) #define jpStoreClass(str) \
yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str))
/* Disable some warnings in the generated code. */ /* Disable some warnings in the generated code. */
#ifdef __BORLANDC__ #ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */ # pragma warn -8004 /* Variable assigned a value that is not used. */
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */ # pragma warning (disable: 4102) /* Unused goto label. */
# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ # pragma warning (disable: 4065) /* Switch statement contains default but
no case. */
#endif #endif

View File

@ -1,7 +1,7 @@
/* A Bison parser, made by GNU Bison 1.875d. */ /* A Bison parser, made by GNU Bison 1.875d. */
/* Skeleton parser for Yacc-like parsing with Bison, /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -111,12 +111,14 @@ void cmLocalUnixMakefileGenerator3::Generate()
void cmLocalUnixMakefileGenerator3::ConfigureOutputPaths() void cmLocalUnixMakefileGenerator3::ConfigureOutputPaths()
{ {
// Format the library and executable output paths. // Format the library and executable output paths.
if(const char* libOut = this->Makefile->GetDefinition("LIBRARY_OUTPUT_PATH")) if(const char* libOut =
this->Makefile->GetDefinition("LIBRARY_OUTPUT_PATH"))
{ {
this->LibraryOutputPath = libOut; this->LibraryOutputPath = libOut;
this->FormatOutputPath(this->LibraryOutputPath, "LIBRARY"); this->FormatOutputPath(this->LibraryOutputPath, "LIBRARY");
} }
if(const char* exeOut = this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH")) if(const char* exeOut =
this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"))
{ {
this->ExecutableOutputPath = exeOut; this->ExecutableOutputPath = exeOut;
this->FormatOutputPath(this->ExecutableOutputPath, "EXECUTABLE"); this->FormatOutputPath(this->ExecutableOutputPath, "EXECUTABLE");
@ -144,9 +146,8 @@ void cmLocalUnixMakefileGenerator3::FormatOutputPath(std::string& path,
// Convert the output path to a full path in case it is // Convert the output path to a full path in case it is
// specified as a relative path. Treat a relative path as // specified as a relative path. Treat a relative path as
// relative to the current output directory for this makefile. // relative to the current output directory for this makefile.
path = path = cmSystemTools::CollapseFullPath
cmSystemTools::CollapseFullPath(path.c_str(), (path.c_str(), this->Makefile->GetStartOutputDirectory());
this->Makefile->GetStartOutputDirectory());
// Add a trailing slash for easy appending later. // Add a trailing slash for easy appending later.
if(path.empty() || path[path.size()-1] != '/') if(path.empty() || path[path.size()-1] != '/')
@ -227,8 +228,8 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile()
commands.push_back(this->GetRecursiveMakeCall commands.push_back(this->GetRecursiveMakeCall
(tgtMakefileName.c_str(),targetName.c_str())); (tgtMakefileName.c_str(),targetName.c_str()));
this->CreateCDCommand(commands, this->CreateCDCommand(commands,
this->Makefile->GetHomeOutputDirectory(), this->Makefile->GetHomeOutputDirectory(),
this->Makefile->GetStartOutputDirectory()); this->Makefile->GetStartOutputDirectory());
} }
this->WriteMakeRule(ruleFileStream, this->WriteMakeRule(ruleFileStream,
"target for object file", "target for object file",
@ -342,7 +343,8 @@ void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile()
// Store the include regular expressions for this directory. // Store the include regular expressions for this directory.
infoFileStream infoFileStream
<< "\n" << "\n"
<< "# The C and CXX include file regular expressions for this directory.\n"; << "# The C and CXX include file regular expressions for "
<< "this directory.\n";
infoFileStream infoFileStream
<< "SET(CMAKE_C_INCLUDE_REGEX_SCAN "; << "SET(CMAKE_C_INCLUDE_REGEX_SCAN ";
this->WriteCMakeArgument(infoFileStream, this->WriteCMakeArgument(infoFileStream,
@ -358,8 +360,9 @@ void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile()
infoFileStream infoFileStream
<< "SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})\n"; << "SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})\n";
infoFileStream infoFileStream
<< "SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})\n"; << "SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN "
"${CMAKE_C_INCLUDE_REGEX_COMPLAIN})\n";
// Store the set of available generated files. // Store the set of available generated files.
infoFileStream infoFileStream
<< "\n" << "\n"
@ -579,7 +582,8 @@ cmLocalUnixMakefileGenerator3
std::vector<std::string> commands; std::vector<std::string> commands;
std::vector<std::string> no_depends; std::vector<std::string> no_depends;
commands.clear(); commands.clear();
if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) || (this->ForceVerboseMakefiles)) if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
|| (this->ForceVerboseMakefiles))
{ {
makefileStream makefileStream
<< "# Produce verbose output by default.\n" << "# Produce verbose output by default.\n"
@ -601,21 +605,20 @@ cmLocalUnixMakefileGenerator3
// Special target to cleanup operation of make tool. // Special target to cleanup operation of make tool.
std::vector<std::string> depends; std::vector<std::string> depends;
this->WriteMakeRule(makefileStream, this->WriteMakeRule
"Disable implicit rules so canoncical targets will work.", (makefileStream,
".SUFFIXES", "Disable implicit rules so canoncical targets will work.",
depends, ".SUFFIXES",
commands, false); depends, commands, false);
// Add a fake suffix to keep HP happy. Must be max 32 chars for SGI make. // Add a fake suffix to keep HP happy. Must be max 32 chars for SGI make.
depends.push_back(".hpux_make_needs_suffix_list"); depends.push_back(".hpux_make_needs_suffix_list");
this->WriteMakeRule(makefileStream, 0, this->WriteMakeRule(makefileStream, 0,
".SUFFIXES", depends, commands, false); ".SUFFIXES", depends, commands, false);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void void cmLocalUnixMakefileGenerator3
cmLocalUnixMakefileGenerator3
::WriteSpecialTargetsBottom(std::ostream& makefileStream) ::WriteSpecialTargetsBottom(std::ostream& makefileStream)
{ {
this->WriteDivider(makefileStream); this->WriteDivider(makefileStream);
@ -655,7 +658,6 @@ cmLocalUnixMakefileGenerator3
} }
std::vector<std::string> no_commands; std::vector<std::string> no_commands;
} }
@ -703,7 +705,8 @@ cmLocalUnixMakefileGenerator3
{ {
// Add a dependency on the rule file itself unless an option to skip // Add a dependency on the rule file itself unless an option to skip
// it is specifically enabled by the user or project. // it is specifically enabled by the user or project.
const char* nodep = this->Makefile->GetDefinition("CMAKE_SKIP_RULE_DEPENDENCY"); const char* nodep =
this->Makefile->GetDefinition("CMAKE_SKIP_RULE_DEPENDENCY");
if(!nodep || cmSystemTools::IsOff(nodep)) if(!nodep || cmSystemTools::IsOff(nodep))
{ {
depends.push_back(ruleFileName); depends.push_back(ruleFileName);
@ -733,8 +736,8 @@ cmLocalUnixMakefileGenerator3
d != cc.GetDepends().end(); ++d) d != cc.GetDepends().end(); ++d)
{ {
// Lookup the real name of the dependency in case it is a CMake target. // Lookup the real name of the dependency in case it is a CMake target.
std::string dep = this->GetRealDependency(d->c_str(), std::string dep = this->GetRealDependency
this->ConfigurationName.c_str()); (d->c_str(), this->ConfigurationName.c_str());
depends.push_back(dep); depends.push_back(dep);
} }
} }
@ -941,9 +944,9 @@ cmLocalUnixMakefileGenerator3::AppendEcho(std::vector<std::string>& commands,
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// take a tgt path and convert it into a make target, it could be full, or relative //take a tgt path and convert it into a make target, it could be full, or
std::string //relative
cmLocalUnixMakefileGenerator3 std::string cmLocalUnixMakefileGenerator3
::ConvertToMakeTarget(const char* tgt) ::ConvertToMakeTarget(const char* tgt)
{ {
// Make targets should not have a leading './' for a file in the // Make targets should not have a leading './' for a file in the
@ -1051,7 +1054,8 @@ cmLocalUnixMakefileGenerator3
// see if the variable has been defined before and return // see if the variable has been defined before and return
// the modified version of the variable // the modified version of the variable
std::map<cmStdString, cmStdString>::iterator i = this->MakeVariableMap.find(unmodified); std::map<cmStdString, cmStdString>::iterator i =
this->MakeVariableMap.find(unmodified);
if(i != this->MakeVariableMap.end()) if(i != this->MakeVariableMap.end())
{ {
return i->second; return i->second;
@ -1125,9 +1129,9 @@ bool
cmLocalUnixMakefileGenerator3 cmLocalUnixMakefileGenerator3
::ScanDependencies(std::vector<std::string> const& args) ::ScanDependencies(std::vector<std::string> const& args)
{ {
// Format of arguments is: // Format of arguments is: $(CMAKE_COMMAND), cmake_depends,
// $(CMAKE_COMMAND), cmake_depends, GeneratorName, home_output_dir, start_output_dir, info file // GeneratorName, home_output_dir, start_output_dir, info file The
// The caller has ensured that all required arguments exist. // caller has ensured that all required arguments exist.
// The info file for this target // The info file for this target
std::string const& infoFile = args[5]; std::string const& infoFile = args[5];
@ -1190,7 +1194,8 @@ cmLocalUnixMakefileGenerator3
} }
std::string internalRuleFileNameFull = dir; std::string internalRuleFileNameFull = dir;
internalRuleFileNameFull += "/depend.internal"; internalRuleFileNameFull += "/depend.internal";
cmGeneratedFileStream internalRuleFileStream(internalRuleFileNameFull.c_str()); cmGeneratedFileStream
internalRuleFileStream(internalRuleFileNameFull.c_str());
internalRuleFileStream.SetCopyIfDifferent(true); internalRuleFileStream.SetCopyIfDifferent(true);
if(!internalRuleFileStream) if(!internalRuleFileStream)
{ {
@ -1256,7 +1261,8 @@ cmLocalUnixMakefileGenerator3
std::string complainRegexVar = "CMAKE_"; std::string complainRegexVar = "CMAKE_";
complainRegexVar += lang; complainRegexVar += lang;
complainRegexVar += "_INCLUDE_REGEX_COMPLAIN"; complainRegexVar += "_INCLUDE_REGEX_COMPLAIN";
if(const char* complainRegex = mf->GetDefinition(complainRegexVar.c_str())) if(const char* complainRegex =
mf->GetDefinition(complainRegexVar.c_str()))
{ {
includeRegexComplain = complainRegex; includeRegexComplain = complainRegex;
} }
@ -1290,7 +1296,8 @@ cmLocalUnixMakefileGenerator3
if (scanner) if (scanner)
{ {
scanner->SetFileComparison(this->GlobalGenerator->GetCMakeInstance()->GetFileComparison()); scanner->SetFileComparison
(this->GlobalGenerator->GetCMakeInstance()->GetFileComparison());
// for each file we need to scan // for each file we need to scan
std::string srcLang = "CMAKE_DEPENDS_CHECK_"; std::string srcLang = "CMAKE_DEPENDS_CHECK_";
srcLang += lang; srcLang += lang;
@ -1305,7 +1312,8 @@ cmLocalUnixMakefileGenerator3
// make sure the object file is relative to home output // make sure the object file is relative to home output
std::string obj = *si; std::string obj = *si;
obj = lg->Convert(obj.c_str(),HOME_OUTPUT,MAKEFILE); obj = lg->Convert(obj.c_str(),HOME_OUTPUT,MAKEFILE);
scanner->Write(src.c_str(),obj.c_str(),ruleFileStream, internalRuleFileStream); scanner->Write(src.c_str(),obj.c_str(),
ruleFileStream, internalRuleFileStream);
} }
// free the scanner for this language // free the scanner for this language
@ -1491,7 +1499,8 @@ void cmLocalUnixMakefileGenerator3::CheckDependencies(cmMakefile* mf,
// For each info file run the check // For each info file run the check
cmDependsC checker; cmDependsC checker;
checker.SetVerbose(verbose); checker.SetVerbose(verbose);
checker.SetFileComparison(this->GlobalGenerator->GetCMakeInstance()->GetFileComparison()); checker.SetFileComparison
(this->GlobalGenerator->GetCMakeInstance()->GetFileComparison());
for(std::vector<std::string>::iterator l = files.begin(); for(std::vector<std::string>::iterator l = files.begin();
l != files.end(); ++l) l != files.end(); ++l)
{ {
@ -1619,7 +1628,8 @@ cmLocalUnixMakefileGenerator3
// Prepend the target directory. // Prepend the target directory.
std::string obj; std::string obj;
const char* fileTargetDirectory = source.GetProperty("MACOSX_PACKAGE_LOCATION"); const char* fileTargetDirectory =
source.GetProperty("MACOSX_PACKAGE_LOCATION");
if ( fileTargetDirectory ) if ( fileTargetDirectory )
{ {
std::string targetName; std::string targetName;
@ -1643,7 +1653,8 @@ cmLocalUnixMakefileGenerator3
// Framework not handled yet // Framework not handled yet
abort(); abort();
} }
obj = cmSystemTools::RelativePath(this->Makefile->GetHomeOutputDirectory(), obj.c_str()); obj = cmSystemTools::RelativePath
(this->Makefile->GetHomeOutputDirectory(), obj.c_str());
} }
else else
{ {

View File

@ -24,7 +24,8 @@
/** \class cmQTWrapCPPCommand /** \class cmQTWrapCPPCommand
* \brief Create moc file rules for QT classes * \brief Create moc file rules for QT classes
* *
* cmQTWrapCPPCommand is used to create wrappers for QT classes into normal C++ * cmQTWrapCPPCommand is used to create wrappers for QT classes into
* normal C++
*/ */
class cmQTWrapCPPCommand : public cmCommand class cmQTWrapCPPCommand : public cmCommand
{ {