mk-project Documentation

Table of Contents

Next: , Up: (dir)   [Contents]

mk-project Documentation

mk-project 1.0.0, June 22, 2016

Brüggemann Eddie

Copyright © 2016, Brüggemann Eddie

Contents:


Next: , Previous: , Up: Top   [Contents]

1 `mk-project'


author: Brüggemann Eddie <mrcyberfighter@gmail.com>


program: mk-project


version: 1.0.0


language: C


release: June 22, 2016


Next: , Up: mk-project   [Contents]

1.1 Presentation

`mk-project' is a tool done to `ease the development process' and a good bridge for the distributing process. Especially with the `autotools'.

 

`mk-project' is a T.D.E (Terminal Development Environment): an `utility' used for the `development' of `programs', `libaries', `modules', `documentations' (in many formats, `man' `pages', `info' `books' or `pages'), and so soon...

 

`mk-project' is based on the make tool which on his turn, use severals utilities, for providing many features

and so many make targets.

Callable through a terminal, in preference (or through the G.U.I (Graphical User Interface) from `mk-project') ,

because of the wide number of targets provided and some take argument(s).

 

`mk-project' is an Environment in the terms of his wide field of targets which aren’t statically at all.

But `dynamically' `configurable', `changeable' and `creatable' and so that the grass becomes greener...

 

The targets are short string easy to remember and so you can make work

And not become an I.D.E (`I'ntegrated `D'evelopment `E'nvironment) `zombie' thrashing his head and knows !

But a proud well informed programmer which knows exactly how his system and environment works which can easily automate the task using the make syntax.

 

So `mk-project' wants to make you `the development easier' `without' forgetting our `computational' `roots' (TTY knows) !

 

Through providing you, through a `big' Makefile, which is generate, `entirely', according to your settings,

`the easiest way of build all in one'.

 

You can `edit' the Makefile at your convienence, of course `!'

Note: But think to notify the developers,

to inform them about your add-on(s) if you think it’s reliable and usable for others.

 

`mk-project' doesn’t claim to replace an `IDE' or others `building tools' but only give you an alternative

which you can entirely adapt to your requirement.

 

Note: For being `true' the make tool implementation and the way it make you the life easier

without forgetting your TTY Knows has impress me so that

I couldn’t develop a good project without it

or in others words:

If the make tool have never exist I would invent it...

Next: , Previous: , Up: mk-project   [Contents]

1.2 What provide `mk-project'

Note: At the time i write this documentation `mk-project' support only `3' differents programming languages:

  • * `C' or `C++' and `python'.

That’s poor `3' language, but `"I invite all the community to work together to take in charge more languages..."'


file: see this document for participating (You can become from the simple contributor to the entire coautor).

  • + Configuration settings are set through the string:
    • + `F' For false (disable option).
    • + `T' for true (enable option).
  • + Some few others variables:

    The variable $(SRC_FILES) is build from the variable $(SRC_DIR) which value is always: ./source.

    This mean if you want to add files manually (`if you doesn’t use the GUI for this task') to your Makefile,

    do it properly by using the $(SRC_DIR) variable:

    SRC_DIR   = ./source
    
    SRC_FILES = ${SRC_DIR}/my_file${EXT_SRC} \
                ${SRC_DIR}/subfolder/my_file${EXT_SRC}
    

    So you will add file(s) relativ to the ./source directory where source file(s) have to reside.


    note: Otherwise simply use the G.U.I for adding file(s) Project -> Add file(s) to project (Ctrl + a).


note: the docbook and latex format are used internaly.

`mk-project' provide a simple G.U.I composing of terminals and a menubar.

At first you can use the menu items to perform some actions like:

Once the new project is generated you can access to the make targets either through the `mk-project' G.U.I menubar (`simple click on the wanted target to execute it !').

Or from the terminal of `mk-project' or any else terminal at the condition to be in the Makefile current folder.


note: Simply type $ make help to get the list of available targets.

Warning: If you add some user-targets, to the Makefile(s), think at adding them to the $ make help output.

So that mk-project can auto-detect your target and list it to add it as menu item to the make targets.

If you add a bash comment on the same line it will be displayed as tooltip by overfly the menu items.


warning: Simply think to limit your entry at terminal maximal size: 79 characters.

So `mk-project' provide anothers terminals ordered in tabs which you can add, remove, and configurating.

For purpose of terminals editor users like vi, ed, emacs which can be easily launch an instance their favorite terminal editor in every tab all that continuing using the `mk-project' `interface'.

Finally you can switch between the single terminals -> make terminal Ctrl + m (which should stay in the Makefile current folder) and the terminals -> edit terminals Ctrl + m terminals using the menu radio items.


Next: , Previous: , Up: mk-project   [Contents]

1.3 How `mk-project' works


note: The answers is simply all is make in Makefiles, which will make you `the development easier'.


Next: , Previous: , Up: mk-project   [Contents]

1.4 Author(s)


Developers: Brüggemann Eddie


Documentation: Brüggemann Eddie


Next: , Previous: , Up: mk-project   [Contents]

1.5 Contributor(s)

`Become one !!!'


Previous: , Up: mk-project   [Contents]

1.6 The futur of `mk-project'


Up: The futur of mk-project   [Contents]

1.6.1 `mk-project' mic-on !!!

Note: The idea is to sit in front of the interface of `mk-project' (microphone on `!'),

writing the `source code' from your last creation:

And to say execute: make exec, or the target you want...

The `program' could `react' by `analysing your voice entry' and `executing the target' !!!

So that the build is `automate' by (`simple') `voice recognition'.

So you can write your `program' with your hands

and

`build it' with by emitting a `simple order' so that the `program execute the corresponding target',

if reconize...

`What do you think about it ?'


note: We could enchance `mk-project' in the way of Speech reconignition...


Next: , Previous: , Up: Top   [Contents]

2 Building a `mk-project' project


Next: , Up: Building a mk-project project   [Contents]

2.1 Starting

At first some basic informations will be required:


note: The license files will be copied into the project folder.

According to your settings some more informations will be required in relationship to the choosen programming language.


Next: , Previous: , Up: Building a mk-project project   [Contents]

2.2 Main informations

Independently to the choosen programming language you can give following informations:


Next: , Previous: , Up: Building a mk-project project   [Contents]

2.3 Specific to a `C'/`C++' project


Next: , Up: Specific to a C/C++ project   [Contents]

2.3.1 Compiler settings


Next: , Previous: , Up: Specific to a C/C++ project   [Contents]

2.3.2 Files

Here you must set the extension you will use for the source and header files.

Especially for the `C++' language:


note: For the `C' language this default to `.c' and `.h'.


Next: , Previous: , Up: Specific to a C/C++ project   [Contents]

2.3.3 Debugging

Here you can give the default options to pass to the debugging tools:


note: For further informations sea the mk-project code investigating, debugging and disassembling page.


Next: , Previous: , Up: Specific to a C/C++ project   [Contents]

2.3.4 `C'/`C++' code formatters

Here you can choose the code formatter(s) you want to use.


note: For further information sea the page: mk-project code formatters


Previous: , Up: Specific to a C/C++ project   [Contents]

2.3.5 About informations

Here you can set some informations about your program.


note: All this informations will generate some constant definition into the ./headers/defines.h file.


Previous: , Up: Building a mk-project project   [Contents]

2.4 Specific to a `Python' project


Next: , Up: Specific to a Python project   [Contents]

2.4.1 Python project

Here you can choose the version of python to use:

`or'

You can choose the `python' interpreter to use.

Warning: Your entry will be checked by testing a minimal script.


Next: , Previous: , Up: Specific to a Python project   [Contents]

2.4.2 `Python' code formatter

`mk-project' use pindent as python code formatter.


note: For further information sea the page: mk-project code formatters


Previous: , Up: Specific to a Python project   [Contents]

2.4.3 About informations

Here you can set some informations about your program.


Next: , Previous: , Up: Top   [Contents]

3 Working on an existing `mk-project' project


Next: , Up: Working on an existing mk-project project   [Contents]

3.1 Open an `mk-project' project

For opening an existing project you must make use of the *.mkp file from your project.

All targets will be available according to your settings.

Note: Else you can simply use a terminal to use the `mk-project' projects:

simply type make help in the project folder to sea the available targets.


Next: , Previous: , Up: Working on an existing mk-project project   [Contents]

3.2 Reconfiguring an existing project

Open the `mk-project' G.U.I and use the menu item Projects -> Reconfigure project (Ctrl + R)

to open the project reconfiguring project interface.

Here you can:


Previous: , Up: Working on an existing mk-project project   [Contents]

3.3 Adding files to your project

Open an existing project and then use the menu item Projects -> Add file(s) to project (Ctrl + A).

Then select the file(s) you want to add to your project.

Note: Take care of the checkbutton in the file chooser !

  • + In case of a `C'/`C++' project you can choose to add the corresponding `header' file to your project.

    If the header file doesn’t exist it will be create.

  • + In case of a `Python' project you can choose to add the corresponding `__init__.py' file to your project.

    If the `__init__.py' file doesn’t exist it will be create.

Warning: The file(s) must be in the ./source folder or subfolders from it !

Take care to organize your project properly so that all source files still in the ./source folder from your project !

Else you can add the file(s) to your project anyway but this can break your project tree if you rename the project folder.


note: It’s better to create subfolders from the ./source folder to organize your project properly !


Next: , Previous: , Up: Top   [Contents]

4 `mk-project' documentation


Next: , Up: mk-project documentation   [Contents]

4.1 `mk-project' supported languages

`mk-project' propose you to write simple documentation using `simple' markup languages:

Note: The Markdown language is not standardized inversely to the ReST language.

So it exist different dialects of the Markdown language.

`mk-project' use some packages to support this languages:


Next: , Previous: , Up: mk-project documentation   [Contents]

4.2 `mk-project' output formats

So `mk-project' support many output formats for this `simple' markup language:

Note: By using the texinfo syntax can have a makeinfo html output by using the `HTML' output format.

Likewise the divpdf output for texinfo input files.


Next: , Previous: , Up: mk-project documentation   [Contents]

4.3 `mk-project' input/output files

`mk-project' documentation is organized into meaningfull folders:

For input files you get a folder for every supported language which contains files clever named (for automatisation).

If your project is named my_project:

$ ls ./doc/md

my_project2epub.md   my_project2latex.md  my_project2plain.md
my_project2html5.md  my_project2man.md    my_project2xml.md
my_project2html.md   my_project2odt.md
my_project2info.md   my_project2pdf.md


$ ls ./doc/rst

my_project2epub.rst   my_project2latex.rst  my_project2plain.rst
my_project2html5.rst  my_project2man.rst    my_project2xml.rst
my_project2html.rst   my_project2odt.rst
my_project2info.rst   my_project2pdf.rst

$ ls ./doc/texinfo

my_project2epub.texi   my_project2latex.texi  my_project2plain.texi
my_project2html5.texi  my_project2man.texi    my_project2xml.texi
my_project2html.texi   my_project2odt.texi    my_project.texi
my_project2info.texi   my_project2pdf.texi

Note: The input files are composed from:

your project name - `2' (meaning conversion: to) - target format - .ext

Simply edit the output format(s) target file(s) and let `mk-project'

do the rest for you.

The output is organized in one folder for every output format:

  • * ./doc -> /html
  • * ./doc -> /html5
  • * ./doc -> /info
  • * ./doc -> /latex
  • * ./doc -> /man
  • * ./doc -> /odt
  • * ./doc -> /pdf
  • * ./doc -> /text
  • * ./doc -> /xml

Warning: Don’t rename the input files otherwise `mk-project' won’t be able to automate the conversion.

You can rename the output files when the work is `really' done.


Next: , Previous: , Up: mk-project documentation   [Contents]

4.4 mk-project documentation visualize

`mk-project' permit you to visualize all the output files in different manners:

`mk-project' will search severals documentation viewer programs on your installation.

  • * The make varibale `${BROWSER}' will link to your browser.
  • * The make variable `${INFO}' will link to the info program.
  • * The make variable `${MAN}' will link to the man program.
  • * The make variable `${EPUB}' will link to your epub viewer (fbreader or okular) if available.
  • * The make variable `${PDF}' will link to your pdf viewer if available.
  • * The make variable `${ODT}' will link to your odt files viewer if available.

Note: note: If `mk-project' doesn’t find a binary for viewing a file it will use the xdg-open program.


Next: , Previous: , Up: mk-project documentation   [Contents]

4.5 `mk-project' documentation target

The `mk-project' make target are clever named in the same manner as the files.

by typing make help The Makefile will output all available targets according your given settings:

$ make help

[...]

make texi2info   # Make info  doc file from *.texi file.
make texi2html   # Make html  doc file from *.texi file.
make texidvi2pdf # Make pdf   doc file from *.texi file.
make texi2text   # Make text  doc file from *.texi file.
make texi2html5  # Make html5 doc file from *.texi file.
make texi2pdf    # Make pdf   doc file from *.texi file.
make texi2man    # Make man   doc file from *.texi file.
make texi2odt    # Make odt   doc file from *.texi file.
make texi2latex  # Make latex doc file from *.texi file.
make texi2xml    # Make xml   doc file from *.texi file.
make texi2plain  # Make plain doc file from *.texi file.
make texi2epub   # Make epub  doc file from *.texi file.

make rst2html  # Make html  doc file from *.rst file.
make rst2pdf   # Make pdf   doc file from *.rst file.
make rst2man   # Make man   doc file from *.rst file.
make rst2odt   # Make man   doc file from *.rst file.
make rst2xml   # Make xml   doc file from *.rst file.
make rst2latex # Make latex doc file from *.rst file.
make rst2html5 # Make html5 doc file from *.rst file.
make rst2epub  # Make epub  doc file from *.rst file.
make rst2info  # Make info  doc file from *.rst file.
make rst2plain # Make plain doc file from *.rst file.

make md2html   # Make html  doc file from *.md file.
make md2html5  # Make html5 doc file from *.md file.
make md2pdf    # Make pdf   doc file from *.md file.
make md2man    # Make man   doc file from *.md file.
make md2odt    # Make odt   doc file from *.md file.
make md2xml    # Make xml   doc file from *.md file.
make md2latex  # Make latex doc file from *.md file.
make md2epub   # Make epub  doc file from *.md file.
make md2info   # Make info  doc file from *.md file.
make md2plain  # Make plain doc file from *.md file.

[...]

Next: , Previous: , Up: mk-project documentation   [Contents]

4.6 using others documentation tools

If you want to use a documentation tool like sphinx, doxygen or the one you use usually.

Their no problem if this meet the following 2 conditions:

You have to simply build a slot for your documentation generator into the `mk-project' Makefile.

Per example I’m using the sphinx documentation generator to write this documentation:

  1. So i make a folder for the sphinx project into the mk-project folder.
  2. And according to my settings sphinx generate a Makefile for building the documentation.
$ mkdir sphinx_doc

$ cd sphinx_doc

$ sphinx-quickstart

[...]

A Makefile and a Windows command file can be generated for you so that you
only have to run e.g. `make html' instead of invoking sphinx-build
directly.
> Create Makefile? (y/n) [y]: y

[...]

$ ls sphinx_doc
build  Makefile  source
  1. Build the slot in form of some few targets to add to the main Makefile of `mk-project'.
# sphinx slot.

.PHONY: sphinx-singlehtml sphinx-html sphinx-epub sphinx-info sphinx-man

# sphinx Makefile singlehtml target link.
sphinx-singlehtml:
      cd sphinx_doc ; ${MAKE} singlehtml ;

# sphinx Makefile html target link.
sphinx-html:
      cd sphinx_doc ; ${MAKE} html ;

# sphinx Makefile epub target link.
sphinx-epub:
      cd sphinx_doc ; ${MAKE} epub ;

# sphinx Makefile info target link.
sphinx-info:
      cd sphinx_doc ; ${MAKE} info ;

# sphinx Makefile man target link.
sphinx-man:
      cd sphinx_doc ; ${MAKE} man ;

# sphinx Makefile doctest target link.
sphinx-doctest:
      cd sphinx_doc ; ${MAKE} doctest


# sphinx builded files showing targets.
.PHONY: sphinx-show-singlehtml sphinx-show-html \
sphinx-show-epub sphinx-show-info sphinx-show-man

sphinx-show-singlehtml:
      cd ./sphinx_doc/build/singlehtml ; ${BROWSER} index.html ;

sphinx-show-html:
      cd ./sphinx_doc/build/html ; ${BROWSER} index.html ;

sphinx-show-epub:
      cd ./sphinx_doc/build/epub  ; ${EPUB} *.epub ;

sphinx-show-info:
      cd ./sphinx_doc/build/texinfo ; ${INFO} -f *.info ;

sphinx-show-man:
      cd ./sphinx_doc/build/man ; ${MAN} -f ${PRGNAME}.${MAN_LEVEL} ;

# sphinx clean target.
sphinx-clean:
      cd sphinx_doc ; cd build ; rm -R * ;

And so by writing this documentation

i alternate this 2 self-made targets

$ make sphinx-html

$ make sphinx-show-html

for writing and reading my documentation.

Into my sidebar terminal window of my I.T.E (Integrated Terminals Editor)

editor named it-edit1


Previous: , Up: mk-project documentation   [Contents]

4.7 Final word of mk-project documentation

Note: Think to analyze the possibilities provided by

  • * pandoc with his many configuration options.
  • * the python(3)-docutils tools (rst2epub, rst2html, rst2info, ...) documentation.
  • * The texinfo possibilities, per example the possiblity to read an entire book into your terminal through the makinfo tool and info files.

So all this possiblities `combined together in one' is the powerful `mk-project' documentation engine !!!

Or use your favorite documentation generator, as you want.


note: Think to inform the mk-project developers about your slots if you think it’s reliable and reusable for the others.


Next: , Previous: , Up: Top   [Contents]

5 `mk-project' code investigating, debugging and disassembling


Next: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.1 Introduction

You want to investigate in deep your binary cause of it bugs or simply per curiosity.

`mk-project' provide a lot of targets which will make your investigation easier.


Next: , Previous: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.2 The make info target

The make info target display simple informations about your program.

Using the file, size, ls -s -h utilities.


Next: , Up: The make info target   [Contents]

5.2.1 The file utility

The file utility print out the details about any filetype.

So if an executable file is given, the file utility will display informations about it.


Previous: , Up: The make info target   [Contents]

5.2.2 The size utility

The size utility print out the byte length of the main binary sections:

.text, .data and .bss.


Next: , Previous: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.3 The make gdb target

At first you can use the famous GNU/Debugger gdb for investigating your program,

by simply launching the target make gdb.

This will launch gdb in the `./bin' folder where your binary is located

with your program as argument.

Note: Given options to gdb:

For given supplementary options to gdb, which will be passed to gdb at every target call, edit the GDB_OPTS variable.

Else if you want to change the options for a unique call of gdb, by using the target.

Simply set the wanted options into the GDB_OPTS variable on the command line:

$ make gdb GDB_OPTS="--option value"

Next: , Previous: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.4 The make ldd target

The ldd utility show the complete list of dynamic librairies which your program will try to load (i.e. `The load time dependencies').

Note: Given options to ldd:

For given supplementary options to ldd, which will be passed to ldd at every target call, edit the LDD_OPTS variable.

Else if you want to change the options for a unique call of ldd, by using the target.

Simply set the wanted options into the LDD_OPTS variable on the command line:

$ make ldd LDD_OPTS="--option value"

Warning: Limitations of ldd:

  • * ldd cannot identify the libraries dynamically loaded at runtime using dlopen().
Be aware, however, that in some circumstances,

some version of ldd may attempt to obtain the dependencies

informations by directly executing the program.

Thus, you should never employ ldd on untrusted executables,

since this may result in the execution of arbitrary code.

A safer alternative when dealing with untrusted executables is following:

$ objdump -p /path/to/binary | grep NEEDED

# The same result result can be achieve
# using the readelf utility.

$ readelf -d /path/to/binary | grep NEEDED

Next: , Previous: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.5 The make nm target

The nm utility is used to list the symbols of a binary or object file(s).

It can also find the indicated symbol type.

Note: Given options to nm:

For given supplementary options to nm, which will be passed to nm at every target call, edit the NM_OPTS variable.

Else if you want to change the options for a unique call of nm, by using the target.

Simply set the wanted options into the NM_OPTS variable on the command line:

$ make nm NM_OPTS="--option value"

note: You can give the $(OBJECT) make variable as argument to nm instead of the binary.

Note: If the binary contains some `C++' code, the symbols are printed by default in mangled form.

Usage examples:

$ nm /path/to/prg

# List all symbols of prg (a binary or object file(s)).

$ nm -D /path/to/prg

# List only the symbols contains into the dynamic section(s)

# (exported or visible).

$ nm -C /path/to/prg

# List symbols in demangled form.

$ nm -D --no-demangle /path/to/prg

# List symbols in not demangled form.

$ nm -u /path/to/prg

# List undefined symbols.

Look at The 20 best nm commands2


Next: , Previous: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.6 The make objdump target

objdump is one of the most versatile utility program, so it can support about 50 others binary formats other than the ELF format.

Note: Given options to objdump:

For given supplementary options to objdump, which will be passed to objdump at every target call, edit the OBJDUMP_OPTS variable.

Else if you want to change the options for a unique call of objdump, by using the target.

Simply set the wanted options into the OBJDUMP_OPTS variable on the command line:

$ make objdump OBJDUMP_OPTS="--option value"

note: You can give the $(OBJECT) make variable as argument to objdump instead of the binary.

Usage examples:

$ objdump -f /path/to/prg

# Is used to obtain an insight into the object file(s) header.
# The header provide plenty of informations like
#
# * binary type
# * entry point (The start of the .text section)
# * etc..

$ objdump -h /path/to/prg

# Is used to list the avialable sections from the prg.

$ objdump -T /path/to/prg

# List dynamic symbols only.

# Is equivalent to running: $ nm -D /path/to/prg

$ objdump -t /path/to/prg

# Examines the dynamic section(s).

$ objdump -R /path/to/prg

# Examines the relocation section(s).

$ objdump -S -j <section name> /path/to/prg

# Provide the hexdump of the values carried by the given section.

$ objdump -p /path/to/prg

# Display informations about the ELF binary segments.

Usage example for code disasssembling using objdump:

$ objdump -d -M intel /path/to/prg

# Used to disassemble a binary using the Intel syntax.

$ objdump -d -S -M intel /path/to/prg

# Like above but interspercing the original source code.

$ objdump -d -M intel -j <section name> /path/to/prg

# This only works if the binary is compiled with the -g (debugging) option.

Next: , Previous: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.7 The make readelf target

The readelf utility provides almost completely duplicate functionnality found in the objdump tool.

Note: Given options to readelf:

For given supplementary options to readelf, which will be passed to readelf at every target call, edit the READELF_OPTS variable.

Else if you want to change the options for a unique call of readelf, by using the target.

Simply set the wanted options into the READELF_OPTS variable on the command line:

$ make readelf READELF_OPTS="--option value"

Usage examples:

$ readelf -h /path/to/prg

# Used to obtain an insight into the object file(s) header.

$ readelf -s /path/to/prg

# List the available sections.

$ readelf --symbols /path/to/prg

# List all symbols (Equal to running $ nm /path/to/prg).

$ readelf --dyn-syms /path/to/prg

# List dynamic symbols only (Equal to nm -D /path/to/prg).

$ readelf -r /path/to/prg

# Examines the relocation sections.

$ readelf -x <section name> /path/to/prg

# Provide a hexdump of the values carried by the given section.

$ readelf --segments /path/to/prg

# Display ELF segments informations.

$ readelf --debug-dump=<line>

Next: , Previous: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.8 The make strace target

The strace utility tracks down the `system calls' made by the `process' as well as the `signals' received by the `process'.

Note: Given options to strace:

For given supplementary options to strace, which will be passed to strace at every target call, edit the STRACE_OPTS variable.

Else if you want to change the options for a unique call of strace, by using the target.

Simply set the wanted options into the STRACE_OPTS variable on the command line:

$ make strace STRACE_OPTS="--option value"

Next: , Previous: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.9 The make ltrace target

The ltrace utility tracks down the `libraries calls' made by the `process'.

Note: Given options to ltrace:

For given supplementary options to ltrace, which will be passed to ltrace at every target call, edit the LTRACE_OPTS variable.

Else if you want to change the options for a unique call of ltrace, by using the target.

Simply set the wanted options into the LTRACE_OPTS variable on the command line:

$ make ltrace LTRACE_OPTS="--option value"

Next: , Previous: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.10 The make strip target

The strip utility can be used to eliminated all the symbols not needed in the process.

Note: Given options to strip:

For given supplementary options to strip, which will be passed to strip at every target call, edit the STRIP_OPTS variable.

Else if you want to change the options for a unique call of strip, by using the target.

Simply set the wanted options into the STRIP_OPTS variable on the command line:

$ make strip STRIP_OPTS="--option value"

Previous: , Up: mk-project code investigating debugging and disassembling   [Contents]

5.11 Documentation Source


authors: Stallman, McGrath, Smith.


author: Milan Stevanovic.


Next: , Previous: , Up: Top   [Contents]

6 `mk-project' code formatters


Next: , Up: mk-project code formatters   [Contents]

6.1 Introduction

`mk-project' provide severals utilities with many predefined targets for formatting your source code.


Next: , Up: Introduction<2>   [Contents]

6.1.1 For `C' or `C++' source code:


Previous: , Up: Introduction<2>   [Contents]

6.1.2 For python source code:


note: pindent can reformat malformed python source code but does nothing else as indenting your source code correctly.


Next: , Previous: , Up: mk-project code formatters   [Contents]

6.2 Using the indent utility

`mk-project' provide following predefined indent styles:

make indent-kr    # Format all source files in the kr style.
make indent-gnu   # Format all source files in the gnu style.
make indent-linux # Format all source files in the linux style.
make indent-orig  # Format all source files in the original style.
make indent-user  # Format all source files in the user defined style.

make indent-clean # Remove all formatted files with suffix.

note: The indent-user target use the given options during the project configuration for formatting your source code.

Note: By launching any code formatting target `mk-project' will output a copy of all your source files suffixed with the corresponding target name:

Per example by using the indent-kr target a file named main.c will ouput as main-kr.c.

For overwriting your source files really you must set the make variable OVERWRITE on the value `T'.

$ make indent-kr OVERWRITE=T

Previous: , Up: mk-project code formatters   [Contents]

6.3 Using the astyle utility

`mk-project' provide following predefined indent styles:

make astyle-ansi          # Format all source files in the ansi style.
make astyle-java          # Format all source files in the java style.
make astyle-kr            # Format all source files in the kr style.
make astyle-stroustrup    # Format all source files in the stroustrup style.
make astyle-whitesmith    # Format all source files in the whitesmith style.
make astyle-banner        # Format all source files in the banner style.
make astyle-gnu           # Format all source files in the gnu style.
make astyle-linux         # Format all source files in the linux style.
make astyle-horstmann     # Format all source files in the horstmann style.
make astyle-lisp          # Format all source files in the lisp style.
make astyle-pico          # Format all source files in the pico style.
make astyle-python        # Format all source files in the python style.
make astyle-user          # Format all source files in the user defined style.

make astyle-clean         # Remove all formatted files with suffix.

note: The astyle-user target use the given options during the project configuration for formatting your source code.

Note: By launching any code formatting target `mk-project' will output a copy of all your source files suffixed with the corresponding target name:

Per example by using the astyle-kr target a file named main.c will ouput as main-kr.c.

For overwriting your source files really you must set the make variable OVERWRITE on the value `T'.

$ make astyle-kr OVERWRITE=T

Next: , Previous: , Up: Top   [Contents]

7 `mk-project' contributing advices


Next: , Up: mk-project contributing advices   [Contents]

7.1 mk-project zen

mk-project zen is simple:

The minimum work for the user.

The maximum configuration possiblities.

+ Minimum informations ask to the user, maximum deduced.

+ Maximum possibilities, with a minimum informations and binaries.

Bring the maximum with the minimum.

! No package is obligatory except the coreutils
  and them needed by the programming language.

Next: , Previous: , Up: mk-project contributing advices   [Contents]

7.2 How contibute ?

Write a project for a programming language which isn’t done, or enhance one.


Next: , Up: How contibute ?   [Contents]

7.2.1 For writing a new project:

  1. Simply fork the project.
  2. Make a folder named lang_mk-project (per example: perl_mk-project).
  3. Put your stuff inside this folder.
  4. And ask for merging.

After your submission your project will be a mimimum tested and they is no matter of refusement only enhancement.


Next: , Previous: , Up: How contibute ?   [Contents]

7.2.2 Makefile

You can take the included makefiles (./.SubMakefiles/*.mk)

To put it into your project, this is highly recommanded, `don’t reinvent the wheel'.

We want targets for:


Next: , Previous: , Up: How contibute ?   [Contents]

7.2.3 Scripting

We script into `bash' or `python' (the script must be compatible with `python2' and `python3').

Or if your project is about a scripting language you can use this language.


warning: Think to modify the script prepend_license.py to adapt the comment sign from your language

It's easy even if you don't know python or

in the worse case i will do this for you.

Scripts are set into the ./.scripts folder.


Next: , Previous: , Up: How contibute ?   [Contents]

7.2.4 Becoming

If you create a `Makefile' project you become a `coauthor' of `mk-project'.

If you enhance a project you become a `contributor' of `mk-project'.

So if you submit a project for your well know language(s),

you will take first the benefit to get a `Project done' for `your programming language'.

And contribute to `mk-project'.


note: I will ensure the updating of the GUI at every new project adding.


Previous: , Up: How contibute ?   [Contents]

7.2.5 NOTES

I don’t want slaves who writes Makefiles, i want motivated `coauthors' from `mk-project'.

If you write the Makefile for your language, think at writing a minimal example project who writes

hello world welcome to mk-project

on stdout.

You can enhance your project with everything you want like the debugging definition in the C/C++ language,

and write entire module(s) for the project purpose.


Next: , Previous: , Up: mk-project contributing advices   [Contents]

7.3 Makefile


Next: , Up: Makefile<2>   [Contents]

7.3.1 BINARIES


note: Binaries test are in file ./.SubMakefiles/binary_checks.mk


Next: , Previous: , Up: Makefile<2>   [Contents]

7.3.2 VARIABLES


note: Take care by inserting comments some settings doesn’t support comments on the same line as the variable.


Next: , Previous: , Up: Makefile<2>   [Contents]

7.3.3 FILES and FILEPATH


note: Filepath are defined in file ./.SubMakefiles/path.mk


note: The included Makefiles are correctly named and end in the extension *.mk so that an editor can reconize them.


note: The included Makefiles are set in the SubMakefiles folder.


Next: , Previous: , Up: Makefile<2>   [Contents]

7.3.4 TARGETS

If you need to compose some targets names from more than a word, separate them by:


note: Don’t forget the .PHONY: definition if the target has no depdending targets.


Previous: , Up: Makefile<2>   [Contents]

7.3.5 ADVICES

`IMPORTANT:' make doesn’t support trailing spaces, so strip them.

You can use the following command

$ sed -i 's/[[:space:]]$//' filepath

Previous: , Up: mk-project contributing advices   [Contents]

7.4 code formatters

We can make usages of following utilities, for code formatting in severals languages:


Next: , Up: code formatters   [Contents]

7.4.1 C


Next: , Previous: , Up: code formatters   [Contents]

7.4.2 C++


Next: , Previous: , Up: code formatters   [Contents]

7.4.3 Python


note: Must check if we can use this scripts by the universalindentgui authors or the tools author(s).


Next: , Previous: , Up: code formatters   [Contents]

7.4.4 HTML


Next: , Previous: , Up: code formatters   [Contents]

7.4.5 CSS


Next: , Previous: , Up: code formatters   [Contents]

7.4.6 Javascipt


note: Must check if we can use this scripts by the universalindentgui authors or the tools author(s).


Next: , Previous: , Up: code formatters   [Contents]

7.4.7 Perl


Next: , Previous: , Up: code formatters   [Contents]

7.4.8 PHP


note: Must check if we can use this scripts by the universalindentgui authors or the tools author(s).


Next: , Previous: , Up: code formatters   [Contents]

7.4.9 Ruby


note: Must check if we can use this scripts by the universalindentgui authors or the tools author(s).


Next: , Previous: , Up: code formatters   [Contents]

7.4.10 XML


Previous: , Up: code formatters   [Contents]

7.4.11 Using a code formatter

The usage of a code formatter must be user defined controlled so that:

  1. We ask the user if he wants to use it.
  2. We make his usage conditionnaly in the corresponding Makefile: ./.SubMakefiles/code_formatter.mk.

By using a variable named USE_(TOOL NAME UPPERCASE) given the value:

According the user settings.


Next: , Previous: , Up: Top   [Contents]

8 `*.todo' or `*.tdo' file format specifications:

The *.todo specification give you a advice structure

of how structuring an TODO file for efficiently tasks

organizing, and so don’t forget ideas or things which

you may have to do in the future for the development

of projects of any professionnal fields where tasks

must be organized and be accomplished in an certains

order.


Next: , Up: * todo or * tdo file format specifications   [Contents]

8.1 Markup syntax

`Syntax of a mark:' [UPPERCASE :Capitalize: <digits>]

`Syntax of end mark:' [/UPPERCASE] # The end mark is good for reread his todo note.

An entire `*.todo' file entry can be represent like this:

=================
TITLE OF DOCUMENT
=================

[TYPE :Priority_level: <TASK_ORDER>] Title of todo entry

  Todo main text...

[/TYPE]

[TYPE :Priority_level: <TASK_ORDER>] One line todo entry [/TYPE]

Next: , Previous: , Up: * todo or * tdo file format specifications   [Contents]

8.2 Markup Types

`TYPE' (can be):


Next: , Up: Markup Types   [Contents]

8.2.1 Before complete the task:


Next: , Previous: , Up: Markup Types   [Contents]

8.2.2 After complete the task:


Previous: , Up: Markup Types   [Contents]

8.2.3 Summary of TYPE


Next: , Previous: , Up: * todo or * tdo file format specifications   [Contents]

8.3 Priority_level

`Priority_level' (can take following values:)


Next: , Previous: , Up: * todo or * tdo file format specifications   [Contents]

8.4 TASK_ORDER

`TASK_ORDER' (can be)

  1. a `2' (Maybe `3' or `4') digits sequences for organizing.
  2. a digit and a `UPPERCASE' letter with meaning:

note: the digit(s) are zero per default but it can take a value between 0-9 for very organized structures.


note: This can be ommit. Only `TYPE' and `Priority_level' are mandatory.


