LDEPEND

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
NOTES
SEE ALSO
COPYRIGHT

NAME

ldepend - report a dep from a open-lmake job

SYNOPSIS

ldepend [OPTION]... [FILE]...

DESCRIPTION

ldepend may be used to pass flags to open-lmake.

Each dep is associated with an access pattern. Accesses are of 3 kinds, regular, link and stat:

Regular means that the file was accessed using open(2) or similar, i.e. the job is sensitive to the file content if it is a regular file, but not to the target in case it is a symbolic link.

Link means that the file was accessed using readlink(2) or similar, i.e. the job is sensitive to the target if it is a symbolic link, but not to the content in case it is a regular file.

Stat means that the file meta-data were accessed, i.e. the job is sensitive to file existence and type, but not to the content or its target.

If a file have none of these accesses, changing it will not trigger a rebuild, but it is still a dep as in case it is in error, this will prevent the job from being run. Making such dinstinctions is most useful for the automatic processing of symbolic links. For example, if file a/b is opened for reading, and it turns out to be a symbolic link to c, open-lmake will set a dep to a/b as a link, and to a/c as a link (in case it is itself a link) and regular (as it is opened).

By default, passed deps are associated with no access, but are required to be buildable and produced without error. To simulate a plain access, you need to pass the --read option to associate accesses and the --no-required to allow it not to exist.

Note that :

Generated deps are parallel, i.e. a modification on a dep will not mask an error on another one (cf. note (3)).

Deps are acquired all at once (cf. note (4)).

Flags can be passed in (cf OPTIONS below). Flags accumulate and will apply even if the file is independently accessed.

Deps are reported even if the autodep method (the autodep rule attribute) is none. This is the way (or a call to lmake.depend) of reporting deps in such a case (usually with --read).

OPTIONS

-L, --follow-symlinks

Follow the last level symbolic link, default is not to follow.

-v, --verbose

Write lines composed of the checksum and the name separated by a space for each required dep.
The checksum is :
unknown

the checksum could not be computed, typically because the file is a special file (such as a device for example)

none

the file does not exist

empty-R

the file is an empty non-executable regular file

<checksum>-R

the file is a regular file , <checksum> is 16-digit hexadecimal number computed after its content (the exe permission is taken into account when computing checksum)

<checksum>-L

the file is a symbolic link, <checksum> is 16-digit hexadecimal number computed on the link (not the content of the target of the link)

-R, --read

Report an actual read. Default is to only alter flags.

-c, --critical

Create critical deps (cf. note (5)).

-E, --essential

Passed deps will appear in the flow shown with a graphical tool.

-e, --ignore-error

Ignore the error status of the passed deps.

-r, --no-required

Accept that deps be not buildable, as for a normal read access (in such a case, the read may fail, but open-lmake is ok).

-I, --ignore

Deps are ignored altogether, even if further accessed (but previous accesses are kept).

-X, --regexpr

Pass flags to all deps matching regexprs passed as argument. The ignore flag only applies to targets following this command. Default is to optimize dep check as much as possible.

NOTES

(1)

The same functionality is provided with the lmake.depend python function.

(2)

Flags can be associated to deps on a regexpr (matching on dep name) basis by using the side_deps rule attribute.

(3)

If cat a b is executed, open-lmake sees 2 open(2) system calls, to a then to b, exactly the same sequence that if one did cat $(cat a) and a contained b.

Suppose now that b is an error. This is a reason for your job to be in error. But if a is modified, in the former case, this cannot solve your error while in the latter case, it may if the new content of a points to a file that may successfully be built. Because open-lmake cannot distinguish between the 2 cases, upon a modification of a, the job will be rerun in the hope that b is not accessed any more. Parallel deps prevents this trial.

(4)

If a series of files are read in a loop and the loop is written in such a way as to stop on the first error and if the series of file does not depend on the actual content of said files, then it is preferable to pre-access (using ldepend) all files before starting the loop. The reason is that without this precaution, deps will be discovered one by one and may be built serially instead of all of them in parallel.

(5)

If a series of dep is directly derived from the content of a file, it may be wise to declare it as critical. When a critical dep is modified, open-lmake forgets about deps reported after it.

Usually, when a file is modified, this has no influence on the list of files that are accessed after it, and open-lmake anticipates this by building these deps speculatively. But in some situations, it is almost certain that there will be an influence and it is preferable not to anticipate. this is what critical deps are made for: in case of modifications, following deps are not built speculatively.

SEE ALSO

lautodep(1), lcheck_deps(1), ldebug(1), ldecode(1), lencode(1), lforget(1), lmake(1), lmark(1), lrepair(1), lrun_cc(1), lshow(1), ltarget(1), xxhsum(1)

The python module lmake.

The full open-lmake documentation in <open-lmake-installation-dir>/docs/index.html.

COPYRIGHT

Copyright © 2023-2025, Doliam. This file is part of open-lmake.

open-lmake is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.

open-lmake is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.