[DEV] wrong code specification
This commit is contained in:
parent
33688801bb
commit
cc397679bb
@ -7,7 +7,7 @@ Lutin permit simply to compile applications and library.
|
|||||||
|
|
||||||
To simply understand the use, we will use a simple library:
|
To simply understand the use, we will use a simple library:
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
git clone http://github.con/atria-soft/etk.git
|
git clone http://github.con/atria-soft/etk.git
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ compile a module: {#lutin_use_compile}
|
|||||||
|
|
||||||
It is really simple:
|
It is really simple:
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin yourModuleName
|
lutin yourModuleName
|
||||||
#example:
|
#example:
|
||||||
lutin etk
|
lutin etk
|
||||||
@ -47,7 +47,7 @@ Display help: {#lutin_use_options_help}
|
|||||||
|
|
||||||
Availlable everywhere ...
|
Availlable everywhere ...
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin -h
|
lutin -h
|
||||||
lutin --help
|
lutin --help
|
||||||
```
|
```
|
||||||
@ -61,7 +61,7 @@ At the end of the help you an see an help about the etk librery with the associa
|
|||||||
Build in color: {#lutin_use_options_color}
|
Build in color: {#lutin_use_options_color}
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin -C
|
lutin -C
|
||||||
lutin --color
|
lutin --color
|
||||||
```
|
```
|
||||||
@ -70,19 +70,19 @@ Display build line in pretty print mode: {#lutin_u
|
|||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
when an error apear, the gcc or clang compile line can be really unreadable:
|
when an error apear, the gcc or clang compile line can be really unreadable:
|
||||||
```bash
|
```{.sh}
|
||||||
g++ -o /home/heero/dev/plop/out/Linux_x86_64/release/build/gcc/etk/obj/etk/Color.cpp.o -I/home/heero/dev/plop/etk -std=c++11 -D__CPP_VERSION__=2011 -D__TARGET_OS__Linux -D__TARGET_ARCH__x86 -D__TARGET_ADDR__64BITS -D_REENTRANT -DNDEBUG -O3 -fpic -D__STDCPP_GNU__ -Wall -Wsign-compare -Wreturn-type -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wno-unused-variable -DMODE_RELEASE -c -MMD -MP /home/heero/dev/plop/etk/etk/Color.cpp
|
g++ -o /home/heero/dev/plop/out/Linux_x86_64/release/build/gcc/etk/obj/etk/Color.cpp.o -I/home/heero/dev/plop/etk -std=c++11 -D__CPP_VERSION__=2011 -D__TARGET_OS__Linux -D__TARGET_ARCH__x86 -D__TARGET_ADDR__64BITS -D_REENTRANT -DNDEBUG -O3 -fpic -D__STDCPP_GNU__ -Wall -Wsign-compare -Wreturn-type -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wno-unused-variable -DMODE_RELEASE -c -MMD -MP /home/heero/dev/plop/etk/etk/Color.cpp
|
||||||
```
|
```
|
||||||
|
|
||||||
whith this option you can transform this not obvious line in a readable line:
|
whith this option you can transform this not obvious line in a readable line:
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin -P
|
lutin -P
|
||||||
lutin --pretty
|
lutin --pretty
|
||||||
```
|
```
|
||||||
|
|
||||||
result:
|
result:
|
||||||
```bash
|
```{.sh}
|
||||||
g++ \
|
g++ \
|
||||||
-o /home/XXX/dev/out/Linux_x86_64/release/build/gcc/etk/obj/etk/Color.cpp.o \
|
-o /home/XXX/dev/out/Linux_x86_64/release/build/gcc/etk/obj/etk/Color.cpp.o \
|
||||||
-I/home/XXX/dev/etk \
|
-I/home/XXX/dev/etk \
|
||||||
@ -115,7 +115,7 @@ lutin log: {#lutin_use_options_log}
|
|||||||
|
|
||||||
Lutin have an internal log system. To enable or disable it just select your debug level with the option:
|
Lutin have an internal log system. To enable or disable it just select your debug level with the option:
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin -v4
|
lutin -v4
|
||||||
lutin --verbose 4
|
lutin --verbose 4
|
||||||
```
|
```
|
||||||
@ -134,7 +134,7 @@ Select the number of CPU core used: {#lutin_use_op
|
|||||||
|
|
||||||
By default lutin manage only 1 CPU core (faster to debug) but for speed requirement you can use use multiple core:
|
By default lutin manage only 1 CPU core (faster to debug) but for speed requirement you can use use multiple core:
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
#for 5 core
|
#for 5 core
|
||||||
lutin -j5
|
lutin -j5
|
||||||
lutin --jobs 5
|
lutin --jobs 5
|
||||||
@ -145,7 +145,7 @@ Force rebuild all: {#lutin_use_options_rebuild_for
|
|||||||
|
|
||||||
Sometime it is needed to rebuild all the program, just do:
|
Sometime it is needed to rebuild all the program, just do:
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin -B
|
lutin -B
|
||||||
lutin --force-build
|
lutin --force-build
|
||||||
# or remove the build directory
|
# or remove the build directory
|
||||||
@ -157,7 +157,7 @@ Force strip all library and programs: {#lutin_use_
|
|||||||
|
|
||||||
Force strip of output binary (remove symboles)
|
Force strip of output binary (remove symboles)
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin -s
|
lutin -s
|
||||||
lutin --force-strip
|
lutin --force-strip
|
||||||
```
|
```
|
||||||
@ -169,7 +169,7 @@ The main objective of lutin is managing the cross compilation to build from linu
|
|||||||
|
|
||||||
For android you can use:
|
For android you can use:
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin -t Android your-module
|
lutin -t Android your-module
|
||||||
lutin -t Windows your-module
|
lutin -t Windows your-module
|
||||||
```
|
```
|
||||||
@ -179,14 +179,14 @@ Build in debug mode: {#lutin_use_options_debug_rel
|
|||||||
|
|
||||||
To developp it is fasted with debug tools
|
To developp it is fasted with debug tools
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin -m debug your-module
|
lutin -m debug your-module
|
||||||
lutin -m release your-module
|
lutin -m release your-module
|
||||||
```
|
```
|
||||||
|
|
||||||
You can desire to have compilation optimisation when you build in debug mode:
|
You can desire to have compilation optimisation when you build in debug mode:
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin -m debug --force-optimisation your-module
|
lutin -m debug --force-optimisation your-module
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ Install your program after building it: {#lutin_us
|
|||||||
|
|
||||||
You can install your build module:
|
You can install your build module:
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
lutin -m debug your-module?build?install
|
lutin -m debug your-module?build?install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ Base of the module file: {#lutin_module_base_file}
|
|||||||
|
|
||||||
To create a new module you will use a generic naming:
|
To create a new module you will use a generic naming:
|
||||||
|
|
||||||
```
|
```{.sh}
|
||||||
lutin_module-name.py
|
lutin_module-name.py
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ Replace your ``module-name`` with the delivery you want. The name can contain [a
|
|||||||
|
|
||||||
In the module name you must define some values:
|
In the module name you must define some values:
|
||||||
|
|
||||||
```python
|
```{.py}
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import lutin.module as module
|
import lutin.module as module
|
||||||
import lutin.tools as tools
|
import lutin.tools as tools
|
||||||
@ -95,7 +95,7 @@ Create a new Module (LIBRARY): {#lutin_module_libr
|
|||||||
==============================
|
==============================
|
||||||
|
|
||||||
What to change:
|
What to change:
|
||||||
```python
|
```{.py}
|
||||||
def get_type():
|
def get_type():
|
||||||
return "LIBRARY"
|
return "LIBRARY"
|
||||||
```
|
```
|
||||||
@ -112,7 +112,7 @@ Generic Binary: {#lutin_module_binar
|
|||||||
---------------
|
---------------
|
||||||
|
|
||||||
What to change:
|
What to change:
|
||||||
```python
|
```{.py}
|
||||||
def get_type():
|
def get_type():
|
||||||
return "BINARY"
|
return "BINARY"
|
||||||
```
|
```
|
||||||
@ -126,7 +126,7 @@ Create a new Module (TEST-BINARY / TOOL-BINARY): {#lutin_module_binar
|
|||||||
Two binary are really usefull in developpement, the tools and the test-unit, This is the reason why we specify for this 2 cases.
|
Two binary are really usefull in developpement, the tools and the test-unit, This is the reason why we specify for this 2 cases.
|
||||||
|
|
||||||
Add the subElement description:
|
Add the subElement description:
|
||||||
```python
|
```{.py}
|
||||||
def get_type():
|
def get_type():
|
||||||
return "BINARY"
|
return "BINARY"
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ def get_sub_type():
|
|||||||
return "TEST"
|
return "TEST"
|
||||||
```
|
```
|
||||||
or:
|
or:
|
||||||
```python
|
```{.py}
|
||||||
def get_type():
|
def get_type():
|
||||||
return "BINARY"
|
return "BINARY"
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ Create a new Module (DATA): {#lutin_module_data
|
|||||||
This pode permit to only copy data and no dependency with compilling system
|
This pode permit to only copy data and no dependency with compilling system
|
||||||
|
|
||||||
What to change:
|
What to change:
|
||||||
```python
|
```{.py}
|
||||||
def get_type():
|
def get_type():
|
||||||
return "DATA"
|
return "DATA"
|
||||||
```
|
```
|
||||||
@ -163,7 +163,7 @@ Add file to compile: {#lutin_module_int
|
|||||||
|
|
||||||
This is simple: (you just need to specify all the file to compile)
|
This is simple: (you just need to specify all the file to compile)
|
||||||
|
|
||||||
```python
|
```{.py}
|
||||||
def create(target, module_name):
|
def create(target, module_name):
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ The developper must isolate the external include and internal include, then luti
|
|||||||
This permit to check error inclusion directly in developpement and separate the ```#include "XXX.h"``` and the ```#include <lib-xxx/XXX.h>```
|
This permit to check error inclusion directly in developpement and separate the ```#include "XXX.h"``` and the ```#include <lib-xxx/XXX.h>```
|
||||||
|
|
||||||
Add file to external include:
|
Add file to external include:
|
||||||
```python
|
```{.py}
|
||||||
def create(target, module_name):
|
def create(target, module_name):
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ def create(target, module_name):
|
|||||||
```
|
```
|
||||||
|
|
||||||
You can add a path to your local include:
|
You can add a path to your local include:
|
||||||
```python
|
```{.py}
|
||||||
def create(target, module_name):
|
def create(target, module_name):
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ Add Sub-dependency: {#lutin_module_int
|
|||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
All library need to add at minimum of a simple library (C lib) and other if needed. To do it jus call:
|
All library need to add at minimum of a simple library (C lib) and other if needed. To do it jus call:
|
||||||
```python
|
```{.py}
|
||||||
def create(target, module_name):
|
def create(target, module_name):
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ def create(target, module_name):
|
|||||||
```
|
```
|
||||||
|
|
||||||
The system can have optinnal sub-library, then if you just want to add an optionnal dependency:
|
The system can have optinnal sub-library, then if you just want to add an optionnal dependency:
|
||||||
```python
|
```{.py}
|
||||||
def create(target, module_name):
|
def create(target, module_name):
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ Compilation adn link flags/libs: {#lutin_module_int
|
|||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
It is possible to define local and external flags (external are set internal too):
|
It is possible to define local and external flags (external are set internal too):
|
||||||
```python
|
```{.py}
|
||||||
def create(target, module_name):
|
def create(target, module_name):
|
||||||
...
|
...
|
||||||
# external flags:
|
# external flags:
|
||||||
@ -263,7 +263,7 @@ build mode (release/debug): {#lutin_module_int
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
To add somes element dependent of the build mode:
|
To add somes element dependent of the build mode:
|
||||||
```python
|
```{.py}
|
||||||
def create(target, module_name):
|
def create(target, module_name):
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -280,7 +280,7 @@ build type target: {#lutin_module_int
|
|||||||
|
|
||||||
To add somes element dependent of the target type:
|
To add somes element dependent of the target type:
|
||||||
|
|
||||||
```python
|
```{.py}
|
||||||
def create(target, module_name):
|
def create(target, module_name):
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -308,7 +308,7 @@ Add some data in the install path (share path): {#lutin_module_in
|
|||||||
|
|
||||||
You can install a simple file:
|
You can install a simple file:
|
||||||
|
|
||||||
```python
|
```{.py}
|
||||||
def create(target, module_name):
|
def create(target, module_name):
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ def create(target, module_name):
|
|||||||
|
|
||||||
Copy multiple files (change path)
|
Copy multiple files (change path)
|
||||||
|
|
||||||
```python
|
```{.py}
|
||||||
def create(target, module_name):
|
def create(target, module_name):
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ display some debug to help writing code: {#lutin_module_in
|
|||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
|
|
||||||
```python
|
```{.py}
|
||||||
import lutin.debug as debug
|
import lutin.debug as debug
|
||||||
|
|
||||||
def function(...):
|
def function(...):
|
||||||
@ -350,12 +350,12 @@ A Full template: {#lutin_module_fu
|
|||||||
================
|
================
|
||||||
|
|
||||||
Create the file:
|
Create the file:
|
||||||
```
|
```{.sh}
|
||||||
lutin_module-name.py
|
lutin_module-name.py
|
||||||
```
|
```
|
||||||
|
|
||||||
With:
|
With:
|
||||||
```python
|
```{.py}
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import lutin.module as module
|
import lutin.module as module
|
||||||
import lutin.tools as tools
|
import lutin.tools as tools
|
||||||
|
@ -63,7 +63,7 @@ Install lutin:
|
|||||||
--------------
|
--------------
|
||||||
|
|
||||||
Just run:
|
Just run:
|
||||||
```bash
|
```{.sh}
|
||||||
pip install lutin
|
pip install lutin
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -71,24 +71,24 @@ Install pip:
|
|||||||
------------
|
------------
|
||||||
|
|
||||||
Install pip on debian/ubuntu:
|
Install pip on debian/ubuntu:
|
||||||
```bash
|
```{.sh}
|
||||||
sudo apt-get install pip
|
sudo apt-get install pip
|
||||||
```
|
```
|
||||||
|
|
||||||
Install pip on ARCH-linux:
|
Install pip on ARCH-linux:
|
||||||
```bash
|
```{.sh}
|
||||||
sudo pacman -S pip
|
sudo pacman -S pip
|
||||||
```
|
```
|
||||||
|
|
||||||
Install pip on MacOs:
|
Install pip on MacOs:
|
||||||
```bash
|
```{.sh}
|
||||||
sudo easy_install pip
|
sudo easy_install pip
|
||||||
```
|
```
|
||||||
|
|
||||||
Install from sources:
|
Install from sources:
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
```bash
|
```{.sh}
|
||||||
git clone http://github.com/HeeroYui/lutin.git
|
git clone http://github.com/HeeroYui/lutin.git
|
||||||
cd lutin
|
cd lutin
|
||||||
sudo ./setup.py install
|
sudo ./setup.py install
|
||||||
|
Loading…
Reference in New Issue
Block a user