Summary: The `TASK_ORDER' are written between < and >.

Can be composed either of:


syntax: <[0-9][0-9|[F|N|U]|[I|W|F]]>


example: [TODO :Medium: <0F>] Make a new icon because actual is ugly !!! [/TODO]


Next: , Previous: , Up: * todo or * tdo file format specifications   [Contents]

8.5 Advices

`*.todo' files extensibility:

  1. Every entry `TYPE' can be invented but must be written in `UPPERCASE'.

advice: use only one word. (Else use `’_’').

`DFY' (`Don’t Forget Yourself: this make sens'),

`DRY' (`Don’t Repeat Yourself: don’t be stupid'),

`KISS' (`Keep It Simple Stupid: be concise').

  1. Priority level can be added as long as they are one Capitalize word.
  2. `DIY' (`Do It Yourself') for the `TASK_ORDER' or in order to maintain them ordered.

Advice: Keep terminal width max 79 chars a line.

The Best for the End: Think at things like timestamps,

doing order, prerequisite for task, and so soon !!!

Next: , Previous: , Up: * todo or * tdo file format specifications   [Contents]

8.6 Syntax of `*.todo' file(s) content

You can use the ReST or Markdown syntax for the content between or inside the marks.


Next: , Up: Syntax of * todo file s content   [Contents]

8.6.1 For Titles

==============
My first Title
==============

***************
My second title
***************

##############
My third title
##############

+++++++++++++++
My fourth title
+++++++++++++++

::::::::::::::
My fifth title
::::::::::::::

--------------
My sixth title
--------------

~~~~~~~~~~~~~~~~
My seventh title
~~~~~~~~~~~~~~~~

Next: , Previous: , Up: Syntax of * todo file s content   [Contents]

8.6.2 For text decorations:

**bold**

*italic*

_underline_

``inline literals``

--striketrough--

^^overline^^

Next: , Previous: , Up: Syntax of * todo file s content   [Contents]

8.6.3 For Lists:

+ List item 1

  - Sub list item 1

  - Sub list item 2

+ List item 2

  1. First numbered list item.

  2. Second numbered list item.

  3. Third numbered list item.

+ List item 3

  Defintion list title

    Defintion list text

Next: , Previous: , Up: Syntax of * todo file s content   [Contents]

8.6.4 For keywords values pairing:

:author: foo bar

:license: fdl

:version: 1.0.0

Next: , Previous: , Up: Syntax of * todo file s content   [Contents]

8.6.5 For links:

`Link text <http://www.domain.com/folder/file.html>`

