Rename tests/hamlibdatetime.h

Rename tests/hamlibdatetime.h to tests/hamlibdatetime.h.in which is
tracked and ignore tests/hamlibdatetime.h which is not tracked and will
be generated or copied depending on whether the top source directory is
a Git working tree or not.
pull/281/head
Nate Bargmann 2020-05-30 09:18:19 -05:00
rodzic b534f1b36e
commit 9bafc86fec
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F72625E2EDBED598
3 zmienionych plików z 4 dodań i 2 usunięć

2
.gitignore vendored
Wyświetl plik

@ -57,5 +57,5 @@ tests/rigsmtr
tests/rigswr
tests/rotctl
tests/rotctld
tests/hamlibdatetime.h
build/

Wyświetl plik

@ -96,8 +96,10 @@ testloc.sh:
echo './testloc EM79UT96LW 5' > testloc.sh
chmod +x ./testloc.sh
# If we have a .git directory then we will update the hamlibdate.h file
# If we have a .git directory then we will generate the hamlibdate.h file.
# if not, then copy the placeholder.
hamlibdatetime.h: FORCE
test -x $(top_srcdir)/.git || cp $(srcdir)/hamlibdatetime.h.in $(srcdir)/hamlibdatetime.h
test ! -x $(top_srcdir)/.git || echo "/* This date time is from the last non-merge commit to Hamlib. */" > $(srcdir)/hamlibdatetime.h
test ! -x $(top_srcdir)/.git || echo "#define HAMLIBDATETIME "\"$$(TZ=UTC git --git-dir=$(top_srcdir)/.git log --no-merges --date='format-local:%a %b %d %H:%M:%S %Y %z' --format='%cd' -n 1)\""" >> $(srcdir)/hamlibdatetime.h