[jhalfs] branch trunk updated: Make "devices" an "order only" target
"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Wed, 26 Nov 2025 12:38:46 +0000
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <176416072679.29211.14260512080943530176@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch trunk
in repository jhalfs.
The following commit(s) were added to refs/heads/trunk by this push:
new 8a796f8 Make "devices" an "order only" target
8a796f8 is described below
commit 8a796f8fb3f510ab1bc737f0515872d0542b44f3
Author: Pierre Labastie <[email protected]>
AuthorDate: Tue Oct 28 09:35:01 2025 +0100
Make "devices" an "order only" target
In the generated Makefile, we have a number of targets that depend
on the "devices" target, because virtual kernel fs have to be
mounted when running those targets. Problem is that "devices" is
.PHONY, so that it is unconditionally run, and then, all targets
that depend on it are run to. If restarting "make" after say, a
failure, this means some targets may be run again. Usually, it
is not a problem, because those targets only call make with another
target, and if this other target has been run, then nothing is done.
But it may happen that a target depending on "devices" also does some
file creation/removal or some kind of garbage collection (remove lfs
user e.g.). Trying to remove again a removed file, for example, would
fail. Removing the lfs user produces an error (ignored because we
add a dash before the command), etc.
Instead of guarding (ignoring) against errors, it is much better to
make "devices" an "order only" target (add a | char before it).
---
LFS/master.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/LFS/master.sh b/LFS/master.sh
index f9b2ce5..a836524 100644
--- a/LFS/master.sh
+++ b/LFS/master.sh
@@ -376,25 +376,25 @@ mk_SUDO: mk_LUSER
@sudo make BREAKPOINT=\$(BREAKPOINT) SUDO
@touch \$@
-mk_CHROOT: mk_SUDO devices
+mk_CHROOT: mk_SUDO | devices
@sudo make remove-luser
@\$(call echo_CHROOT_request)
@( sudo \$(CHROOT1) -c "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT")
@touch \$@
-mk_BOOT: mk_CHROOT devices
+mk_BOOT: mk_CHROOT | devices
@\$(call echo_CHROOT_request)
@( sudo \$(CHROOT1) -c "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT")
@touch \$@
-mk_BLFS_TOOL: create-sbu_du-report devices
+mk_BLFS_TOOL: create-sbu_du-report | devices
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
(sudo \$(CHROOT1) -c "make -C $BLFS_ROOT/work"); \\
fi;
@touch \$@
-mk_CUSTOM_TOOLS: mk_BLFS_TOOL devices
+mk_CUSTOM_TOOLS: mk_BLFS_TOOL | devices
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page