summaryrefslogtreecommitdiff
path: root/README.SOFORT
blob: b909819d1f61ca9609173a6a020d89f17d896194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
sofort: portable software project skeleton
------------------------------------------

This README file aims to speed-up the initial use of sofort
with your own project while accounting for diverse groups
of learners.

On that note, and in addition to making the most out of this document,
you might want to join the (un)usually friendly #midipix channel on
the freenode irc network.

======================================================================

LEARN BY COMPARISON:

# git clone git://foss21.org/sofort
# git clone git://foss21.org/mdso
# diff -u  sofort/config.project mdso/config.project
# diff -ru sofort/project        mdso/project

======================================================================

LEARN BY EXAMPLE:

* mdso: basic configuration, explicit source list
https://git.foss21.org/cgit.cgi/mdso/

* bfirm: an external build project for libfirm, using wildcards
  in project/common.mk and project/headers.mk.
https://git.foss21.org/cgit.cgi/compilers/bfirm/

* sbpython3: an external build project for python3.x, utilizing
  sofort's config test framework (cfgtest.sh) and a custom config
  step (project/config/cfgdefs.sh).

======================================================================

LEARN BY INSTRUCTION:

First Use-Case: using sofort with an existing project
-- keep your original repository and the build project separate;
-- allow testing the new build system (sofort) against the old one;
-- merge the two at the time of your choice.

-- for the purpose of illustration:
:: foo  (directory containing your original project)
:: bfoo (directory containing the new build project)
:: temp (where you'll run configure, which could be bfoo or elsewhere)

* copy all files and folders from the top-level sofort repository
  into bfoo; the _include_ and _src_ sub-directories are place-holders,
  and may thus be removed.

* edit config.project, keeping all three components (front-end, shared,
  static) disabled for the time being.

* test that everything is ready:
  cd temp && /path/to/bfoo/configure --source-dir=/path/to/foo && make

* the default location for public (api) headers is include/foo/

* edit project/common.mk and project/headers.mk. Whether you use
  wildcards or explicit references to source files and headers is
  entirely up to you, and bears no effect on the build process.

* edit config.project again, and enable the relevant component(s), that
  is, any or all of front-end, shared, and static); note also that you
  may remove whichever portion of config.project that is irrelevant to
  your project.

* test again.

Second Use-Case: using sofort with a new project
-- keeping everything under a single repository;
-- no need to pass --source-dir=/path/to/foo to configure;
-- otherwise identical to the first use-case, as outlined above.

======================================================================