-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathUSING_SOURCE_FROM_GIT
129 lines (96 loc) · 4.63 KB
/
USING_SOURCE_FROM_GIT
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
HOWTO USE SOURCE CODE FOUND IN GIT
In GIT you will only find source code, and no generated files. The configure
script for example is generated from configure.ac file with autoconf tool,
so you will not find it here but need specific tools to build all kinds of files
that are usually included in released packages.
WARNING 1:
You must be aware of the GIT tree structure, if not, you will probably have
obtained the latest development version. Development version of dar is nothing
more, nothing less, than development! It may work or may not and may be in a
transition state. Do NOT USE DEVELOPMENT VERSION TO BACKUP YOUR SYSTEM!!!
WARNING 2:
No support will be provided for development source. DO NOT REPORT BUG about any
problem met with development version of dar, but rather participate to the
pre-release phases. DO NOT ASK FOR SUPPORT about a development version,
but rather preserve the developpers from doing anything else than development,
this will make development going faster and avoid them loosing precious time.
ACKNOLEDGMENT:
If you have read dar's documentation about the way GIT is used, and have
retrieved the latest version of a particular branch (not the `master' branch),
you are welcome to use this version for your own backup, ask for support in the
dar-support mailing-list (precising the way you got the source code). If you
find a problem with the latest release, and can still reproduce it with the
version of that branch, you are welcome to open a bug report.
COMPILATION IN BRIEF:
For a small program, you usually get a single source file to compile. But, when
the program becomes bigger, there is usually several files to compile and link
together to obtain an executable binary. As this operation is not that evident
and needs some understanding of the program implementation, usually the
developpers provide a Makefile that lead to a much more easy building process
(just type 'make' and the things goes on).
Here dar is not a small program, it uses several Makefiles, and overall it must
be able to work under Linux, Solaris, FreeBSD, MacOS X, Cygwin, and many other
operating systems. Thus a single type of Makefile will not work because system
include files, system libraries to link with do vary from system to system. For
that reason, automake, autoconf, libtool and gettext are used to generate the
correct Makefiles for the current system. These Makefiles, and the configure
script are usually provided in each released package, but here as they are
generated from other configuration file (Makefile.am and configure.ac), you
will have to generate these files yourself.
For that reason, you need the following tools:
- gnu M4 ( http://www.gnu.org/software/m4/ )
- autoconf ( http://www.gnu.org/software/autoconf/ )
- automake ( http://www.gnu.org/software/automake/ )
- libtool ( http://www.gnu.org/software/libtool/ )
- gettext ( ohttp://www.gnu.org/software/gettext/gettext.html )
If they are not present on your system, you must first install them.
You can then use the following demo script (it may work or not on
you system, that's more to be considered as a reminder of the different
steps to follow to build the configure script and Makefiles):
misc/init
Then you are ready to build dar as detailed in the documentation, in brief,
the following commands should correspond to most needs:
./configure
make
and as root:
make install-strip
For your information the following diagram may help you. Be aware that this
is a bit simplified.
If you just want to build a fresh tarball simply use:
misc/init
./configure
make dist
PACKAGING
==========
configure.ac -+-[autoconf]--> configure
|
\-[autoheader]--> config.h.in
Makefile.am ---[automake]---> Makefile.in
Makefile.in -+-[./configure]-+--> Makefile
| |
config.h.in -+ +--> config.h
Source code -+-[make dist]-+--> dar-<version>.tar.gz (standalone source package)
CONFIGURATION
==============
Makefile.in -+-[./configure]-+--> Makefile
| |
config.h.in -+ +--> config.h
COMPILATION/LINKING
====================
Makefile ---+--[make]--+
|
V
config.h ---+--------[gcc/ld]----> executables + libdar library
|
C++ source ---+
INSTALLATION
=============
Makefile ---+--[make]--+
|
V
executable ---+-[install/strip/cp/...]-+-> moved in destination directories
+libdar | |
| |
documentation -+ +-> doc. in destination directories
(man, html,
translations, ...)