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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
This is the list of functions used in jhalfs, excluding BLFS tool functions
and functions defined in {C,H}LFS/master.sh.
I felt the need for documenting it when trying to add package management.
Functions are listed in alphabetical order, with a short description and the
file where they are defined.
--------------------------------------------------------------------------
install_blfs_tools():
From common/libs/func_install_blfs.
Description: Copy the needed files to `BLFS_ROOT'. Initialize
the package tracking. Generates a `configuration' file from
the tool dependencies settings, and use it to generate
scriptlets from the blfs book. Uses those scriptlets to download the
needed tarballs. Then generates a Makefile for building the dependencies.
Called by: jhalfs
--------------------------------------------------------------------------
get_sources():
From common/libs/func_download_pkgs.
Description: Downloads packages if `GETPKG' is `y'. Writes package name
and md5 checksum to `MISSING_FILES.DMP' if a package cannot be found in
`$SRC_ARCHIVE' and cannot be downloaded, or if md5 checksum does not agree
book's one. If `MISSING_FILES.DMP' is not empty at the end of the process,
disable the excution of the makefile.
Actually, if `$BUILDDIR/sources' does not exist, it is not created if
`GETPKG' is `n'. And an empty or non existent `$BUILDDIR/sources' is
not flagged...
If `GETPKG' is `y', removes `MD5SUMS', `MISSING_FILES.DMP', and `urls.lst'
from `$BUILDDIR/sources' and generates them in the course of the process.
Called by: get_book and extract_commands
--------------------------------------------------------------------------
gs_wrt_message():
From common/libs/func_download_pkgs.
Description: internal function in get_sources. Writes a message to the screen
and a package name to `MISSING_FILES.DMP'.
--------------------------------------------------------------------------
create_urls():
From common/libs/func_download_pkgs.
Description: Runs xsltproc with stylesheet urls.xsl on chapter 3 of the
book. Add BLFS dependencies and custom dependencies if `BLFS_TOOLS' is `y'
and `CUSTOM_TOOLS' is `y' respectively.
Called by: get_sources
--------------------------------------------------------------------------
wrt_CustomTools_target():
From common/libs/func_custom_pkgs.
Description: Add users supplied scripts to `$JHALFSDIR/custom-tools', with
corresponding entry in the Makefile.
TODO: Add package management (instructions to user and Makefile entry)
Called by: All master.sh `build_Makefile'.
--------------------------------------------------------------------------
add_CustomToolsURLS():
From common/libs/func_custom_pkgs.
Description: Add any users supplied scripts URL information to urls.lst
Called by: create_urls
--------------------------------------------------------------------------
wrt_Makefile_header():
From common/libs/func_wrt_Makefile.
Description: Writes the beginning of the Makefile into $MKFILE, which created
or erased before.
Called by: All master.sh `build_Makefile'.
--------------------------------------------------------------------------
get_package_tarball_name():
From common/libs/func_wrt_Makefile.
Arguments: $1 contains the script_name
Description: Retrieves the tarball name from `pkg_tarball_list' by comparing
script-name to the beginning of a line in the list. Writes the name found
to stdout.
Implements the behavior described in README.CUSTOM, that is, if script_name
begins with d-, strip that part.
Called by: various functions in master.sh
--------------------------------------------------------------------------
LUSER_wrt_target():
From common/libs/func_wrt_Makefile.
Arguments: $1 contains target name; $2 contains dependency(ies)
Description: Add lines in the Makefile, which create target and
initialize log file.
LUSER version uses $MOUNT_PT in absolute path names.
Called by: chapter5_Makefiles and chapter6_Makefiles in LFS/master.sh
and other master.sh
--------------------------------------------------------------------------
CHROOT_wrt_target():
From common/libs/func_wrt_Makefile.
Arguments: $1 contains target name; $2 contains dependency(ies)
Description: Add lines in the Makefile, which create target and
initialize log file.
CHROOT version uses / in absolute path names.
Called by: chapter6_Makefiles and chapter78_Makefiles in LFS/master.sh
and other functions in other master.sh
--------------------------------------------------------------------------
LUSER_wrt_unpack():
From common/libs/func_wrt_Makefile.
Arguments: $1 contains tarball name; $2 contains 1 if the existing directory
is to be presserved.
Description: Add lines in the Makefile, which unpack and set 'ROOT' var and
remove existing dir if $2 != 1
LUSER version uses $MOUNT_PT in absolute path names.
Uses: Makefile functions remove_existing_dirs, unpack, get_pkg_root.
--------------------------------------------------------------------------
CHROOT_Unpack():
From common/libs/func_wrt_Makefile.
Arguments: $1 contains tarball name; $2 contains 1 if the existing directory
is to be presserved.
Description: Add lines in the Makefile, which unpack and set 'ROOT' var and
remove existing dir if $2 != 1
CHROOT version uses / in absolute path names.
Uses: Makefile functions remove_existing_dirs2, unpack2, get_pkg_root2.
--------------------------------------------------------------------------
LUSER_wrt_test_log():
From common/libs/func_wrt_Makefile.
Description: Add lines in the Makefile, which initialize testsuite
log file.
LUSER version uses $MOUNT_PT in absolute path names.
--------------------------------------------------------------------------
CHROOT_wrt_test_log():
From common/libs/func_wrt_Makefile.
Description: Add lines in the Makefile, which initialize testsuite
log file.
CHROOT version uses / in absolute path names.
--------------------------------------------------------------------------
wrt_RunAsRoot():
From common/libs/func_wrt_Makefile.
Description: Some scripts must be run as root..
--------------------------------------------------------------------------
LUSER_wrt_RunAsUser():
From common/libs/func_wrt_Makefile.
Description: Calculate time with perl, footer to log file
--------------------------------------------------------------------------
CHROOT_wrt_RunAsRoot():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
LUSER_wrt_CopyFstab():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
CHROOT_wrt_CopyFstab():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
LUSER_wrt_TouchTimestamp():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
CHROOT_wrt_TouchTimestamp():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
LUSER_wrt_LogNewFiles():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
CHROOT_wrt_LogNewFiles():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
LUSER_RemoveBuildDirs():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
CHROOT_wrt_RemoveBuildDirs():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
wrt_touch():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
wrt_compare_targets():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
wrt_system_build():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
wrt_compare_work():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
wrt_do_ica_work():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
wrt_logs():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
validate_config():
From common/libs/func_validate_configs.sh.
Description: Are the config values sane (within reason)
--------------------------------------------------------------------------
write_error_and_die():
From common/libs/func_validate_configs.sh.
Description:
--------------------------------------------------------------------------
validate_file():
From common/libs/func_validate_configs.sh.
Description:
--------------------------------------------------------------------------
validate_dir():
From common/libs/func_validate_configs.sh.
Description:
--------------------------------------------------------------------------
get_book():
From common/libs/func_book_parser.
Description:
--------------------------------------------------------------------------
extract_commands():
From common/libs/func_book_parser.
Description:
--------------------------------------------------------------------------
create_package_list():
From common/libs/func_book_parser.
Description:
--------------------------------------------------------------------------
check_version():
From common/libs/func_check_version.sh.
Description:
--------------------------------------------------------------------------
write_error_and_die():
From common/libs/func_check_version.sh.
Description:
--------------------------------------------------------------------------
check_prerequisites():
From common/libs/func_check_version.sh.
Description:
--------------------------------------------------------------------------
write_or_exit():
From common/progress_bar.sh.
Description:
--------------------------------------------------------------------------
no_empty_builddir():
From common/common-functions.
Description:
--------------------------------------------------------------------------
run_make():
From common/common-functions.
Description:
--------------------------------------------------------------------------
clean_builddir():
From common/common-functions.
Description:
--------------------------------------------------------------------------
simple_error():
From jhalfs.
Description: Basic error trap.... JUST DIE
--------------------------------------------------------------------------
see_ya():
From jhalfs.
Description:
--------------------------------------------------------------------------
chapter4_Makefiles():
From LFS/master.sh.
Description:
--------------------------------------------------------------------------
chapter5_Makefiles():
From LFS/master.sh.
Description:
--------------------------------------------------------------------------
chapter6_Makefiles():
From LFS/master.sh.
Description:
--------------------------------------------------------------------------
chapter78_Makefiles():
From LFS/master.sh.
Description:
--------------------------------------------------------------------------
build_Makefile():
From LFS/master.sh.
Description:
--------------------------------------------------------------------------
validate_opt_settings():
From optimize/optimize_functions.
Description: Show optimize setting and wait user agreement
--------------------------------------------------------------------------
wrt_optimize():
From optimize/optimize_functions.
Description: Apply pkg specific opt's to build
--------------------------------------------------------------------------
wrt_makeflags():
From optimize/optimize_functions.
Description: Apply MAKEFLAGS to build
--------------------------------------------------------------------------
|