lforget - forget about the state of a file or job
lforget [OPTION]... [FILE]...
lforget is used to forget about some of the history. In its first form, subsequent lmake(1) commands will forget about the build history of the mentioned targets. As a consequence, these targets will appear out-of-date. This is exceptionally useful in situations where lmake’s hypotheses are broken :
• |
A file outside the repo is modified. Because lmake does not track modifications outside the repo, it canot rerun jobs that must be rerun, this must be done manually. | ||
• |
An error is transient. Another option is to launch lmake -e which asks to consider jobs in error as out-of-date. |
lforget manages a fully coherent dir called a repo. When it starts, it first determines the root of the repo (cf. FILES below).
Arguments and reports are systematically localized to the current working dir. For example, if you launch lforget b from dir a in your repo, the argument is file a/b from the root of the repo and reports containing file names (initially seen from the root of the repo) will be shown relative the the current working dir.
These options
are common to all tools of the open-lmake set of
utilities :
--version
Print version and exit. Version is in the form "year.month.tag (key)" where "year.month" forms the major version, "tag" the minor version and "key" is indicates the format of the persistent information.
-h, --help
Print a short help and exit. It is composed of:
• |
The command line synoptic. | ||
• |
Version as described above. | ||
• |
A line for each supported option with its short name, long name, whether it has an argument and a short explanation. |
-J, --job
Passed arguments are interpreted as job names rather than as file names. Job names are the names that appear, for example, on start and done lines when lmake executes a job.
-R rule, --rule=rule
When the --job option is used, this options allows the specification of a rule, given by its name. This is necessary when the job name is ambiguous as several rules may lead to the same job name.
-q, --quiet
Do not generate user oriented messages. Strictly generate what is asked. This is practical if output is meant for automatic processing.
-S, --sync
Ensure server is launched (i.e. do not connect to an existing server) and wait for its termination. This is exceptionally useful in scripts that modify Lmakefile.py.
-v, --verbose
Generate more prolix output.
These options
are specific to lforget :
-d, --deps
In addition to being out-of-date, job will forget about hidden deps.
-r, --resources
This is a global option and no targets must be specified. Mark jobs that have been successfully built with old resources as out-of-date. This is useful in scenarios such as the following one :
• |
You have run jobs J1 and J2. J1 completed successfully but J2 lacked some memory and ended in error. | ||
• |
Then you have modified the allocated memory, increasing J2’s memory and decreasing J1’s memory because you think it is better balanced this way. | ||
• |
Then you remade both jobs. J2 reran because it was in error and now completes successfully. J1 did not rerun because it was ok and modifying some resources would not change the result. | ||
• |
However, it could be that now J1 does not have enough memory any more. It is not a problem in itself because its content is correct, but it may not be reproducible. | ||
• |
You want to make sure your repo is fully reproducible. | ||
• |
In that case, you run lforget -r. J1 will rerun because it was not run with the newer resources, as if its command was modified. J2 will not because it has already been run since then. |
-t, --targets
In addition to being out-of-date, job will forget about star targets.
The files Lmakefile.py or Lmakefile/__init__.py are searched in the current dir and in parent dirs. If a single one is found, this determines the root of the repo. If several are found, the existence of an LMAKE dir is checked. If a single one is found, this determines the root of the repo. In other cases, lforget will not start.
Where lmark(1) is used to instruct open-lmake not to run jobs that it considers out-of-date, lforget is used the opposite way, to instruct open-lmake to run jobs it considers up-to-date.
lautodep(1), lcheck_deps(1), ldebug(1), ldecode(1), ldepend(1), lencode(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 © 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/.