-
Notifications
You must be signed in to change notification settings - Fork 0
/
README-hacking
122 lines (90 loc) · 5.22 KB
/
README-hacking
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
Hacking into GNU Astronomy Utilities
====================================
Copyright (C) 2015-2024 Free Software Foundation, Inc.
See the end of the file for license conditions.
This file is intended for those who are building and installing the version
controlled source of GNU Astronomy Utilities (Gnuastro) and not the tarball
release (see the 'README' file for the easier tarball installation and
general guide). This file is thus not distributed with the
tarball. Gnuastro's version controlled source can be cloned by running the
following command:
git clone git://git.sv.gnu.org/gnuastro.git
The cloned 'gnuastro' directory only contains files that were actually
written by hand as part of Gnuastro and not automatically generated files,
or files that we have taken fully from other packages (for example the GNU
Portability Library, Gnulib). Therefore, immediately after cloning,
Gnuastro is not ready to be configured, built, checked, or installed. You
have to "bootstrap" it first. Bootstrapping is the process of doing all the
automatic steps on the version controlled files and make everything ready
for you to run './configure' and compile a program. All these extra files
are automatically included in the release tarball for easy installation,
hence bootstrapping is not necessary when configuring from the tarball.
All the operations that are necessary to prepare you to run './configure'
in the version controlled source are managed by the 'bootstrap' file in
this top directory. 'bootstrap' is part of the Gnulib and is the only
outsider file that is version controlled in Gnuastro. It is configured with
the 'bootstrap.conf' file. Therefore, if you want to customize it, be sure
to keep the 'bootstrap' file untouched and only do your changes in
'bootstrap.conf' (any change in 'bootstrap' will be overridden when Gnulib
releases an update). 'bootstrap.conf' is heavily commented so you should be
able to easily go through it. It is read at the start of 'bootstrap'
operations and has hooks for you to define any operation after Gnulib
inclusion, and after all its operations are done.
Dependencies
------------
To bootstrap Gnuastro, you will need to have the following
dependencies. These are more fully discussed in the "Bootstrapping
dependencies" section of the Gnuastro book. The last three are probably
already present in your operating system's package management system.
- Gnulib and GNU Autoconf-archive. These two packages can be cloned by
the bootstrap script automatically. However, if you don't already have
them, we recommed to clone them separately as discussed below. They
should be in the same directory (let's call it 'DEVDIR', can be any
directory). These packages are regularly updated, so run 'git pull'
within the cloned directories to keep them up to date before
bootstrapping. See the "Bootstrapping dependencies" and "Bootstrapping"
sections of the book for more information.
DEVDIR=/home/yourusername/Development
cd $DEVDIR
git clone git://git.sv.gnu.org/gnulib.git
git clone git://git.sv.gnu.org/autoconf-archive.git
- TeX Live. It is used to generate the pdf and dvi figures and
manuals. You will need the PGFPlots and TiKZ packages to generate some
of the figures. You can download and install it from its official
webpage at: https://www.tug.org/texlive/
- GNU Autotools: Autoconf, Automake, Libtool, and M4 to do all the
preparations for an easy and portable configuration and build
system.
- help2man to generate man pages from the --help output.
- ImageMagick to convert some of the graphic formats to other formats to
use in different manual outputs.
Bootstrapping
-------------
The bootstrapping process is very simple. The simplest (and not
recommended) way is to just run the following command which will clone
Gnulib and download the appropriate GNU Autoconf archives directly under
you cloned 'gnuastro' directory.
./bootstrap # Needs internet connection every time.
The recommended way is to clone Gnulib and the Autoconf archives separately
(see above), then tell the script where to look for them. You will not need
an internet connection every time you decide to bootstrap, your 'gnuastro'
directory will be much cleaner, and if your other packages or projects
need these tools, you won't need to have multiple copies. Note that during
development, sometimes it can be convenient to remove all non-version
controlled files.
./bootstrap --copy --gnulib-srcdir=$DEVDIR/gnulib
Run ./bootstrap with the --help option for more information on running
this script.
CAUTION
-------
This file ('README-hacking') is only distributed with the version
controlled source and not the Gnuastro tarball. Without this file, the
'bootstrap' script will complain about not being checked-out and abort. So
be sure to keep this file where ever you want to run 'bootstrap'.
Copyright information
---------------------
Copyright (C) 2015-2024 Free Software Foundation, Inc.
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, with no Front-Cover Texts, and with no Back-Cover Texts.