Update README and minor changes logs

This commit is contained in:
Thraix
2019-10-10 21:54:53 +02:00
parent 17245655d4
commit 5c302b3363
3 changed files with 16 additions and 5 deletions
+9 -2
View File
@@ -29,13 +29,20 @@ This will install MakeGen into `/usr/bin/makegen`.
If you want it to be installed in another place just run `make` and copy the file to where you want it.
## Usage
### Config file
In order to create a MakeGen configuration file use the following command:
makegen --conf
makegen conf gen prompt
This will prompt you with all the needed configurations in order to create a Makefile which will compile your code.
When this is done it will create a file called `makegen.conf` which contains all relevant data for MakeGen to create a Makefile.
If you want to change your config you can modify the makegen.conf file or use makegens config command line interface.
To see the possible changes you can do see the help file by entering:
makegen conf
### Compiling
After that simply compile your code with:
makegen
@@ -52,4 +59,4 @@ If multiple options are given to MakeGen it will execute them in the following o
clean all install run
Since MakeGen generates include dependencies in your Makefile it can cause the Makefile to get very cluttered.
In order to make it less cluttered you can run `makegen --simple` which will generate (and run) a Makefile without header file dependencies.
In order to make it less cluttered you can run `makegen --simple` which will generate (and run) a Makefile without header file dependencies.
+7 -2
View File
@@ -149,7 +149,7 @@ int ConfigCLI::Gen(int argc, char** argv)
}
if(argc < 2)
{
LOG_ERROR("gen needs exactly one parameters");
LOG_ERROR("gen needs exactly one parameter");
return 1;
}
std::string option = argv[1];
@@ -292,7 +292,7 @@ int ConfigCLI::Get(int argc, char** argv, ConfigFile& config)
}
if(argc != 2)
{
LOG_ERROR("get needs exactly one parameters");
LOG_ERROR("get needs exactly one parameter");
return 1;
}
auto settingVectorMap = GetSettingVectorMap(config);
@@ -336,6 +336,11 @@ int ConfigCLI::Main(int argc, char** argv)
std::string command = argv[1];
if(command == "gen")
{
if(config)
{
LOG_ERROR("Config file already exist (makegen.conf)");
return 1;
}
return Gen(argc-1, &argv[1]);
}
else if(config)
-1
View File
@@ -188,6 +188,5 @@ int main(int argc, char** argv)
else
{
LOG_ERROR("No ", CONFIG_FILENAME, " or Makefile found.");
PrintHelp();
}
}