mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Fix makefile not rebuilding rbversion.h in some cases
For example when running make VERSION="bla" Change-Id: I8f8833f0fb200828346ed0a6842a9340e3653932
This commit is contained in:
parent
92450a9924
commit
50c1de7092
2 changed files with 8 additions and 4 deletions
|
|
@ -6,19 +6,20 @@
|
|||
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
# \/ \/ \/ \/ \/
|
||||
|
||||
# Usage: genversion.sh destination-dir path-to-version.sh [source-root]
|
||||
# Usage: genversion.sh destination-dir version
|
||||
|
||||
# Generate rbversion.h file
|
||||
|
||||
# XXX DO NOT TWEAK VERSION HERE, EDIT version.sh INSTEAD
|
||||
|
||||
VERSION=`$2 $3`
|
||||
VERSION="$2"
|
||||
|
||||
cat > "$1/_rbversion.h" << EOF
|
||||
/* Generated by genversion.sh */
|
||||
#define RBVERSION "$VERSION"
|
||||
EOF
|
||||
|
||||
# Don't touch rbversion.h if it hasn't change, to avoid rebuilding stuff
|
||||
if [ -f "$1/rbversion.h" ]
|
||||
then if diff "$1/_rbversion.h" "$1/rbversion.h" > /dev/null
|
||||
then rm -f "$1/_rbversion.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue