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.
Showing the changes to scripts (1 of 2 files). Show all
Unified · Split
| @@ -10,7 +10,10 @@ · 9 unmodified lines | |||
| 10 | # $4 - patchlevel | 10 | # $4 - patchlevel |
| 11 | 11 | ||
| 12 | 12 | ||
| 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 | ||
| 14 | # Automatically generated by $0: don't edit | 17 | # Automatically generated by $0: don't edit |
| 15 | 18 | ||
| 16 | VERSION = $3 | 19 | VERSION = $3 |