Hello,
our Makefiles thorougly copy the environment suggested in LFS, even in
parts that are irrelevant (or even harmful) to non-interactive builds.
In particular:
1) the "set +h" is not needed because a separate copy of bash is fired
for each package, and there is no path hashing between separate copies
of bash
2) $INPUTRC is only relevant ro reading lines interactively from the
terminal
3) $PS1 only affects prompts and is completely unused while building
non-interactively
4) CFLAGS and CXXFLAGS can be omitted from the "env" lines because the
Makefile exports these variables from itself
5) The "-" in the "su" commands makes the new shell a login shell, but
there is no benefit in doing so because the new shell is non-interactive
anyway.
When this cruft gets removed, further simplification is possible:
Remove the differences in the chenv-pre-bash, chenv-post-bash and
chenv-blfs due to the facts that "/bin/sh -c ..." always works and the
environment there is just the same (yes, this means the /usr/bin/env ->
/tools/bin/env symlink). Remove the "chroot" command from all
packages/*/Makefile files and instead move it to the main Makefile and
adjust $PATH as an argument to $(std_build).
This simplification is important for me because it allows easily
replacing all "chroot" commands with, e.g., invocations of
qemu-system-x86_64.
Do you agree with the proposed changes?
--
Alexander E. Patrakov
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page