Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does omake support GNU style of long options? #1051

Open
chatchoi opened this issue Sep 16, 2024 · 2 comments
Open

Does omake support GNU style of long options? #1051

chatchoi opened this issue Sep 16, 2024 · 2 comments

Comments

@chatchoi
Copy link

For example, --jobs 4, --no-print-directory,...

@GitMensch
Copy link
Contributor

yes, it supports longoptions and no, it dopes not support all of GNU make longoptions:

omake.exe --help

Usage: omake [options] goals

/B    Rebuild all             /C    Set directory
/Dxxx Define something        /Ixxx Set include path
/K    Keep response files     /O    Set output mode
/R    Ignore builtin vars     /S    Cancel keepgoing
/T    Tree Build              /V    Show version and date
/Wxxx WhatIf                  /d    Reserved
/e    Environment overrides   /fxxx Specify make file
/h    This text               /i    Ignore errors
/j:xx Set number of jobs      /k    Keep going
/n    Display only            /oxxx Specify old goals
/p    Print database          /q    Query
/r    Ignore builtin rules    /s    Don't print commands
/t    Touch                   /u    Debug warnings
/w    Print make status       --eval=STRING evaluate a statement
/!    No logo                 /? or --help  this help
--jobserver-auth=xxxx               Name a jobserver to use for getting jobs
--version                           Show version info
--no-builtin-rules                  Ignore builtin rules
--no-builtin-vars                   Ignore builtin variables

Time: 17:20:04  Date: Sep 23 2023

As far as I see --print-directory is missing in the help and --jobs in the implementation:

CmdSwitchCombineString MakeMain::specifiedFiles(SwitchParser, 'f', ' ', {"file"});
CmdSwitchBool MakeMain::displayOnly(SwitchParser, 'n', false, {"dry-run"});
CmdSwitchBool MakeMain::touch(SwitchParser, 't', false, {"touch"});
CmdSwitchBool MakeMain::query(SwitchParser, 'q', false, {"question"});
CmdSwitchBool MakeMain::keepGoing(SwitchParser, 'k', false, {"keep-going"});
CmdSwitchBool MakeMain::ignoreErrors(SwitchParser, 'i', false, {"ignore-errors"});
CmdSwitchDefine MakeMain::defines(SwitchParser, 'D', {"eval"});
CmdSwitchBool MakeMain::rebuild(SwitchParser, 'B', false, {"always-make"});
CmdSwitchCombineString MakeMain::newFiles(SwitchParser, 'W', ' ', {"assume-new"});
CmdSwitchCombineString MakeMain::oldFiles(SwitchParser, 'o', ' ', {"assume-old"});
CmdSwitchCombineString MakeMain::dir(SwitchParser, 'C', '+', {"directory"});
CmdSwitchBool MakeMain::debug(SwitchParser, 'd'); // not implemented
CmdSwitchBool MakeMain::environOverride(SwitchParser, 'e', false, {"environment-overrides"});
CmdSwitchBool MakeMain::help(SwitchParser, 'h');
CmdSwitchCombineString MakeMain::includes(SwitchParser, 'I', ';', {"include-dir"});
CmdSwitchBool MakeMain::showDatabase(SwitchParser, 'p', false, {"print-data-base"});
CmdSwitchBool MakeMain::noBuiltinRules(SwitchParser, 'r', false, {"no-builtin-rules"});
CmdSwitchBool MakeMain::noBuiltinVars(SwitchParser, 'R', false, {"no-builtin-variables"});
CmdSwitchBool MakeMain::silent(SwitchParser, 's', false, {"quiet"});
CmdSwitchBool MakeMain::cancelKeep(SwitchParser, 'S', false, {"no-keep-going"});
CmdSwitchBool MakeMain::printDir(SwitchParser, 'w', false, {"print-directory"});
CmdSwitchBool MakeMain::warnUndef(SwitchParser, 'u');
CmdSwitchBool MakeMain::treeBuild(SwitchParser, 'T');
CmdSwitchBool MakeMain::keepResponseFiles(SwitchParser, 'K');
CmdSwitchInt MakeMain::jobs(SwitchParser, 'j', INT_MAX, 1, INT_MAX);
CmdSwitchString MakeMain::jobServer(SwitchParser, 0, 0, {"jobserver-auth"});
CmdSwitchCombineString MakeMain::jobOutputMode(SwitchParser, 'O');
const char* MakeMain::helpText =
"[options] goals\n"
"\n"
"/B Rebuild all /C Set directory\n"
"/Dxxx Define something /Ixxx Set include path\n"
"/K Keep response files /O Set output mode\n"
"/R Ignore builtin vars /S Cancel keepgoing\n"
"/T Tree Build /V Show version and date\n"
"/Wxxx WhatIf /d Reserved\n"
"/e Environment overrides /fxxx Specify make file\n"
"/h This text /i Ignore errors\n"
"/j:xx Set number of jobs /k Keep going\n"
"/n Display only /oxxx Specify old goals\n"
"/p Print database /q Query\n"
"/r Ignore builtin rules /s Don't print commands\n"
"/t Touch /u Debug warnings\n"
"/w Print make status --eval=STRING evaluate a statement\n"
"/! No logo /? or --help this help\n"
"--jobserver-auth=xxxx Name a jobserver to use for getting jobs\n"
"--version Show version info\n"
"--no-builtin-rules Ignore builtin rules\n"
"--no-builtin-vars Ignore builtin variables\n"
"\nTime: " __TIME__ " Date: " __DATE__;

@chatchoi
Copy link
Author

Will it ignore the unknown options or simply refused to run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants