From 05e5901bcae1ceaec435936f0c056886ac3ed12d Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 16 Oct 2016 17:23:51 +0200 Subject: [PATCH] generate asciidoc.conf via autoconf MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit …instead of updating it in release.sh. --- Makefile.am | 4 ++-- configure.ac | 2 +- man/{asciidoc.conf => asciidoc.conf.in} | 2 +- release.sh | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) rename man/{asciidoc.conf => asciidoc.conf.in} (87%) diff --git a/Makefile.am b/Makefile.am index 7bba241b..21f57e5b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -86,7 +86,7 @@ EXTRA_DIST = \ libi3/README \ $(asciidoc_MANS:.1=.man) \ $(asciidoc_MANS:.1=.man) \ - man/asciidoc.conf \ + man/asciidoc.conf.in \ DEPENDS \ I3_VERSION \ LICENSE \ @@ -200,7 +200,7 @@ $(asciidoc_MANS): man/%.1: man/%.xml man/$(dirstamp) @stamp='$@'; $(MKDIR_P) "$${stamp%/*}" man/%.xml: man/%.man man/asciidoc.conf man/$(dirstamp) - $(AM_V_GEN) @PATH_ASCIIDOC@ -d manpage -b docbook -f $(top_srcdir)/man/asciidoc.conf -o $@ $< + $(AM_V_GEN) @PATH_ASCIIDOC@ -d manpage -b docbook -f $(top_builddir)/man/asciidoc.conf -o $@ $< $(pod_MANS): man/%.1: % man/$(dirstamp) $(AM_V_GEN) @PATH_POD2MAN@ --utf8 $< > $@ diff --git a/configure.ac b/configure.ac index 573261f5..01b4d309 100644 --- a/configure.ac +++ b/configure.ac @@ -118,7 +118,7 @@ AC_SUBST(AM_CFLAGS) # Checks for header files. AC_CHECK_HEADERS([fcntl.h float.h inttypes.h limits.h locale.h netinet/in.h paths.h stddef.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h], , [AC_MSG_FAILURE([cannot find the $ac_header header, which i3 requires])]) -AC_CONFIG_FILES([Makefile testcases/lib/i3test.pm]) +AC_CONFIG_FILES([Makefile testcases/lib/i3test.pm man/asciidoc.conf]) AC_CONFIG_FILES([testcases/complete-run.pl], [chmod +x testcases/complete-run.pl]) # Enable address sanitizer for non-release builds. The performance hit is a diff --git a/man/asciidoc.conf b/man/asciidoc.conf.in similarity index 87% rename from man/asciidoc.conf rename to man/asciidoc.conf.in index 11e76501..e9a9ea23 100644 --- a/man/asciidoc.conf +++ b/man/asciidoc.conf.in @@ -7,7 +7,7 @@ template::[header-declarations] {mantitle} {manvolnum} i3 -4.12 +@PACKAGE_VERSION@ i3 Manual diff --git a/release.sh b/release.sh index 14f443f3..9101332c 100755 --- a/release.sh +++ b/release.sh @@ -57,7 +57,6 @@ git add RELEASE-NOTES-${RELEASE_VERSION} git rm RELEASE-NOTES-${PREVIOUS_VERSION} sed -i "s,RELEASE-NOTES-${PREVIOUS_VERSION},RELEASE-NOTES-${RELEASE_VERSION},g" Makefile.am sed -i "s/AC_INIT(\[i3\], \[${PREVIOUS_VERSION}\]/AC_INIT([i3], [${RELEASE_VERSION}]/" configure.ac -sed -i "s,[^<]*,${RELEASE_VERSION},g" man/asciidoc.conf echo "${RELEASE_VERSION} ($(date +%F))" > I3_VERSION git add I3_VERSION git commit -a -m "release i3 ${RELEASE_VERSION}" -- 2.39.5