History log of /optee_os/mk/cleandirs.mk (Results 1 – 5 of 5)
Revision Date Author Comments
# 7ea0c708 24-May-2019 Jens Wiklander <jens.wiklander@linaro.org>

mk/cleandirs.mk: avoid print spurious empty lines

Fixes the macro do-rm-f from outputting spurious empty lines if supplied
a large list of files.

Reviewed-by: Jerome Forissier <jerome@forissier.org

mk/cleandirs.mk: avoid print spurious empty lines

Fixes the macro do-rm-f from outputting spurious empty lines if supplied
a large list of files.

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# bc0d2712 25-Oct-2017 Jerome Forissier <jerome.forissier@linaro.org>

make clean: split file list into manageable chunks

"make clean" might fail with the following error:

make[2]: execvp: /bin/bash: Argument list too long

This error was observed on a platform that

make clean: split file list into manageable chunks

"make clean" might fail with the following error:

make[2]: execvp: /bin/bash: Argument list too long

This error was observed on a platform that has lots of additional
source files compared to upstream (drivers, etc.), and that sets a long
output path on the command line (make ... O=/some/long/path).

Fix the error by splitting the file list into more manageable chunks.
Note that removing one file at a time is not reasonable, because
spawning too may shells takes quite a long time (up to 7-10 seconds to
"make clean").

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reported-by: Lijianhui <airbak.li@hisilicon.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 30a44336 07-Feb-2017 Jerome Forissier <jerome.forissier@linaro.org>

make clean: don't fail on non-empty directory

"make clean" may report errors when trying to clean with different
configuration values than the ones used during the build. For instance:

$ make -s CF

make clean: don't fail on non-empty directory

"make clean" may report errors when trying to clean with different
configuration values than the ones used during the build. For instance:

$ make -s CFG_RPMB_FS=y
$ make clean
CLEAN out/arm-plat-vexpress
rmdir: failed to remove 'out/arm-plat-vexpress/core/tee': Directory not empty
rmdir: failed to remove 'out/arm-plat-vexpress/core': Directory not empty
rmdir: failed to remove 'out/arm-plat-vexpress': Directory not empty
Makefile:88: recipe for target 'clean' failed
make: *** [clean] Error 1

The clean command should not fail, since the build tree was properly
cleaned for the requested configuration. Fix this by using
'rmdir --ignore-fail-on-non-empty'.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 6331a050 10-Jan-2017 Jerome Forissier <jerome.forissier@linaro.org>

mk/cleandirs.mk: don't fail if $(O) is not set

When mk/cleandirs.mk is included by the makefile of a TA, it can happen
that $(O) is empty. Handle this case properly so that "make clean" will
run wit

mk/cleandirs.mk: don't fail if $(O) is not set

When mk/cleandirs.mk is included by the makefile of a TA, it can happen
that $(O) is empty. Handle this case properly so that "make clean" will
run without error.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 9ac870c9 06-Jan-2017 Jerome Forissier <jerome.forissier@linaro.org>

Make sure "make clean" removes everything "make" has created under $(O)

"make clean" would leave behind some files and many directories. Fix
this by correctly tracking the files and directories crea

Make sure "make clean" removes everything "make" has created under $(O)

"make clean" would leave behind some files and many directories. Fix
this by correctly tracking the files and directories created under $(O)
during the build process:
- Fix incorrect file names in $(cleanfiles) and add a few missing
ones.
- Introduce a makefile macro: $(cleandirs-for-rmdir), defined in a new
file: mk/cleandirs.mk. It returns the list of directories that should
be removed, given a list of files.
The clean target removes the files, then all the directories in depth-
first order. $(O) is also removed, if found to be empty.

Note that a more straightforward approach was discussed in [1]: use
"rm -rf $(O)/some_dir" and get rid of the whole file and directory
tracking via $(cleanfiles) and $(cleandirs). Although it was agreed it
would be safe, doing so would necessarily break the backward
compatibility for build scripts relying on "make O=<some path>", due to
the additional level ($(O)/some_dir).

Finally, mk/cleandirs.mk is exported to the TA dev kit and the clean
rule for the TAs is updated.

[1] https://github.com/OP-TEE/optee_os/pull/1270

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Andy Green <andy@warmcat.com>

show more ...