Next: , Previous: , Up: Syntax of * todo file s content   [Contents]

8.6.6 For footnotes:

[*] my footnote text

Next: , Previous: , Up: Syntax of * todo file s content   [Contents]

8.6.7 For comments:

# My comment line

Previous: , Up: Syntax of * todo file s content   [Contents]

8.6.8 For code text:

[:LANGUAGE:]

  Indented text is code !

Per example for C code:

[:C:]

  const char *var = "value" ;

Next: , Previous: , Up: * todo or * tdo file format specifications   [Contents]

8.7 End word of specifications of the *.todo file(s) format

Do what you must with this specifications and take it like an TODO file

structuring advice, but this document was establish to define the

specifications of a clean TODO file.


Next: , Previous: , Up: * todo or * tdo file format specifications   [Contents]

8.8 Example of a *.todo file:

An example from a real *.todo file from one of my projects.

IT-EDIT TODO:
+++++++++++++

[IDEA :Low:] Advertissemnt for it-edit:

  it-edit provide so many schemes (more than the underlying libary per default)

  because per example the emacs scheme support italic for the ReST

  or Markdown language which the kate scheme doesn't support.

  But I think the kate scheme is more adapt, with his settings,

  for program source code writing in terms of syntax coloration.

  So better get 2 schemes, which you can easily switch, than missing a feature.

