From 5fa87f315e7b9476f57beedbc6f576c62e7b772c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 12 Nov 2022 13:17:50 +0000 Subject: [PATCH 1/8] Revert addition of .gitignore I'd missed that this project is using git.mk, so .gitignore is meant to be a generated file here. Signed-off-by: Simon McVittie --- .gitignore | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .gitignore 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 From 61091b6cd51d599889cdd332baebdc6430327f8d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 12 Nov 2022 13:18:24 +0000 Subject: [PATCH 2/8] Update git.mk from its upstream Signed-off-by: Simon McVittie --- git.mk | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 5 deletions(-) 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 From d7cc07d59e6c58f5f021ad916317b27e7a6a8d36 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 12 Nov 2022 13:22:38 +0000 Subject: [PATCH 3/8] build: Add more files to be ignored by the generated .gitignore Signed-off-by: Simon McVittie --- Makefile.am | 2 ++ src/Makefile-git-evtag.am | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Makefile.am b/Makefile.am index 1fa3880..6f99b3b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,7 +25,9 @@ AM_CPPFLAGS += -DDATADIR='"$(datadir)"' \ -DLOCALEDIR=\"$(datadir)/locale\" AM_CFLAGS += $(WARN_CFLAGS) +GITIGNOREFILES += *.test GITIGNOREFILES += build-aux/ m4/ gtk-doc.make config.h.in aclocal.m4 +GITIGNOREFILES += git-evtag-*.tar.* include $(INTROSPECTION_MAKEFILE) 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 From 1ae0336521f31b97605dc4575c679750c1f41345 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 12 Nov 2022 13:22:54 +0000 Subject: [PATCH 4/8] build: Regenerate .gitignore when any Makefile changes Signed-off-by: Simon McVittie --- Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.am b/Makefile.am index 6f99b3b..85dda7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,3 +42,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 From fadfd6fba99da436fb8cb96c90e139d196d7df76 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 12 Nov 2022 13:05:14 +0000 Subject: [PATCH 5/8] tests: Include test-basic.sh in dist tarballs with newer Automake The previous setup using $(addprefix) seems to be included in dist tarballs by the Automake used in Gitlab-CI, but not by the Automake in Debian unstable. Simplify the test setup so both work. This also results in the .test files being generated in tests/ rather than at top level, reducing clutter a bit. Signed-off-by: Simon McVittie --- Makefile.am | 1 - tests/Makefile-tests.am | 15 +++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 85dda7d..e169c33 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,7 +25,6 @@ AM_CPPFLAGS += -DDATADIR='"$(datadir)"' \ -DLOCALEDIR=\"$(datadir)/locale\" AM_CFLAGS += $(WARN_CFLAGS) -GITIGNOREFILES += *.test GITIGNOREFILES += build-aux/ m4/ gtk-doc.make config.h.in aclocal.m4 GITIGNOREFILES += git-evtag-*.tar.* diff --git a/tests/Makefile-tests.am b/tests/Makefile-tests.am index 61e53af..c91c18b 100644 --- a/tests/Makefile-tests.am +++ b/tests/Makefile-tests.am @@ -24,19 +24,19 @@ 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) + 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 \ @@ -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) From 99377a546dd92448fe73affffbd788df4a03a0f0 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 12 Nov 2022 13:06:27 +0000 Subject: [PATCH 6/8] tests: Add tests/git-evtag-compute-py to dist tarball unconditionally Adding this to EXTRA_DIST inside a conditional seems to work differently for different versions of Automake. Take it out of the conditional to make it more reliable. Signed-off-by: Simon McVittie --- tests/Makefile-tests.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile-tests.am b/tests/Makefile-tests.am index c91c18b..b9c1cc1 100644 --- a/tests/Makefile-tests.am +++ b/tests/Makefile-tests.am @@ -29,6 +29,7 @@ test_scripts = \ $(NULL) TESTS = $(test_scripts) +EXTRA_DIST += tests/git-evtag-compute-py if BUILDOPT_INSTALL_TESTS @@ -43,7 +44,6 @@ dist_insttest_DATA = \ $(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 \ From 2dce8bd47b5b7f72b70965fc0f3d22fe9cf2d81e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 5 May 2021 10:20:12 +0100 Subject: [PATCH 7/8] build: Use subdir-objects Automake option to avoid some warnings Signed-off-by: Simon McVittie --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From f2e44409226aa36d5592a05db7133bfbea3b55fc Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 5 May 2021 10:20:51 +0100 Subject: [PATCH 8/8] build: Remove GObject-Introspection machinery This silences some warnings about duplicated variables, and also removes some unnecessary code; there's no library here, so there's certainly nothing to introspect. Signed-off-by: Simon McVittie --- Makefile.am | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index e169c33..179dea8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,13 +28,6 @@ AM_CFLAGS += $(WARN_CFLAGS) GITIGNOREFILES += build-aux/ m4/ gtk-doc.make config.h.in aclocal.m4 GITIGNOREFILES += git-evtag-*.tar.* -include $(INTROSPECTION_MAKEFILE) - -girdir = $(pkgdatadir)/gir-1.0 -gir_DATA = $(INTROSPECTION_GIRS) -typelibdir = $(pkglibdir)/girepository-1.0 -typelib_DATA = $(gir_DATA:.gir=.typelib) - include src/Makefile-git-evtag.am include man/Makefile-man.am include rust/Makefile-inc.am