]> git.sur5r.net Git - i3/i3/commitdiff
generate asciidoc.conf via autoconf
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 16 Oct 2016 15:23:51 +0000 (17:23 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 23 Oct 2016 19:09:24 +0000 (21:09 +0200)
…instead of updating it in release.sh.

Makefile.am
configure.ac
man/asciidoc.conf [deleted file]
man/asciidoc.conf.in [new file with mode: 0644]
release.sh

index 7bba241b3f340bf41e71bcfb7a6a0209c4e5d36a..21f57e5bfbb40625cf1cd8fc86ec581df6e82f6b 100644 (file)
@@ -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 $< > $@
index 573261f567c17580a6a9fc66765065c4da963b66..01b4d3090dec582e75313905e6207a247de8c3e5 100644 (file)
@@ -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
deleted file mode 100644 (file)
index 11e7650..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-ifdef::doctype-manpage[]
-ifdef::backend-docbook[]
-[header]
-template::[header-declarations]
-<refentry>
-<refmeta>
-<refentrytitle>{mantitle}</refentrytitle>
-<manvolnum>{manvolnum}</manvolnum>
-<refmiscinfo class="source">i3</refmiscinfo>
-<refmiscinfo class="version">4.12</refmiscinfo>
-<refmiscinfo class="manual">i3 Manual</refmiscinfo>
-</refmeta>
-<refnamediv>
-  <refname>{manname}</refname>
-  <refpurpose>{manpurpose}</refpurpose>
-</refnamediv>
-endif::backend-docbook[]
-endif::doctype-manpage[]
diff --git a/man/asciidoc.conf.in b/man/asciidoc.conf.in
new file mode 100644 (file)
index 0000000..e9a9ea2
--- /dev/null
@@ -0,0 +1,18 @@
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[header]
+template::[header-declarations]
+<refentry>
+<refmeta>
+<refentrytitle>{mantitle}</refentrytitle>
+<manvolnum>{manvolnum}</manvolnum>
+<refmiscinfo class="source">i3</refmiscinfo>
+<refmiscinfo class="version">@PACKAGE_VERSION@</refmiscinfo>
+<refmiscinfo class="manual">i3 Manual</refmiscinfo>
+</refmeta>
+<refnamediv>
+  <refname>{manname}</refname>
+  <refpurpose>{manpurpose}</refpurpose>
+</refnamediv>
+endif::backend-docbook[]
+endif::doctype-manpage[]
index 14f443f34612f3fcd0582d3f69d4d40d42324152..9101332c100761bc841e2367e2c8ec88138b40fc 100755 (executable)
@@ -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,<refmiscinfo class=\"version\">[^<]*</refmiscinfo>,<refmiscinfo class=\"version\">${RELEASE_VERSION}</refmiscinfo>,g" man/asciidoc.conf
 echo "${RELEASE_VERSION} ($(date +%F))" > I3_VERSION
 git add I3_VERSION
 git commit -a -m "release i3 ${RELEASE_VERSION}"