Closed smalltalkman closed 4 months ago
OK, I think I see what's going on. The POSIX standard for make
says:
The execution line shall then be executed by a shell as if it were passed as the argument to the system() interface, except that if errors are not being ignored then the shell -e option shall also be in effect.
However, it seems that modern versions of make
(GNU and BSD) don't set the shell -e
option when executing commands, whereas make
in busybox-w32 did. As a result any failure of a command in a synchronous list like false; echo OK
would cause the target to fail.
I've altered busybox-w32 make
to skip the shell -e
option, as an extension. The strict POSIX behaviour still applies in POSIX mode, but that isn't the default.
Please try the latest prerelease binary (PRE-5327 or above).
Please try the latest prerelease binary (PRE-5327 or above).
Great, it works fine:
#
# wget https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz
# tar -zxvf make-4.4.1.tar.gz
#
# cp -rp make-4.4.1 make-4.4.1.orig
# cd make-4.4.1
#
# ./configure --build=$(gcc -dumpmachine) --prefix=$ROOT/usr/local
#
# install_busybox
#
# make
# make check
# make install
# make uninstall
#
# uninstall_busybox
#
It would be nice if busybox-w32 make could call internal commands directly. I now have to install busybox to PATH in order to use make. (I am not familiar with busybox architecture, please ignore my ignorance)
It would be nice if busybox-w32 make could call internal commands directly. I now have to install busybox to PATH in order to use make.
I'm not sure why that would be. busybox-w32 make
should always use the busybox-w32 shell to run commands so no reference to PATH
should be necessary.
It would be nice if busybox-w32 make could call internal commands directly. I now have to install busybox to PATH in order to use make.
After detailed testing, it was confirmed that the commands that need to be installed in the PATH are all called by creating a new process by gnu make
during the make check
process, so they have nothing to do with busybox-w32 make
.
When executing the following Makefile snippet:
Actual execution of the command:
When
perl ./run_make_tests.pl
returns non-zero, the commandecho $? >.test-result
in(cd tests && perl ./run_make_tests.pl; echo $? >.test-result) 2>&1 | tee test-suite.log;
was not executed.Executing
(cd tests && perl ./run_make_tests.pl; echo $? >.test-result) 2>&1 | tee test-suite.log;
insh
can get the correct results.Similar to (https://github.com/rmyorston/busybox-w32/issues/408), subsequent commands continue to run when using gnu make (although busybox sh is still used). The difference is that (https://github.com/rmyorston/busybox-w32/issues/408) the reason is that the command ulimit cannot be found, while the current scenario is that the perl script returns a non-zero value.