]> git.draconx.ca Git - cdecl99.git/blobdiff - Makefile.am
Update .gitignore.
[cdecl99.git] / Makefile.am
index 4972bd27b1bf716723ac3fa91a1a19ac27348a6c..c5974991ac439556b50761d11389ed5d7d33b1b3 100644 (file)
@@ -1,11 +1,11 @@
-# Copyright © 2011 Nick Bowler
+# Copyright © 2011-2013,2019 Nick Bowler
 #
 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
 # 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
+ACLOCAL_AMFLAGS = -I m4 -I common/m4
 
 # For Gnulib
 MOSTLYCLEANFILES =
@@ -22,6 +22,8 @@ AM_CFLAGS = $(GSL_CFLAGS)
 MAINTAINERCLEANFILES = src/scan.c src/scan.h src/scan.stamp \
        src/parse.c src/parse.h src/parse.stamp
 
+DISTCLEANFILES =
+
 CLEANFILES = src/validtypes.h src/errtab.h src/namespecs.h src/ordspecs.h \
        test/typegen.h
 
@@ -35,8 +37,8 @@ dist_man_MANS = doc/man/cdecl99.1 doc/man/libcdecl.3
 
 include_HEADERS = src/cdecl.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
+       src/parse.h src/i18n.h src/normalize.h src/error.h src/history.h \
+       test/declgen.h test/test.h
 
 noinst_DATA = $(MOFILES)
 
@@ -77,7 +79,7 @@ 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)
+dist_check_SCRIPTS = tests/randomdecl-sanity.sed $(TESTS)
 
 src/parse.lo: src/scan.h
 src/scan.lo: src/parse.h
@@ -114,9 +116,11 @@ test/typegen.h: $(srcdir)/src/types.lst $(srcdir)/test/typegen.sh
        $(AM_V_at)mv -f $@.tmp $@
 
 # Supporting rules for gettext.
-ALL_MOFILES = $(POFILES:.po=.mo)
-EXTRA_DIST += po/$(PACKAGE).pot po/LINGUAS $(POFILES) $(ALL_MOFILES)
-MAINTAINERCLEANFILES += po/$(PACKAGE).pot $(ALL_MOFILES)
+include $(top_srcdir)/common/snippet/gettext.mk
+
+EXTRA_DIST += po/$(PACKAGE).pot
+MAINTAINERCLEANFILES += po/$(PACKAGE).pot
+
 XGETTEXT_OPTS = -D $(builddir) -D $(srcdir) --from-code=utf-8 \
        --add-comments=TRANSLATORS: --foreign-user \
        --package-name=$(PACKAGE) --package-version=$(PACKAGE_VERSION) \
@@ -130,42 +134,6 @@ po/$(PACKAGE).pot: $(SOURCES) src/errors.lst
                -ajo $@.tmp src/errors.lst
        $(AM_V_at)  mv -f $@.tmp $@
 
-.po.mo:
-       $(AM_V_at)$(MKDIR_P) $(@D)
-       $(AM_V_GEN)$(MSGFMT) -c -o $@ $<
-
-install-data-local: install-mo
-install-mo: $(MOFILES)
-       for mo in $?; do \
-               lang=`expr "$$mo" : '.*/\(.*\)\.mo' \| "$$mo" : '\(.*\)\.mo'`; \
-               test x"$$lang" = x"" && exit 1; \
-               inst="$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES"; \
-               (set -x; $(MKDIR_P) "$$inst") \
-                       || exit $$?; \
-               (set -x; $(INSTALL_DATA) "$$mo" "$$inst/$(PACKAGE).mo") \
-                       || exit $$?; \
-       done
-
-installdirs-local: installdirs-mo
-installdirs-mo:
-       for mo in $(MOFILES); do \
-               lang=`expr "$$mo" : '.*/\(.*\)\.mo' \| "$$mo" : '\(.*\)\.mo'`; \
-               test x"$$lang" = x"" && exit 1; \
-               inst="$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES"; \
-               (set -x; $(MKDIR_P) "$$inst") || exit $$?; \
-       done
-
-uninstall-local: uninstall-mo
-uninstall-mo:
-       for mo in $(ALL_MOFILES); do \
-               lang=`expr "$$mo" : '.*/\(.*\)\.mo' \| "$$mo" : '\(.*\)\.mo'`; \
-               test x"$$lang" = x"" && exit 1; \
-               inst="$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES"; \
-               (set -x; cd "$$inst" && rm -f '$(PACKAGE).mo'); \
-       done
-
-.PHONY: install-mo installdirs-mo uninstall-mo
-
 # These are required to prevent the builtin lex/yacc rules from
 # superseding ours...
 src/scan.c src/scan.h: src/scan.stamp
@@ -193,13 +161,13 @@ unfuck-distdir:
 
 # Supporting rules for bison/flex.
 
-BISON_V   = $(BISON_V_$(V))
-BISON_V_  = $(BISON_V_$(AM_DEFAULT_VERBOSITY))
-BISON_V_0 = @echo "  BISON " $<;
+BISON_V   = $(BISON_V_@AM_V@)
+BISON_V_  = $(BISON_V_@AM_DEFAULT_V@)
+BISON_V_0 = @printf '  %$(DX_ALIGN_V)s %s\n' 'BISON   ' $<;
 
-FLEX_V   = $(FLEX_V_$(V))
-FLEX_V_  = $(FLEX_V_$(AM_DEFAULT_VERBOSITY))
-FLEX_V_0 = @echo "  FLEX  " $<;
+FLEX_V   = $(FLEX_V_@AM_V@)
+FLEX_V_  = $(FLEX_V_@AM_DEFAULT_V@)
+FLEX_V_0 = @printf '  %$(DX_ALIGN_V)s %s\n' 'FLEX    ' $<;
 
 .y.c: ;
 .l.c: ;
@@ -237,4 +205,4 @@ FLEX_V_0 = @echo "  FLEX  " $<;
        fi
 
 include $(top_srcdir)/lib/gnulib.mk
-include $(top_srcdir)/glconfig.mk
+include $(top_srcdir)/common/snippet/glconfig.mk