[/IDEA]

Editor
======

[IDEA :High:] Make the text-completion configurable.

  1. The text completion is one per file.

  2. The text-completion is one for all files (**not easy**).

[/IDEA]

[TODO :High:] Make the regex replacement become true. (See GLib regex) [/TODO]

[IDEA :Medium:] What about enable/disable spell-check ? [/IDEA]

Schemes
-------

[BUG :High:]

They is a highlight problem with the search all highlight with emacs schemes.

[/BUG]


[IDEA :low: <0F>]

Think of schemes pairs like:

  + kate && emacs (bg white)

  + cobalt && turbo (bg blue)

  + tango && classic (Are settings dependant).

  + vsdark && oblivion (bg marron).

  + slate && solarized-dark. (bg turquoise)

  + build && solarized-light (bg light yellow).

  + matrix (standalone).

[/IDEA]

Terminals
=========

[IDEA :Medium:] Terminal(s) configuration

  Maybe a (main start) settings individually for every differents terminals

  and/or a main (main  start) settings configuration. [/IDEA]

[TODO :Medium:] Open a file into an editor tab with a terminal pattern [/TODO]

Files
=====

[TODO :Medium:] Add a changelog entry !

  The clipboard from the terminals has been upgraded from severals functionalities.

[/TODO]

