Makefile.am 852 B

1234567891011121314151617
  1. # We're going to abuse install-data-local for a pre-install check. This may
  2. # not be the cleanest way to do this type of job, but that's the least ugly
  3. # one we've found.
  4. #
  5. # Note also that if any test needs to examine some file that has possibly
  6. # been installed before (e.g., older DB or configuration file), it should be
  7. # referenced with the prefix of DESTDIR. Otherwise
  8. # 'make DESTDIR=/somewhere install' may not work.
  9. install-data-local:
  10. if test -e $(DESTDIR)$(localstatedir)/$(PACKAGE)/zone.sqlite3; then \
  11. $(SHELL) $(top_builddir)/src/bin/dbutil/run_dbutil.sh --check \
  12. $(DESTDIR)$(localstatedir)/$(PACKAGE)/zone.sqlite3 || \
  13. (echo "\nSQLite3 DB file schema version is old. " \
  14. "Please run: " \
  15. "$(abs_top_builddir)/src/bin/dbutil/run_dbutil.sh --upgrade " \
  16. "$(DESTDIR)$(localstatedir)/$(PACKAGE)/zone.sqlite3"; exit 1) \
  17. fi