all: preparations for out-of-tree build

- Makefile: Prepare for out-of-tree build
  - Define CONFIG_MARS_BIGMODULE if build out-of-tree
  - Adjusted target for buildtag.h generation
  - Added target for mars_config.h generation (depends on Kconfig)
  - Commits 949c64e 3e1d566 167dd73 rebased on eaba743
- Added script gen_config.pl to generate mars_config.h from Kconfig
  (Commits f373687 dc92c2f bf863f2 rebased on eaba743)
- Include mars_config.h in mars.h/brick.h/brick_say.h
  (Commits 6f14e02 8f1b7d6 rebased on eaba743)

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
infra: add Makefile.dist for administrative targets (distribution)

Makefile.dist contains targets for distribution/packaging, such as
the generation of release tarballs, and other administrative tasks.

Commits 43770d2 dfcd866 b04bf8d 68b9f2e 191cc1a dd6db46 rebased on eaba743

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
marsadm: fix check_primary/check_not_primary to use actual state ('is-primary')

The actual state is decoded in 'actual-*/is-primary' links, while the target
state is decoded in the 'primary' link.
- check_primary() now uses actual state
- check_not_primary() now uses both actual state and target state

Commits c38a822 94ac15a rebased on eaba743

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
marsadm: renam _allowed_logdelete() to _min_nondeletable_logfile()

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
marsadm: use lamport clock for checking modification timestamps of symlinks

- Added mars_time() function returning lamport clock
- Renamed check_mtime to check_file_aged and fixed to use mars_time()
- Renamed check_all_mtimes to check_files_modified_any_of

Commits eb849e2 1be8700 fbb415a rebased on dfeb8e6

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
marsadm: use actual primary where appropriate instead of target primary

The actual primary is decoded in 'actual-*/is-primary' links, while the
target primary is decoded in the 'primary' link.  This is not clearly
taken into account in several functions of marsadm.  This commit fixes
this problem.

- Added _get_actual_primary() function
- Remove $pri parameter in _primary_res
- Use _get_actual_primary() where actual state should be used

Commits 3e96a5e 578d003 5dccbdc rebased to dfeb8e6

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>