History

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.

Jan Beulich committed 20 years ago

Commit fd5f0cd1 parent cc873e12 files · +11 −10Browse files

Showing the changes to scripts (1 of 2 files). Show all

Unified · Split

scripts/mkmakefile+4−1
@@ -10,7 +10,10 @@ · 9 unmodified lines
1010 # $4 - patchlevel
1111
1212
13−cat << EOF
13+test ! -r $2/Makefile -o -O $2/Makefile || exit 0
14+echo " GEN $2/Makefile"
15+
16+cat << EOF > $2/Makefile
1417 # Automatically generated by $0: don't edit
1518
1619 VERSION = $3

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t