diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8d7bf50..0000000 --- a/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2022 Collabora Ltd. -# SPDX-License-Identifier: LGPL-2.1-or-later - -*.o -*~ -.deps/ -/*.test -/aclocal.m4 -/autom4te.cache/ -/build-aux/ -/config.h -/config.h.in -/config.log -/config.status -/configure -/git-evtag -/git-evtag-*.tar.* -/git-evtag-*/ -/libtool -/m4/libtool.m4 -/m4/lt*.m4 -/man/*.1 -/stamp-h1 -Makefile -Makefile.in diff --git a/Makefile.am b/Makefile.am index 1fa3880..179dea8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,13 +26,7 @@ AM_CPPFLAGS += -DDATADIR='"$(datadir)"' \ AM_CFLAGS += $(WARN_CFLAGS) GITIGNOREFILES += build-aux/ m4/ gtk-doc.make config.h.in aclocal.m4 - -include $(INTROSPECTION_MAKEFILE) - -girdir = $(pkgdatadir)/gir-1.0 -gir_DATA = $(INTROSPECTION_GIRS) -typelibdir = $(pkglibdir)/girepository-1.0 -typelib_DATA = $(gir_DATA:.gir=.typelib) +GITIGNOREFILES += git-evtag-*.tar.* include src/Makefile-git-evtag.am include man/Makefile-man.am @@ -40,3 +34,8 @@ include rust/Makefile-inc.am include tests/Makefile-tests.am -include $(top_srcdir)/git.mk + +$(srcdir)/.gitignore: src/Makefile-git-evtag.am +$(srcdir)/.gitignore: man/Makefile-man.am +$(srcdir)/.gitignore: rust/Makefile-inc.am +$(srcdir)/.gitignore: tests/Makefile-tests.am diff --git a/configure.ac b/configure.ac index 3f89122..b2687de 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) -AM_INIT_AUTOMAKE([1.11 -Wno-portability foreign no-define tar-ustar no-dist-gzip dist-xz]) +AM_INIT_AUTOMAKE([1.11 -Wno-portability foreign no-define tar-ustar no-dist-gzip dist-xz subdir-objects]) AM_MAINTAINER_MODE([enable]) AM_SILENT_RULES([yes]) AC_USE_SYSTEM_EXTENSIONS diff --git a/git.mk b/git.mk index 0a73115..cd52db1 100644 --- a/git.mk +++ b/git.mk @@ -48,7 +48,7 @@ GIT_MK_URL = https://raw.githubusercontent.com/behdad/git.mk/master/git.mk # # This file knows how to handle autoconf, automake, libtool, gtk-doc, # gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata, -# appstream. +# appstream, hotdoc. # # This makefile provides the following targets: # @@ -86,6 +86,7 @@ GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \ ar-lib \ compile \ config.guess \ + config.rpath \ config.sub \ depcomp \ install-sh \ @@ -120,6 +121,47 @@ GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \ lt~obsolete.m4 \ ; do echo "$$MACRO_DIR/$$x"; done; \ fi` +# +# Modules that use gettext and use AC_CONFIG_MACRO_DIR() may also include this, +# though it's harmless to include regardless. +GITIGNORE_MAINTAINERCLEANFILES_M4_GETTEXT = \ + `MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \ + if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \ + for x in \ + codeset.m4 \ + extern-inline.m4 \ + fcntl-o.m4 \ + gettext.m4 \ + glibc2.m4 \ + glibc21.m4 \ + iconv.m4 \ + intdiv0.m4 \ + intl.m4 \ + intldir.m4 \ + intlmacosx.m4 \ + intmax.m4 \ + inttypes-pri.m4 \ + inttypes_h.m4 \ + lcmessage.m4 \ + lib-ld.m4 \ + lib-link.m4 \ + lib-prefix.m4 \ + lock.m4 \ + longlong.m4 \ + nls.m4 \ + po.m4 \ + printf-posix.m4 \ + progtest.m4 \ + size_max.m4 \ + stdint_h.m4 \ + threadlib.m4 \ + uintmax_t.m4 \ + visibility.m4 \ + wchar_t.m4 \ + wint_t.m4 \ + xsize.m4 \ + ; do echo "$$MACRO_DIR/$$x"; done; \ + fi` @@ -162,7 +204,7 @@ git-mk-update: # Actual .gitignore generation: ############################################################################### -$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk +$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk $(top_srcdir)/configure.ac @echo "git.mk: Generating $@" @{ \ if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ @@ -208,6 +250,15 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk "*/*.omf.out" \ ; do echo /$$x; done; \ fi; \ + if test "x$(HOTDOC)" = x; then :; else \ + $(foreach project, $(HOTDOC_PROJECTS),echo "/$(call HOTDOC_TARGET,$(project))"; \ + echo "/$(shell $(call HOTDOC_PROJECT_COMMAND,$(project)) --get-conf-path output)" ; \ + echo "/$(shell $(call HOTDOC_PROJECT_COMMAND,$(project)) --get-private-folder)" ; \ + ) \ + for x in \ + .hotdoc.d \ + ; do echo "/$$x"; done; \ + fi; \ if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ for lc in $(HELP_LINGUAS); do \ for x in \ @@ -235,6 +286,7 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk fi; \ if test -f $(srcdir)/po/Makefile.in.in; then \ for x in \ + ABOUT-NLS \ po/Makefile.in.in \ po/Makefile.in.in~ \ po/Makefile.in \ @@ -275,7 +327,7 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk if test "x$(am__dirstamp)" = x; then :; else \ echo "$(am__dirstamp)"; \ fi; \ - if test "x$(LTCOMPILE)" = x -a "x$(LTCXXCOMPILE)" = x -a "x$(GTKDOC_RUN)" = x; then :; else \ + if test "x$(findstring libtool,$(LTCOMPILE))" = x -a "x$(findstring libtool,$(LTCXXCOMPILE))" = x -a "x$(GTKDOC_RUN)" = x; then :; else \ for x in \ "*.lo" \ ".libs" "_libs" \ @@ -323,8 +375,9 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk } | \ sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ sed 's@/[.]/@/@g' | \ - LC_ALL=C sort | uniq > $@.tmp && \ - mv $@.tmp $@; + LC_ALL=C sort | uniq > .gitignore.tmp && \ + (mv .gitignore.tmp $@ || (echo "WARNING: Cannot create $@ file; skipping"; \ + $(RM) .gitignore.tmp)); all: $(srcdir)/.gitignore gitignore-recurse-maybe gitignore: $(srcdir)/.gitignore gitignore-recurse diff --git a/src/Makefile-git-evtag.am b/src/Makefile-git-evtag.am index 6ce5630..7a003c3 100644 --- a/src/Makefile-git-evtag.am +++ b/src/Makefile-git-evtag.am @@ -22,3 +22,5 @@ git_evtag_SOURCES = src/git-evtag.c \ git_evtag_CFLAGS = $(AM_CFLAGS) $(BUILDDEP_LIBGIT_GLIB_CFLAGS) -I$(srcdir)/src git_evtag_LDADD = $(BUILDDEP_LIBGIT_GLIB_LIBS) + +GITIGNOREFILES += src/.dirstamp diff --git a/tests/Makefile-tests.am b/tests/Makefile-tests.am index 61e53af..b9c1cc1 100644 --- a/tests/Makefile-tests.am +++ b/tests/Makefile-tests.am @@ -24,26 +24,26 @@ LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver LOG_COMPILER = $(srcdir)/tests/tap-test EXTRA_DIST += tests/tap-test -TESTS = \ +test_scripts = \ tests/test-basic.sh \ $(NULL) +TESTS = $(test_scripts) + +EXTRA_DIST += tests/git-evtag-compute-py if BUILDOPT_INSTALL_TESTS insttestdir=$(pkglibexecdir)/installed-tests -testfiles = test-basic \ - $(NULL) -dist_insttest_SCRIPTS = $(addprefix tests/,$(testfiles:=.sh)) +dist_insttest_SCRIPTS = $(test_scripts) testmetadir = $(datadir)/installed-tests/$(PACKAGE) -testmeta_DATA = $(testfiles:=.test) +testmeta_DATA = $(test_scripts:.sh=.test) dist_insttest_DATA = \ tests/libtest.sh \ $(NULL) dist_insttest_SCRIPTS += src/git-evtag-compute-py -EXTRA_DIST += tests/git-evtag-compute-py gpginsttestdir = $(pkglibexecdir)/installed-tests/gpghome dist_gpginsttest_DATA = tests/gpghome/secring.gpg \ @@ -58,7 +58,8 @@ install-gpg-data-hook: ln -sf trusted/pubring.gpg $(DESTDIR)$(gpginsttestdir)/pubring.gpg INSTALL_DATA_HOOKS += install-gpg-data-hook -%.test: tests/%.sh Makefile +tests/%.test: tests/%.sh Makefile + @$(MKDIR_P) tests $(AM_V_GEN) (echo '[Test]' > $@.tmp; \ echo 'Exec=$(pkglibexecdir)/installed-tests/$(notdir $<)' >> $@.tmp; \ echo 'Type=session' >> $@.tmp; \ @@ -66,3 +67,5 @@ INSTALL_DATA_HOOKS += install-gpg-data-hook mv $@.tmp $@) endif + +CLEANFILES += $(testmeta_DATA)