minibug: 'mv' -> 'mv -f ' in main Makefile

From: Etienne Lorrain
Date: Thu Sep 29 2005 - 04:31:46 EST


Hi,

I've got to answer this question on RedHat FC4 when building a kernel
in verbose mode:
$ make V=1 /boot/linux-2.6.14-rc2.kgz
.. lot of log ...
set -e; if [ ! -r .version ]; then rm -f .version; echo 1 >.version;
else mv .version .old_version; expr 0$(cat .old_version) + 1 >.version;
fi; make -f scripts/Makefile.build obj=init
mv: overwrite `.old_version', overriding mode 0644? y

I do not know why it is only when verbose is ON.
Either add the -f option to mv (or alternatively call /bin/mv)
in this part of patch-2.6.14-rc2 file b/Makefile :

@@ -624,8 +644,13 @@ quiet_cmd_vmlinux__ ?= LD $@
# Generate new vmlinux version
quiet_cmd_vmlinux_version = GEN .version
cmd_vmlinux_version = set -e; \
- . $(srctree)/scripts/mkversion > .tmp_version; \
- mv -f .tmp_version .version; \
+ if [ ! -r .version ]; then \
+ rm -f .version; \
+ echo 1 >.version; \
+ else \
+ mv .version .old_version; \
+ expr 0$$(cat .old_version) + 1 >.version; \
+ fi; \
$(MAKE) $(build)=init

# Generate System.map

Etienne.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/