Fix blfs tools Makefile now that MAKEFLAGS is set

Previously, the "update" target was just added to the end of
the "all" target prerequisites, so that it was run at the end.
But now, we enter make with some -j value in MAKEFLAGS, so that
the "update" target may well be run before the other targets, which
is wrong: for example if it is run before the "xxx-z-libxslt" target,
xsltproc is not found and the update target fails.
To fix, define "update" as the default target, and have it depend
on "all".
This commit is contained in:
Pierre Labastie 2023-11-17 13:59:06 +01:00
parent d18fc24d5b
commit da4bce358d
1 changed files with 2 additions and 2 deletions

View File

@ -218,10 +218,10 @@ pushd $BUILDDIR$BLFS_ROOT/work
# installation, using libxslt, which is not installed yet. So move
# updating to the end of the process, adding an 'update' target
sed -i -e '/xsltproc/,+6d' \
-e '/^all/s@$@ update@' \
-e '/^all/i update:' \
-e 's/touch/@touch/' Makefile
cat >> Makefile << EOF
update:
update: all
@echo Updating the tracking file
@for pack in \$\$(grep '<productname' ../$LFS_XML/tmp/lfs-full.xml | \\
sed 's/.*>\([^<]*\)<.*/\1/' | \\