]> git.draconx.ca Git - cdecl99.git/blobdiff - Makefile.am
Make fix-gnulib only need a single output file.
[cdecl99.git] / Makefile.am
index 535eff8630ef1f5ecc4c8a12313b1a3bb0a686d4..4972bd27b1bf716723ac3fa91a1a19ac27348a6c 100644 (file)
@@ -4,8 +4,8 @@
 # This is free software: you are free to do what the fuck you want to.
 # There is NO WARRANTY, to the extent permitted by law.
 
+AUTOMAKE_OPTIONS = parallel-tests color-tests
 ACLOCAL_AMFLAGS = -I m4
-AUTOMAKE_OPTIONS = nostdinc
 
 # For Gnulib
 MOSTLYCLEANFILES =
@@ -13,10 +13,12 @@ noinst_LTLIBRARIES =
 
 AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src \
        -I$(top_builddir)/lib -I$(top_srcdir)/lib \
-       -I$(top_builddir) -I$(top_srcdir) \
+       -I$(top_builddir)/test \
        -DBISON_LOCALEDIR=\"$(BISON_LOCALEDIR)\" \
        -DLOCALEDIR=\"$(localedir)\"
 
+AM_CFLAGS = $(GSL_CFLAGS)
+
 MAINTAINERCLEANFILES = src/scan.c src/scan.h src/scan.stamp \
        src/parse.c src/parse.h src/parse.stamp
 
@@ -25,15 +27,16 @@ CLEANFILES = src/validtypes.h src/errtab.h src/namespecs.h src/ordspecs.h \
 
 EXTRA_DIST = m4/gnulib-cache.m4 src/types.lst src/validtypes.sed \
        src/specs.lst src/namespecs.sed src/ordspecs.sed \
-       src/errors.lst src/strtab.sed \
-       src/parse.stamp src/scan.stamp \
+       src/errors.lst src/strtab.sed test/typegen.sh \
+       src/parse.y src/parse.stamp src/scan.l src/scan.stamp \
        COPYING.WTFPL2
 
 dist_man_MANS = doc/man/cdecl99.1 doc/man/libcdecl.3
 
 include_HEADERS = src/cdecl.h
-noinst_HEADERS = conf_post.h src/typemap.h src/output.h src/scan.h \
-       src/parse.h src/i18n.h src/normalize.h src/error.h
+noinst_HEADERS = conf_pre.h conf_post.h src/typemap.h src/output.h src/scan.h \
+       src/parse.h src/i18n.h src/normalize.h src/error.h test/declgen.h \
+       test/test.h
 
 noinst_DATA = $(MOFILES)
 
@@ -47,25 +50,35 @@ libcdecl_la_LIBADD = libgnu.la $(LTLIBINTL) $(LTLIBTHREAD)
 $(libcdecl_la_OBJECTS): $(gnulib_headers)
 
 bin_PROGRAMS = cdecl99
+cdecl99_SOURCES = src/cdecl99.c
+cdecl99_LDADD = libcdecl.la libgnu.la $(LTLIBINTL) $(LTLIBREADLINE)
+$(cdecl99_OBJECTS): $(gnulib_headers)
 
-check_PROGRAMS =
-EXTRA_LTLIBRARIES = libtest.la
-libtest_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS)
+check_PROGRAMS = test/crossparse
+check_LTLIBRARIES = libtest.la
 libtest_la_LIBADD = $(GSL_LIBS)
 libtest_la_SOURCES = test/testlib.c
+$(libtest_la_OBJECTS): $(gnulib_headers)
 
 if HAVE_GSL
 libtest_la_SOURCES += test/declgen.c
 check_PROGRAMS += test/randomdecl
 endif
 
-cdecl99_SOURCES = src/cdecl99.c
-cdecl99_LDADD = libcdecl.la libgnu.la $(LTLIBINTL) $(LTLIBREADLINE)
-$(cdecl99_OBJECTS): $(gnulib_headers)
-
+test_crossparse_LDADD = libcdecl.la libtest.la libgnu.la
+$(test_crossparse_OBJECTS): $(gnulib_headers)
 test_randomdecl_LDADD = libcdecl.la libtest.la libgnu.la
 $(test_randomdecl_OBJECTS): $(gnulib_headers)
 
+TESTS_ENVIRONMENT = SHELL='$(SHELL)' LIBTOOL='$(LIBTOOL)' EXEEXT='$(EXEEXT)'
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL)
+
+TESTS = tests/libcdecl-static-symbols.sh tests/randomdecl-sanity.sh \
+       tests/crossparse-c-random.sh tests/cdecl99-c-invalid.sh
+
+EXTRA_DIST += $(TESTS)
+
 src/parse.lo: src/scan.h
 src/scan.lo: src/parse.h
 src/parse-decl.lo: src/scan.h src/parse.h
@@ -73,10 +86,7 @@ src/typemap.lo: src/validtypes.h
 src/error.lo: src/errtab.h
 src/normalize.lo: src/ordspecs.h
 src/output.lo: src/namespecs.h
-
-# This is gross.
-declgen_o = test/libtest_la-declgen.lo
-$(declgen_o): test/typegen.h
+test/declgen.lo: test/typegen.h
 
 src/validtypes.h: $(srcdir)/src/types.lst $(srcdir)/src/validtypes.sed
        $(AM_V_GEN)sed -f $(srcdir)/src/validtypes.sed \
@@ -169,6 +179,7 @@ dist-hook: update-headers
 update-headers: unfuck-distdir
        touch -c '$(distdir)/src/scan.h'
        touch -c '$(distdir)/src/parse.h'
+.PHONY: update-headers
 
 # When running "make dist" in a VPATH build with a read-only srcdir, Automake
 # will produce a distribution with all files read-only.  Moreover, the files
@@ -178,6 +189,7 @@ update-headers: unfuck-distdir
 dist-hook: unfuck-distdir
 unfuck-distdir:
        find '$(distdir)' -type f -exec chmod u+w {} +
+.PHONY: unfuck-distdir
 
 # Supporting rules for bison/flex.