Use a trick to verify git is there. configure.ac falls back to /usr/bin/false if git is missing from the path, so any git command will fail. Since we check whether we're in a git directory first (to handle tarballs) this will fail with /usr/bin/false and that code-path is not met.
Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- configure.ac | 1 + data/Makefile.am | 13 +++++++++++-- data/layouts/Makefile.am | 10 +++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 291cabe..8d3bf91 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,7 @@ AC_PROG_INSTALL PKG_PROG_PKG_CONFIG AC_PATH_PROG(SED, sed) AC_PATH_PROG(GREP, grep) +AC_PATH_PROGS(GIT, git false) # fail any git command if we can't find git AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], [yes], [no]) AM_CONDITIONAL(HAVE_DOXYGEN, test "x$HAVE_DOXYGEN" = xyes) diff --git a/data/Makefile.am b/data/Makefile.am index dc39076..8285f02 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -3,7 +3,8 @@ tablet_files = $(shell find $(top_srcdir)/data -name "*.tablet" -printf "%P\n") dist_libwacomtablet_DATA = $(tablet_files) libwacomstylusdir = $(datadir)/libwacom -dist_libwacomstylus_DATA = $(shell find $(top_srcdir)/data -name "*.stylus" -printf "%P\n") +stylus_files = $(shell find $(top_srcdir)/data -name "*.stylus" -printf "%P\n") +dist_libwacomstylus_DATA = $(stylus_files) EXTRA_DIST = wacom.example @@ -16,4 +17,12 @@ check: test -e "$(top_srcdir)/data/layouts/$$svg" || ( \ echo "ERROR: File $$file references nonexistent $$svg" && test); \ rc="$$(($$rc + $$?))"; \ - done && test 0 -eq $$rc + done && test 0 -eq $$rc; + @(export GIT_DIR="$(top_srcdir)/.git"; \ + if $(GIT) ls-files >& /dev/null; then \ + for file in $(tablet_files) $(stylus_files); do \ + $(GIT) ls-files --error-unmatch "data/$$file" &> /dev/null || ( \ + echo "ERROR: File $$file is not in git" && test); \ + rc="$$(($$rc + $$?))"; \ + done && test 0 -eq $$rc; \ + fi) diff --git a/data/layouts/Makefile.am b/data/layouts/Makefile.am index d258a3e..7e2cb27 100644 --- a/data/layouts/Makefile.am +++ b/data/layouts/Makefile.am @@ -9,4 +9,12 @@ check: $(GREP) -q "$$file" $(top_srcdir)/data/*.tablet || (\ echo "ERROR: Layout $$file is not referenced" && test); \ rc="$$(($$rc + $$?))"; \ - done && test 0 -eq $$rc + done && test 0 -eq $$rc; + @(export GIT_DIR="$(top_srcdir)/.git"; \ + if $(GIT) ls-files >& /dev/null; then \ + for file in $(layouts); do \ + $(GIT) ls-files --error-unmatch "data/layouts/$$file" &> /dev/null || ( \ + echo "ERROR: File $$file is not in git" && test); \ + rc="$$(($$rc + $$?))"; \ + done && test 0 -eq $$rc; \ + fi) -- 2.7.4 ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel