mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
kbuild: Do not overwrite makefile as anohter user
Change the conditional of the outputmakefile rule to be evaluated entirely in make, and add a conditional to not touch the generated makefile when e.g. running 'make install' as root while the build was done as non-root. Also adjust the comment describing this, and move the message printing and redirection to mkmakefile. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
cc873e1aa1
commit
fd5f0cd6b0
2 changed files with 11 additions and 10 deletions
|
@ -10,7 +10,10 @@
|
|||
# $4 - patchlevel
|
||||
|
||||
|
||||
cat << EOF
|
||||
test ! -r $2/Makefile -o -O $2/Makefile || exit 0
|
||||
echo " GEN $2/Makefile"
|
||||
|
||||
cat << EOF > $2/Makefile
|
||||
# Automatically generated by $0: don't edit
|
||||
|
||||
VERSION = $3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue