Revert "Nobody uses unix anymore"

This reverts commit fcee5a46ae.
This commit is contained in:
Paul Reeves 2023-06-05 13:25:13 +02:00
parent fcee5a46ae
commit 439200d1dc
19 changed files with 118 additions and 118 deletions

View File

@ -634,7 +634,7 @@ RECURSIVE = YES
EXCLUDE = lib/tinyxml
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Linux file system feature) are excluded
# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.
EXCLUDE_SYMLINKS = NO

View File

@ -40,12 +40,12 @@ If you are working in GNU/Linux and you want to generate a makefile for Windows
```
cbp2make -in my_project.cbp -windows
cbp2make -in my_project.cbp -linux
cbp2make -in my_project.cbp -linux -windows -mac
cbp2make -in my_project.cbp -unix
cbp2make -in my_project.cbp -unix -windows -mac
cbp2make -in my_project.cbp --all-os
```
`cbp2make`' will append `.linux` or `.windows` or `.mac` suffix to makefile name for each platform respectively.
`cbp2make`' will append `.unix` or `.windows` or `.mac` suffix to makefile name for each platform respectively.
### Create makefile for multiple projects or workspaces
@ -103,24 +103,24 @@ Usage syntax:
Generate makefile:
cbp2make -in <project_file> [-cfg <configuration>] [-out <makefile>]
[-linux] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[-unix] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]
[--with-deps] [--keep-objdir] [--keep-outdir] [--target-case keep|lower|upper]
[--macros-case keep|lower|upper] [--quote-path auto|never|always]
cbp2make -list -in <project_file_list> [-cfg <configuration>]
[-linux] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[-unix] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]
[--with-deps] [--keep-objdir] [--keep-outdir] [--target-case keep|lower|upper]
[--macros-case keep|lower|upper] [--quote-path auto|never|always]
Manage toolchains:
cbp2make --config toolchain --add [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config toolchain --remove [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config toolchain --add [-unix|-windows|-mac] -chain <toolchain>
cbp2make --config toolchain --remove [-unix|-windows|-mac] -chain <toolchain>
Manage build tools:
cbp2make --config tool --add [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config tool --add [-unix|-windows|-mac] -chain <toolchain>
-tool <tool> -type <type> <tool options>
cbp2make --config tool --remove [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config tool --remove [-unix|-windows|-mac] -chain <toolchain>
-tool <tool>
Tool types: pp=preprocessor as=assembler cc=compiler rc=resource compiler
@ -129,7 +129,7 @@ Usage syntax:
Tool options (common):
-desc <description> -program <executable> -command <command_template>
-mkv <make_variable> -srcext <source_extensions> -outext <output_extension>
-quotepath <yes|no> -fullpath <yes|no> -linuxpath <yes|no>
-quotepath <yes|no> -fullpath <yes|no> -unixpath <yes|no>
Tool options (compiler):
-incsw <include_switch> -defsw <define_switch> -deps <yes|no>
Tool options (linker):
@ -137,7 +137,7 @@ Usage syntax:
-lext <library_extension> -objext <object_extension> -lflat <yes|no>
Manage platforms:
cbp2make --config platform [-linux|-windows|-mac] [-pwd <print_dir_command>]
cbp2make --config platform [-unix|-windows|-mac] [-pwd <print_dir_command>]
[-cd <change_dir_command>] [-rm <remove_file_command>]
[-rmf <remove_file_forced>] [-rmd <remove_dir_command>]
[-cp <copy_file_command>] [-mv <move_file_command>]
@ -171,7 +171,7 @@ Usage syntax:
`-in <project_file>` // specifies an input file or a list of files;
`-cfg <configuration>` // specifies a configuration file, see also "--local" and "--global" options;
`-out <makefile>` // specifies the name of a makefile or a list of makefiles;
`-linux` // enables Unix / Linux compatible makefile generation;
`-unix` // enables Unix / Linux compatible makefile generation;
`-windows` // enables Windows compatible makefile generation;
`-mac` // enables Macintosh compatible makefile generation;
`--all-os` // enables all target platforms at once;

View File

@ -11,7 +11,7 @@
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Option parameters="--local -in cbp2make.cbp -linux -windows --wrap-objects --with-deps" />
<Option parameters="--local -in cbp2make.cbp -unix -windows --wrap-objects --with-deps" />
<Compiler>
<Add option="-g" />
</Compiler>
@ -40,7 +40,7 @@
<Option object_output="obj/Profile/" />
<Option type="1" />
<Option compiler="gcc" />
<Option parameters="--local -in cbp2make.cbp -linux -windows --wrap-objects --with-deps" />
<Option parameters="--local -in cbp2make.cbp -unix -windows --wrap-objects --with-deps" />
<Compiler>
<Add option="-pg" />
<Add option="-g" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<cbp2make>
<platforms>
<platform name="Linux" path_delimiter="/">
<platform name="Unix" path_delimiter="/">
<command make_file="make $opts -f $file" />
<command make_tool="make" />
<command copy_file="cp -p $src $dst" />
@ -54,7 +54,7 @@
</platform>
</platforms>
<toolchains>
<toolchain platform="Linux" alias="gcc">
<toolchain platform="Unix" alias="gcc">
<tool type="compiler" alias="gnu_c_compiler">
<option description="GNU C Compiler" />
<option program="gcc" />
@ -64,7 +64,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -77,7 +77,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -90,7 +90,7 @@
<option target_extension="a" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -109,7 +109,7 @@
<option target_extension="so" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -128,7 +128,7 @@
<option target_extension="" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -140,7 +140,7 @@
<option option_wingui="" />
</tool>
</toolchain>
<toolchain platform="Linux" alias="icc">
<toolchain platform="Unix" alias="icc">
<tool type="compiler" alias="intel_c_compiler">
<option description="Intel C Compiler" />
<option program="icc" />
@ -150,7 +150,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -163,7 +163,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -176,7 +176,7 @@
<option target_extension="a" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -195,7 +195,7 @@
<option target_extension="so" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -214,7 +214,7 @@
<option target_extension="" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -236,7 +236,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -249,7 +249,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -262,7 +262,7 @@
<option target_extension="a" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -281,7 +281,7 @@
<option target_extension="dll" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -300,7 +300,7 @@
<option target_extension="exe" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -320,7 +320,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -335,7 +335,7 @@
<option target_extension="obj" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="/I" />
<option define_switch="/D" />
</tool>
@ -348,7 +348,7 @@
<option target_extension="obj" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="/I" />
<option define_switch="/D" />
</tool>
@ -361,7 +361,7 @@
<option target_extension="a" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -380,7 +380,7 @@
<option target_extension="dll" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -399,7 +399,7 @@
<option target_extension="exe" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -421,7 +421,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -434,7 +434,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -447,7 +447,7 @@
<option target_extension="a" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -466,7 +466,7 @@
<option target_extension="so" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -485,7 +485,7 @@
<option target_extension="" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -507,7 +507,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -520,7 +520,7 @@
<option target_extension="o" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option include_dir_switch="-I" />
<option define_switch="-D" />
</tool>
@ -533,7 +533,7 @@
<option target_extension="a" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -552,7 +552,7 @@
<option target_extension="so" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />
@ -571,7 +571,7 @@
<option target_extension="" />
<option need_quoted_path="0" />
<option need_full_path="0" />
<option need_linux_path="0" />
<option need_unix_path="0" />
<option library_dir_switch="-L" />
<option link_library_switch="-l" />
<option object_extension="o" />

View File

@ -11,7 +11,7 @@ cp -p res/cbp2make.png $target/res/cbp2make.png
cp -pr lib $target
cp -pr src $target
cp -p cbp2make.cbp $target
cp -p cbp2make.cbp.mak.linux $target
cp -p cbp2make.cbp.mak.unix $target
cp -p cbp2make.cbp.mak.windows $target
cp -p Doxyfile $target
cp -p cbp2make.cfg $target

View File

@ -128,7 +128,7 @@ void SplitFilePathName(const CString& FilePathName, CString& FilePath, CString&
}
}
CString MakeLinuxPath(const CString& FilePathName)
CString MakeUnixPath(const CString& FilePathName)
{
return FindReplaceChar(FilePathName,'\\','/');
}
@ -143,7 +143,7 @@ CString MakeNativePath(const CString& FilePathName)
#ifdef OS_WIN
return MakeWindowsPath(FilePathName);
#else
return MakeLinuxPath(FilePathName);
return MakeUnixPath(FilePathName);
#endif
}

View File

@ -34,7 +34,7 @@ CString ExtractFilePath(const CString& FilePathName);
CString ExtractFileName(const CString& FilePathName);
CString ExtractFileExt(const CString& FilePathName);
void SplitFilePathName(const CString& FilePathName, CString& FilePath, CString& FileName, CString& FileExt);
CString MakeLinuxPath(const CString& FilePathName);
CString MakeUnixPath(const CString& FilePathName);
CString MakeWindowsPath(const CString& FilePathName);
CString MakeNativePath(const CString& FilePathName);
CString RemoveLeadingPathDelimiter(const CString& FilePathName);

View File

@ -974,7 +974,7 @@ bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
// </quote>
//
// It is not clear fgets does that, and certainly isn't clear it works cross platform.
// Generally, you expect fgets to translate from the convention of the OS to the c/linux
// Generally, you expect fgets to translate from the convention of the OS to the c/unix
// convention, and not work generally.
/*
@ -1000,7 +1000,7 @@ bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
// Wikipedia:
// Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or
// CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, 0x0D 0x0A)...
// * LF: Multics, Linux and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others
// * LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others
// * CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS
// * CR: Commodore 8-bit machines, Apple II family, Mac OS up to version 9 and OS-9

View File

@ -44,7 +44,7 @@ CBuildTool::CBuildTool(const CBuildTool& BuildTool)
m_GenericSwitch = BuildTool.m_GenericSwitch;
m_NeedQuotedPath = BuildTool.m_NeedQuotedPath;
m_NeedFullPath = BuildTool.m_NeedFullPath;
m_NeedLinuxPath = BuildTool.m_NeedLinuxPath;
m_NeedUnixPath = BuildTool.m_NeedUnixPath;
}
CBuildTool::~CBuildTool(void)
@ -71,7 +71,7 @@ void CBuildTool::Clear(void)
m_GenericSwitch = "-";
m_NeedQuotedPath = false;
m_NeedFullPath = false;
m_NeedLinuxPath = false;
m_NeedUnixPath = false;
}
CBuildTool::ToolType CBuildTool::Type(const CString& Name)
@ -166,7 +166,7 @@ void CBuildTool::Reset(const CPlatform::OS_Type OS)
bool CBuildTool::Supports(const CPlatform::OS_Type OS)
{
return ((CPlatform::OS_Linux==OS)||
return ((CPlatform::OS_Unix==OS)||
(CPlatform::OS_Windows==OS)||
(CPlatform::OS_Mac==OS));
}
@ -227,7 +227,7 @@ void CBuildTool::Read(const TiXmlElement *BuildToolRoot)
Read(BuildToolRoot, "generic_switch", m_GenericSwitch);
Read(BuildToolRoot, "need_quoted_path", m_NeedQuotedPath);
Read(BuildToolRoot, "need_full_path", m_NeedFullPath);
Read(BuildToolRoot, "need_linux_path", m_NeedLinuxPath);
Read(BuildToolRoot, "need_unix_path", m_NeedUnixPath);
}
void CBuildTool::Write(TiXmlElement *Root, const CString& Name, const CString& Value)
@ -257,7 +257,7 @@ void CBuildTool::Write(TiXmlElement *BuildToolRoot)
Write(BuildToolRoot, "generic_switch", m_GenericSwitch);
Write(BuildToolRoot, "need_quoted_path", m_NeedQuotedPath);
Write(BuildToolRoot, "need_full_path", m_NeedFullPath);
Write(BuildToolRoot, "need_linux_path", m_NeedLinuxPath);
Write(BuildToolRoot, "need_unix_path", m_NeedUnixPath);
//Write(BuildToolRoot, "", m_);
}
@ -274,7 +274,7 @@ void CBuildTool::Show(void)
std::cout<<"Generic switch: "<<m_GenericSwitch.GetCString()<<std::endl;
std::cout<<"Need quoted path: "<<BooleanToYesNoString(m_NeedQuotedPath).GetCString()<<std::endl;
std::cout<<"Need full path: "<<BooleanToYesNoString(m_NeedFullPath).GetCString()<<std::endl;
std::cout<<"Need Linux-style path: "<<BooleanToYesNoString(m_NeedLinuxPath).GetCString()<<std::endl;
std::cout<<"Need Unix-style path: "<<BooleanToYesNoString(m_NeedUnixPath).GetCString()<<std::endl;
}
//------------------------------------------------------------------------------
@ -552,7 +552,7 @@ void CDynamicLinker::Reset(const CPlatform::OS_Type OS)
switch (OS)
{
default:
case CPlatform::OS_Linux: { m_LibraryExtension = "so"; break; }
case CPlatform::OS_Unix: { m_LibraryExtension = "so"; break; }
case CPlatform::OS_Windows: { m_LibraryExtension = "dll"; break; }
case CPlatform::OS_Mac: { m_LibraryExtension = "dylib"; break; }
}

View File

@ -60,7 +60,7 @@ class CBuildTool
CString m_GenericSwitch;
bool m_NeedQuotedPath;
bool m_NeedFullPath;
bool m_NeedLinuxPath;
bool m_NeedUnixPath;
protected:
void Read(const TiXmlElement *Root, const CString& Name, CString& Value);
void Read(const TiXmlElement *Root, const CString& Name, bool& Value);
@ -81,7 +81,7 @@ class CBuildTool
CString& TargetExtension(void) { return m_TargetExtension; }
bool& NeedQuotedPath(void) { return m_NeedQuotedPath; }
bool& NeedFullPath(void) { return m_NeedFullPath; }
bool& NeedLinuxPath(void) { return m_NeedLinuxPath; }
bool& NeedUnixPath(void) { return m_NeedUnixPath; }
CString MakeCommand(const CString& CommandTemplate, CConfiguration& Arguments);
CString MakeCommand(CConfiguration& Arguments);
virtual bool ExpectedSourceExtension(const CString& FileExtension);

View File

@ -63,22 +63,22 @@ void CProcessingMachine::DisplayHelpMessage(void)
"Usage syntax:\n\n"
"\tGenerate makefile:\n"
"\t\tcbp2make -in <project_file> [-cfg <configuration>] [-out <makefile>]\n"
"\t\t\t [-linux] [-windows] [-mac] [--all-os] [-targets \"<target1>[,<target2>[, ...]]\"]\n"
"\t\t\t [-unix] [-windows] [-mac] [--all-os] [-targets \"<target1>[,<target2>[, ...]]\"]\n"
"\t\t\t [--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]\n"
"\t\t\t [--with-deps] [--keep-objdir] [--keep-outdir] [--target-case keep|lower|upper]\n"
"\t\t\t [--macros-case keep|lower|upper] [--quote-path auto|never|always]\n"
"\t\tcbp2make -list -in <project_file_list> [-cfg <configuration>]\n"
"\t\t\t [-linux] [-windows] [-mac] [--all-os] [-targets \"<target1>[,<target2>[, ...]]\"]\n"
"\t\t\t [-unix] [-windows] [-mac] [--all-os] [-targets \"<target1>[,<target2>[, ...]]\"]\n"
"\t\t\t [--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]\n"
"\t\t\t [--with-deps] [--keep-objdir] [--keep-outdir] [--target-case keep|lower|upper]\n\n"
"\t\t\t [--macros-case keep|lower|upper] [--quote-path auto|never|always]\n"
"\tManage toolchains:\n"
"\t\tcbp2make --config toolchain --add [-linux|-windows|-mac] -chain <toolchain>\n"
"\t\tcbp2make --config toolchain --remove [-linux|-windows|-mac] -chain <toolchain>\n\n"
"\t\tcbp2make --config toolchain --add [-unix|-windows|-mac] -chain <toolchain>\n"
"\t\tcbp2make --config toolchain --remove [-unix|-windows|-mac] -chain <toolchain>\n\n"
"\tManage build tools:\n"
"\t\tcbp2make --config tool --add [-linux|-windows|-mac] -chain <toolchain>\n"
"\t\tcbp2make --config tool --add [-unix|-windows|-mac] -chain <toolchain>\n"
"\t\t\t -tool <tool> -type <type> <tool options>\n"
"\t\tcbp2make --config tool --remove [-linux|-windows|-mac] -chain <toolchain>\n"
"\t\tcbp2make --config tool --remove [-unix|-windows|-mac] -chain <toolchain>\n"
"\t\t\t -tool <tool>\n\n"
"\tTool types:\t pp=preprocessor as=assembler cc=compiler rc=resource compiler\n"
"\t\t\t sl=static linker dl=dynamic linker el=executable linker\n"
@ -86,14 +86,14 @@ void CProcessingMachine::DisplayHelpMessage(void)
"\tTool options (common):\n"
"\t\t\t -desc <description> -program <executable> -command <command_template>\n"
"\t\t\t -mkv <make_variable> -srcext <source_extensions> -outext <output_extension>\n"
"\t\t\t -quotepath <yes|no> -fullpath <yes|no> -linuxpath <yes|no>\n"
"\t\t\t -quotepath <yes|no> -fullpath <yes|no> -unixpath <yes|no>\n"
"\tTool options (compiler):\n"
"\t\t\t -incsw <include_switch> -defsw <define_switch> -deps <yes|no>\n"
"\tTool options (linker):\n"
"\t\t\t -ldsw <library_dir_switch> -llsw <link_library_switch> -lpfx <library_prefix>\n"
"\t\t\t -lext <library_extension> -objext <object_extension> -lflat <yes|no>\n\n"
"\tManage platforms:\n"
"\t\tcbp2make --config platform [-linux|-windows|-mac] [-pwd <print_dir_command>]\n"
"\t\tcbp2make --config platform [-unix|-windows|-mac] [-pwd <print_dir_command>]\n"
"\t\t\t [-cd <change_dir_command>] [-rm <remove_file_command>]\n"
"\t\t\t [-rmf <remove_file_forced>] [-rmd <remove_dir_command>]\n"
"\t\t\t [-cp <copy_file_command>] [-mv <move_file_command>]\n"
@ -121,7 +121,7 @@ void CProcessingMachine::DisplayHelpMessage(void)
void CProcessingMachine::CreateConfiguration(void)
{
CGenericProcessingMachine::CreateConfiguration();
CPlatform pl; pl.Reset(CPlatform::OS_Linux);
CPlatform pl; pl.Reset(CPlatform::OS_Unix);
CToolChain tc("gcc");
//
PSC().InsertFlagVariable("--version");
@ -149,7 +149,7 @@ void CProcessingMachine::CreateConfiguration(void)
PSC().InsertStringVariable("-outext","o");
PSC().InsertStringVariable("-quotepath","yes");
PSC().InsertStringVariable("-fullpath","no");
PSC().InsertStringVariable("-linuxpath","no");
PSC().InsertStringVariable("-unixpath","no");
PSC().InsertStringVariable("-incsw","-I");
PSC().InsertStringVariable("-defsw","-D");
PSC().InsertStringVariable("-deps","yes");
@ -159,7 +159,7 @@ void CProcessingMachine::CreateConfiguration(void)
PSC().InsertStringVariable("-objext","o");
PSC().InsertStringVariable("-lflat","no");
PSC().InsertFlagVariable("-linux");
PSC().InsertFlagVariable("-unix");
PSC().InsertFlagVariable("-windows");
PSC().InsertFlagVariable("-mac");
PSC().InsertFlagVariable("--all-os");
@ -252,9 +252,9 @@ void CProcessingMachine::ConfigureBuildTool(CBuildTool *BuildTool)
{
bt->NeedFullPath() = PSC().VarNamed("-fullpath").GetBoolean();
}
if (PSC().VarDefined("-linuxpath"))
if (PSC().VarDefined("-unixpath"))
{
bt->NeedLinuxPath() = PSC().VarNamed("-linuxpath").GetBoolean();
bt->NeedUnixPath() = PSC().VarNamed("-unixpath").GetBoolean();
}
CCompiler *cc = dynamic_cast<CCompiler *>(BuildTool);
if (0!=cc)
@ -435,14 +435,14 @@ bool CProcessingMachine::Configure(const CString& FileName)
m_BuildManager.Config().BeVerbose() = BeVerbose();
}
// cache frequently used variables
bool os_linux = PSC().VarDefined("-linux");
bool os_unix = PSC().VarDefined("-unix");
bool os_windows = PSC().VarDefined("-windows");
bool os_mac = PSC().VarDefined("-mac");
CPlatform::OS_Type os_type = CPlatform::OS_Linux;
if (os_linux) os_type = CPlatform::OS_Linux;
CPlatform::OS_Type os_type = CPlatform::OS_Unix;
if (os_unix) os_type = CPlatform::OS_Unix;
else if (os_windows) os_type = CPlatform::OS_Windows;
else if (os_mac) os_type = CPlatform::OS_Mac;
bool os_any = os_linux || os_windows || os_mac;
bool os_any = os_unix || os_windows || os_mac;
// configure
m_BuildManager.Config().Platforms().AddDefault();
if (PSC().VarDefined("--config"))
@ -578,15 +578,15 @@ bool CProcessingMachine::Configure(const CString& FileName)
} // config
//
bool os_all = PSC().VarDefined("--all-os");
os_all = os_all || (os_linux && os_windows && os_mac);
os_linux = os_linux || os_all;
os_all = os_all || (os_unix && os_windows && os_mac);
os_unix = os_unix || os_all;
os_windows = os_windows || os_all;
os_mac = os_mac || os_all;
bool os_none = !os_all && !os_linux && !os_windows && !os_mac;
bool os_none = !os_all && !os_unix && !os_windows && !os_mac;
if (os_none)
{
#ifdef OS_UNIX
os_linux = true;
os_unix = true;
#endif
#ifdef OS_WIN
os_windows = true;
@ -595,9 +595,9 @@ bool CProcessingMachine::Configure(const CString& FileName)
os_mac = true;
#endif
}
if (os_linux)
if (os_unix)
{
CPlatform *p = m_BuildManager.Config().Platforms().Find(CPlatform::OS_Linux);
CPlatform *p = m_BuildManager.Config().Platforms().Find(CPlatform::OS_Unix);
if (p) p->Active() = true;
}
if (os_windows)

View File

@ -74,7 +74,7 @@ CString CBuildTarget::AutoFilePrefix(const CPlatform::OS_Type OS)
switch (OS)
{
default:
case CPlatform::OS_Linux:
case CPlatform::OS_Unix:
{
switch (m_Type)
{
@ -125,7 +125,7 @@ CString CBuildTarget::AutoFileExtension(const CPlatform::OS_Type OS, const CBuil
switch (OS)
{
default:
case CPlatform::OS_Linux:
case CPlatform::OS_Unix:
{
switch (Type)
{

View File

@ -68,7 +68,7 @@
*/
/*!
\var CPlatform::OS_Type CPlatform::OS_Linux
\var CPlatform::OS_Type CPlatform::OS_Unix
\brief Type for UNIX-like OS.
*/

View File

@ -2,24 +2,24 @@ Usage syntax:
Generate makefile:
cbp2make -in <project_file> [-cfg <configuration>] [-out <makefile>]
[-linux] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[-unix] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]
[--with-deps] [--keep-objdir] [--keep-outdir] [--target-case keep|lower|upper]
[--macros-case keep|lower|upper] [--quote-path auto|never|always]
cbp2make -list -in <project_file_list> [-cfg <configuration>]
[-linux] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[-unix] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]
[--with-deps] [--keep-objdir] [--keep-outdir] [--target-case keep|lower|upper]
[--macros-case keep|lower|upper] [--quote-path auto|never|always]
Manage toolchains:
cbp2make --config toolchain --add [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config toolchain --remove [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config toolchain --add [-unix|-windows|-mac] -chain <toolchain>
cbp2make --config toolchain --remove [-unix|-windows|-mac] -chain <toolchain>
Manage build tools:
cbp2make --config tool --add [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config tool --add [-unix|-windows|-mac] -chain <toolchain>
-tool <tool> -type <type> <tool options>
cbp2make --config tool --remove [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config tool --remove [-unix|-windows|-mac] -chain <toolchain>
-tool <tool>
Tool types: pp=preprocessor as=assembler cc=compiler rc=resource compiler
@ -28,7 +28,7 @@ Usage syntax:
Tool options (common):
-desc <description> -program <executable> -command <command_template>
-mkv <make_variable> -srcext <source_extensions> -outext <output_extension>
-quotepath <yes|no> -fullpath <yes|no> -linuxpath <yes|no>
-quotepath <yes|no> -fullpath <yes|no> -unixpath <yes|no>
Tool options (compiler):
-incsw <include_switch> -defsw <define_switch> -deps <yes|no>
Tool options (linker):
@ -36,7 +36,7 @@ Usage syntax:
-lext <library_extension> -objext <object_extension> -lflat <yes|no>
Manage platforms:
cbp2make --config platform [-linux|-windows|-mac] [-pwd <print_dir_command>]
cbp2make --config platform [-unix|-windows|-mac] [-pwd <print_dir_command>]
[-cd <change_dir_command>] [-rm <remove_file_command>]
[-rmf <remove_file_forced>] [-rmd <remove_dir_command>]
[-cp <copy_file_command>] [-mv <move_file_command>]

View File

@ -42,7 +42,7 @@ CPlatform::~CPlatform(void)
void CPlatform::Clear(void)
{
m_OS_Type = OS_Linux;
m_OS_Type = OS_Unix;
m_Active = false;
m_Cmd_Null.Clear();
m_Cmd_Copy.Clear();
@ -93,7 +93,7 @@ CString CPlatform::Name(const OS_Type PlatformOS)
default:
case CPlatform::OS_Other:
case CPlatform::OS_Count: { }
case CPlatform::OS_Linux: { return STR_UNIX; }
case CPlatform::OS_Unix: { return STR_UNIX; }
case CPlatform::OS_Windows: { return STR_WINDOWS; }
case CPlatform::OS_Mac: { return STR_MAC; }
}
@ -102,7 +102,7 @@ CString CPlatform::Name(const OS_Type PlatformOS)
CPlatform::OS_Type CPlatform::OS(CString& PlatformName)
{
if (PlatformName==STR_UNIX) return CPlatform::OS_Linux;
if (PlatformName==STR_UNIX) return CPlatform::OS_Unix;
if (PlatformName==STR_WINDOWS) return CPlatform::OS_Windows;
if (PlatformName==STR_MAC) return CPlatform::OS_Mac;
return CPlatform::OS_Other;
@ -121,7 +121,7 @@ CString CPlatform::Pd(const CString& Path) const
}
else
{
return MakeLinuxPath(Path);
return MakeUnixPath(Path);
}
}
@ -232,7 +232,7 @@ void CPlatform::Reset(const CPlatform::OS_Type OS)
switch (m_OS_Type)
{
default:
case CPlatform::OS_Linux:
case CPlatform::OS_Unix:
{
m_Cmd_Null = "/dev/null";
m_Cmd_Copy = "cp -p $src $dst";
@ -505,11 +505,11 @@ CPlatform *CPlatformSet::Find(const CPlatform::OS_Type OS)
void CPlatformSet::AddDefault(void)
{
if (m_Locked) return;
CPlatform *p = Find(CPlatform::OS_Linux);
CPlatform *p = Find(CPlatform::OS_Unix);
if (0==p)
{
p = new CPlatform();
p->Reset(CPlatform::OS_Linux);
p->Reset(CPlatform::OS_Unix);
m_Platforms.push_back(p);
}
p = Find(CPlatform::OS_Windows);

View File

@ -24,7 +24,7 @@
#include "cbhelper.h"
//------------------------------------------------------------------------------
static const CString STR_UNIX = "Linux";
static const CString STR_UNIX = "Unix";
static const CString STR_WINDOWS = "Windows";
static const CString STR_MAC = "Mac";
@ -37,7 +37,7 @@ class CPlatform
enum OS_Type
{
OS_Other,
OS_Linux,
OS_Unix,
OS_Windows,
OS_Mac,
OS_Count

View File

@ -188,7 +188,7 @@ void CToolChain::Reset(const CPlatform::OS_Type OS)
bool CToolChain::Supports(const CPlatform::OS_Type OS) const
{
return ((CPlatform::OS_Linux==OS)||
return ((CPlatform::OS_Unix==OS)||
(CPlatform::OS_Windows==OS)||
(CPlatform::OS_Mac==OS));
}

View File

@ -1,4 +1,4 @@
#!/bin/bash
bin/Debug/cbp2make --local -in cbp2make.cbp -linux -windows --wrap-objects --wrap-options --with-deps --target-case lower --verbose
bin/Debug/cbp2make --local -in cbp2make.cbp -unix -windows --wrap-objects --wrap-options --with-deps --target-case lower --verbose
#bin/Debug/cbp2make --local -in cbp2make.cbp --verbose
cp -p cbp2make.cbp.mak.linux Makefile
cp -p cbp2make.cbp.mak.unix Makefile

View File

@ -2,24 +2,24 @@ Usage syntax:
Generate makefile:
cbp2make -in <project_file> [-cfg <configuration>] [-out <makefile>]
[-linux] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[-unix] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]
[--with-deps] [--keep-objdir] [--keep-outdir] [--target-case keep|lower|upper]
[--macros-case keep|lower|upper] [--quote-path auto|never|always]
cbp2make -list -in <project_file_list> [-cfg <configuration>]
[-linux] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[-unix] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]
[--with-deps] [--keep-objdir] [--keep-outdir] [--target-case keep|lower|upper]
[--macros-case keep|lower|upper] [--quote-path auto|never|always]
Manage toolchains:
cbp2make --config toolchain --add [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config toolchain --remove [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config toolchain --add [-unix|-windows|-mac] -chain <toolchain>
cbp2make --config toolchain --remove [-unix|-windows|-mac] -chain <toolchain>
Manage build tools:
cbp2make --config tool --add [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config tool --add [-unix|-windows|-mac] -chain <toolchain>
-tool <tool> -type <type> <tool options>
cbp2make --config tool --remove [-linux|-windows|-mac] -chain <toolchain>
cbp2make --config tool --remove [-unix|-windows|-mac] -chain <toolchain>
-tool <tool>
Tool types: pp=preprocessor as=assembler cc=compiler rc=resource compiler
@ -28,7 +28,7 @@ Usage syntax:
Tool options (common):
-desc <description> -program <executable> -command <command_template>
-mkv <make_variable> -srcext <source_extensions> -outext <output_extension>
-quotepath <yes|no> -fullpath <yes|no> -linuxpath <yes|no>
-quotepath <yes|no> -fullpath <yes|no> -unixpath <yes|no>
Tool options (compiler):
-incsw <include_switch> -defsw <define_switch> -deps <yes|no>
Tool options (linker):
@ -36,7 +36,7 @@ Usage syntax:
-lext <library_extension> -objext <object_extension> -lflat <yes|no>
Manage platforms:
cbp2make --config platform [-linux|-windows|-mac] [-pwd <print_dir_command>]
cbp2make --config platform [-unix|-windows|-mac] [-pwd <print_dir_command>]
[-cd <change_dir_command>] [-rm <remove_file_command>]
[-rmf <remove_file_forced>] [-rmd <remove_dir_command>]
[-cp <copy_file_command>] [-mv <move_file_command>]