kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Make version.cxx updating a little less aggressive
rodzic
38fabccefa
commit
46c6a88e3d
|
@ -25,4 +25,7 @@ hamlib-static:
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
check-version:
|
||||||
|
@build-aux/versionify src/dl_fldigi/version.cxx
|
||||||
|
|
||||||
EXTRA_DIST = build-aux/config.rpath
|
EXTRA_DIST = build-aux/config.rpath
|
||||||
|
|
|
@ -12,7 +12,7 @@ fi
|
||||||
COMMIT=`git log -1 | head -n1 | cut -d ' ' -f2`
|
COMMIT=`git log -1 | head -n1 | cut -d ' ' -f2`
|
||||||
SHORT_COMMIT=`git log -1 --oneline | cut -d ' ' -f1`
|
SHORT_COMMIT=`git log -1 --oneline | cut -d ' ' -f1`
|
||||||
|
|
||||||
cat > $FILE <<EOF
|
cat > $FILE.new <<EOF
|
||||||
/* See build-aux/versionify */
|
/* See build-aux/versionify */
|
||||||
#include "dl_fldigi/version.h"
|
#include "dl_fldigi/version.h"
|
||||||
|
|
||||||
|
@ -24,4 +24,17 @@ const char *git_short_commit = "$SHORT_COMMIT";
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "$COMMIT $SHORT_COMMIT > $FILE"
|
if [ ! -e $FILE ]; then
|
||||||
|
mv $FILE.new $FILE
|
||||||
|
echo "Created $FILE ($COMMIT $SHORT_COMMIT)"
|
||||||
|
else
|
||||||
|
CHANGED=0
|
||||||
|
diff -q $FILE $FILE.new >> /dev/null || CHANGED=1
|
||||||
|
if [ $CHANGED -eq 1 ]; then
|
||||||
|
mv $FILE.new $FILE
|
||||||
|
echo "Updated $FILE ($COMMIT $SHORT_COMMIT)"
|
||||||
|
else
|
||||||
|
rm $FILE.new
|
||||||
|
echo "$FILE does not require updating"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
|
@ -699,9 +699,9 @@ EXTRA_DIST = \
|
||||||
$(FLDIGI_FL_SRC) \
|
$(FLDIGI_FL_SRC) \
|
||||||
$(FLARQ_FL_SRC)
|
$(FLARQ_FL_SRC)
|
||||||
|
|
||||||
dl_fldigi/version.cxx :
|
../.git/logs/HEAD :
|
||||||
@test -f $(srcdir)/../build-aux/versionify && $(srcdir)/../build-aux/versionify $@ || true
|
|
||||||
|
|
||||||
dist-hook : dl_fldigi/version.cxx
|
dl_fldigi/version.cxx : ../.git/logs/HEAD
|
||||||
|
@test -f ../build-aux/versionify && ../build-aux/versionify dl_fldigi/version.cxx || true
|
||||||
|
|
||||||
.PHONY : dl_fldigi/version.cxx
|
dist-local : versionify
|
||||||
|
|
Ładowanie…
Reference in New Issue