Previous: , Up: * todo or * tdo file format specifications   [Contents]

8.9 License

Copyright (c)  2016  Brüggemann Eddie.

Permission is granted to copy, distribute and/or modify this document

under the terms of the GNU Free Documentation License, Version 1.3

or any later version published by the Free Software Foundation;

with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

A copy of the license is included in the section entitled "GNU

Free Documentation License".

Previous: , Up: Top   [Contents]

9 About `mk-project'


author: Eddie Brüggemann <mrcyberfighter@gmail.com>


documenter: Eddie Brüggemann <mrcyberfighter@gmail.com>


Next: , Up: About mk-project   [Contents]

9.1 A word from the author

I must reconize to write a program which `generates' and `parse' `severals files' is `painfull' in the `C' `programming language'.

But I hope `that the community will adopt this usefull tool...'

I dislike I.D.E (Integrated Development Environment)’s because their advantages is their weak point:

They let you make forget everything once you have configurate their interface.

Even how to build your program (i.e. The command line to build your program, you know it ?).

`I use the commandline everyday' and by doing a `good compromise' between `automating task' and doesn’t forget `how the command works'.

Is issue `mk-project'...

The adding of the Edit terminals is suppose for ed, vi, emacs, etc users.

And the G.U.I make targets launching can be extend like explain in the presentation.

