kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'minimize-rebuild' of git://git.code.sf.net/u/bsomervi/hamlib
commit
d066243a00
|
@ -4,7 +4,7 @@
|
||||||
# AUTOMAKE_OPTIONS = dejagnu
|
# AUTOMAKE_OPTIONS = dejagnu
|
||||||
# DEJATOOL = testfreq testbcd testloc rigctl
|
# DEJATOOL = testfreq testbcd testloc rigctl
|
||||||
|
|
||||||
BUILT_SOURCES = hamlibdatetime.h
|
BUILT_SOURCES = $(builddir)/hamlibdatetime.h
|
||||||
|
|
||||||
DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum hamlibdatetime.h
|
DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum hamlibdatetime.h
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ rigsmtr_SOURCES = rigsmtr.c
|
||||||
rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c sprintflst.c sprintflst.h
|
rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c sprintflst.c sprintflst.h
|
||||||
|
|
||||||
# include generated include files ahead of any in sources
|
# include generated include files ahead of any in sources
|
||||||
rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_srcdir) $(AM_CPPFLAGS)
|
rigctl_CPPFLAGS = -I$(builddir)/tests -I$(srcdir) $(AM_CPPFLAGS)
|
||||||
|
|
||||||
# all the programs need this
|
# all the programs need this
|
||||||
LDADD = $(top_builddir)/src/libhamlib.la $(top_builddir)/lib/libmisc.la $(DL_LIBS)
|
LDADD = $(top_builddir)/src/libhamlib.la $(top_builddir)/lib/libmisc.la $(DL_LIBS)
|
||||||
|
@ -99,16 +99,27 @@ testloc.sh:
|
||||||
chmod +x ./testloc.sh
|
chmod +x ./testloc.sh
|
||||||
|
|
||||||
# If we have a .git directory then we will generate the hamlibdate.h
|
# If we have a .git directory then we will generate the hamlibdate.h
|
||||||
# file. If not, then copy the placeholder. Either way copy the result
|
# file and replace it if it is different. Fall back to a copy of a
|
||||||
# to the build directory for inclusion in compiles, which avoids race
|
# generic hamlibdatetime.h.in in the source tree. Build looks in build
|
||||||
# conditions with parallel builds.
|
# directory before the source directory for the hamlibdatetime.h
|
||||||
|
# header.
|
||||||
hamlibdatetime.h: FORCE
|
hamlibdatetime.h: FORCE
|
||||||
echo "SHA=$(SHA)"
|
@if test -x $(top_srcdir)/.git ; then \
|
||||||
test ! -x $(top_srcdir)/.git || echo "/* This date time is from the last non-merge commit to Hamlib. */" > $(top_srcdir)/tests/hamlibdatetime.h
|
echo "/* This date time is from the last non-merge commit to Hamlib. */" > $(builddir)/$(@F).tmp ;\
|
||||||
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 SHA=' --format='%cd' -n 1)$$(git --git-dir=$(top_srcdir)/.git log --no-merges | grep commit | head -n 1 | cut -c8-13)\" >> $(top_srcdir)/tests/hamlibdatetime.h
|
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 SHA=' --format='%cd' -n 1)$$(git --git-dir=$(top_srcdir)/.git log --no-merges | grep commit | head -n 1 | cut -c8-13)\" >> $(builddir)/$(@F).tmp ;\
|
||||||
test -f $(top_srcdir)/tests/hamlibdatetime.h || cp $(top_srcdir)/tests/hamlibdatetime.h.in $(top_srcdir)/tests/hamlibdatetime.h
|
diff -qN $(builddir)/$(@F).tmp $(builddir)/$(@F) ; test $$? -eq 0 || { echo "Generating SCS header \"$(builddir)/$(@F)\"" ; mv -f $(builddir)/$(@F).tmp $(builddir)/$(@F) ; } ;\
|
||||||
test $(top_srcdir) == $(top_builddir) || cp $(top_srcdir)/tests/hamlibdatetime.h $(top_builddir)/tests/;
|
rm -f $(builddir)/$(@F).tmp ;\
|
||||||
|
else \
|
||||||
|
test -f $(srcdir)/$(@F) || cp $(srcdir)/$(@F).in $(srcdir)/$(@F) ;\
|
||||||
|
fi
|
||||||
|
|
||||||
FORCE: ;
|
FORCE:
|
||||||
|
|
||||||
|
# If we are making a distribution out-of-source and we have generated
|
||||||
|
# a hamlibdatetime.h; then copy it to the tests directory of the
|
||||||
|
# source tarball so that downstream builds pick up the version
|
||||||
|
# information we know about.
|
||||||
|
dist-hook:
|
||||||
|
test ./ -ef $(srcdir)/ || test ! -f hamlibdatetime.h || cp -f hamlibdatetime.h $(srcdir)/
|
||||||
|
|
||||||
CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh
|
CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh
|
||||||
|
|
Ładowanie…
Reference in New Issue