]> git.draconx.ca Git - cdecl99.git/blobdiff - Makefile.am
Bump dxcommon to fix "make install" with old shells.
[cdecl99.git] / Makefile.am
index 4af8e9a01c3febd3fe7f6f790a6ba260e921f308..220280ce76ff8f87a06827f36cd02a06d763f5a8 100644 (file)
@@ -115,7 +115,7 @@ t/cdeclerr.$(OBJEXT): src/errmsg.h
 
 check_PROGRAMS += t/cdeclerr
 t_cdeclerr_SOURCES = common/src/tap.c t/cdeclerr.c
-EXTRA_t_cdeclerr_DEPENDENCIES = src/error.lo $(shared_gl_objects)
+EXTRA_t_cdeclerr_DEPENDENCIES = src/error.lo src/output.lo $(shared_gl_objects)
 t_cdeclerr_LDADD = $(EXTRA_t_cdeclerr_DEPENDENCIES) $(LIBTHREAD)
 $(t_cdeclerr_OBJECTS): $(gnulib_headers)
 
@@ -335,6 +335,24 @@ atlocal: config.status
 check_DATA = atlocal
 CLEANFILES += atlocal
 
+# Note: to reliably test linking against the installed library we directly
+# refer to the just-installed .la file, rather than more typical library flags
+# (-Lfoo -lfoo).  Otherwise libtool can pick up libcdecl.la from the current
+# working directory which defeats the point of an install check.
+EXTRA_PROGRAMS = t/installcheck
+t_installcheck_CPPFLAGS = -I$(DESTDIR)$(includedir)
+t_installcheck_LDADD = $(DESTDIR)$(libdir)/libcdecl.la
+t_installcheck_CFLAGS =
+t_installcheck_SHORTNAME = x
+
+installcheck-local:
+       rm -f t/installcheck$(EXEEXT)
+       $(MAKE) $(AM_MAKEFLAGS) t/installcheck$(EXEEXT)
+       t/installcheck$(EXEEXT) | diff - $(srcdir)/t/installcheck.exp
+.PHONY: installcheck-local
+EXTRA_DIST += t/installcheck.c t/installcheck.exp
+CLEANFILES += t/installcheck$(EXEEXT)
+
 include $(top_srcdir)/lib/gnulib.mk
 include $(top_srcdir)/common/snippet/glconfig.mk
 include $(top_srcdir)/common/snippet/autotest.mk