`Finally': I hope you will join us to make `mk-project' support more and more programming languages.


note: I have put all my `savoir-faire' in this project for you and the entire community.


Previous: , Up: About mk-project   [Contents]

9.2 Dependencies


Next: , Up: Dependencies   [Contents]

9.2.1 Libraries


Next: , Previous: , Up: Dependencies   [Contents]

9.2.2 Main program


Next: , Previous: , Up: Dependencies   [Contents]

9.2.3 Documentation


note: Only required if you make usage of them, else the corresponding target won’t be available.


Next: , Previous: , Up: Dependencies   [Contents]

9.2.4 Debugging


note: Only required if you make usage of them, else the corresponding target won’t be available.


Next: , Previous: , Up: Dependencies   [Contents]

9.2.5 Code formatters


note: Only required if you make usage of them, else the corresponding target won’t be available.


Next: , Previous: , Up: Dependencies   [Contents]

9.2.6 Internationalisation


note: Only required if you make usage of them, else the corresponding target won’t be available.


Previous: , Up: Dependencies   [Contents]

9.2.7 Documentation Source


authors: Stallman, McGrath, Smith.


author: Milan Stevanovic.


Footnotes

(1)

http://www.open-source-projects.net/IT-Edit/IT-Edit_presentation.html

(2)

http://www.thegeekstuff.com/2012/03/linux-nm-command