1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
Description: autotools: help2man
Implement the generation of the manpages for the front-end
programs and development tools with help2man(1);
meant to be submitted to the upstream maintainer.
Origin: vendor, Debian
Forwarded: https://github.com/Singular/Sources/pull/695
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2021-11-20
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@
AC_CHECK_FUNCS(readlink getcwd getwd setenv putenv qsort_r poll)
+AC_PATH_PROG([HELP2MAN],[help2man])
AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN";
then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
--- a/Singular/Makefile.am
+++ b/Singular/Makefile.am
@@ -149,6 +149,20 @@
bin_PROGRAMS = Singular ESingular TSingular $(optional_Singular_programs)
+man_MANS = Singular.1 ESingular.1 TSingular.1
+
+AM_H2MFLAGS = \
+ --manual="CAS Singular" \
+ --version-option="--dump-versiontuple" \
+ --source="Singular" \
+ --libtool \
+ --no-info
+
+## short descriptions for manpages
+Singular_DESCRIPTION = "Computer Algebra System for Polynomial Computations -- command-line interface"
+ESingular_DESCRIPTION = "Computer Algebra System for Polynomial Computations -- command-line interface within emacs"
+TSingular_DESCRIPTION = "Computer Algebra System for Polynomial Computations -- command-line interface within a new terminal"
+
Singular_SOURCES = tesths.cc utils.cc utils.h
Singular_LDADD = libSingular.la ${OMALLOC_LIBS} ${BUILTIN_FLAGS} $(FACTORY_LIBS)
@@ -185,6 +199,15 @@
#libparse_LDADD = ${top_builddir}/resources/libsingular_resources.la
libparse_LDFLAGS = ${AM_LDFLAGS}
+%.1: %
+ $(HELP2MAN) \
+ -s 1 \
+ $(AM_H2MFLAGS) \
+ -I $(top_srcdir)/Singular/man/$*.h2m \
+ -n $(if $($(subst -,_,$*)_DESCRIPTION), $($(subst -,_,$*)_DESCRIPTION), "manual page for $*") \
+ -o $@ \
+ $(abs_top_builddir)/Singular/$<
+
#########################################################
# the Singular library (*.lib files)
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,6 +14,17 @@
bin_SCRIPTS = libsingular-config
+man_MANS = libsingular-config.1
+
+AM_H2MFLAGS = \
+ --manual="CAS Singular" \
+ --source="Singular" \
+ --libtool \
+ --no-info
+
+## short descriptions for manpages
+libsingular_config_DESCRIPTION = "get information about installed Singular library"
+
install-data-local:
if test -e $(srcdir)/doc/doc.tbz2; then\
test -e $(DESTDIR)$(datadir) || mkdir -p $(DESTDIR)$(datadir);\
@@ -35,3 +46,12 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = Singular.pc
+
+%.1: %
+ $(HELP2MAN) \
+ -s 1 \
+ $(AM_H2MFLAGS) \
+ -I $(top_srcdir)/man/$*.h2m \
+ -n $(if $($(subst -,_,$*)_DESCRIPTION), $($(subst -,_,$*)_DESCRIPTION), "manual page for $*") \
+ -o $@ \
+ $(abs_top_builddir)/$<
--- a/libpolys/configure.ac
+++ b/libpolys/configure.ac
@@ -37,6 +37,9 @@
SING_WIN_FLAGS
+# Checks for programs.
+AC_PATH_PROG([HELP2MAN],[help2man])
+
# Checks for libraries.
# This test for -lpthread etc has to come before AX_PTHREAD,
# because libtool tends to ignore -pthread in linking shared C++-libs
--- a/libpolys/Makefile.am
+++ b/libpolys/Makefile.am
@@ -2,6 +2,17 @@
bin_SCRIPTS = libpolys-config
+man_MANS = libpolys-config.1
+
+AM_H2MFLAGS = \
+ --manual="CAS Singular" \
+ --source="Singular" \
+ --libtool \
+ --no-info
+
+## short descriptions for manpages
+libpolys_config_DESCRIPTION = "get information about installed Singular polynomial library"
+
SUBDIRS=misc reporter coeffs polys tests
configheaderdir = ${includedir}/singular
@@ -10,3 +21,12 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libpolys.pc
+
+%.1: %
+ $(HELP2MAN) \
+ -s 1 \
+ $(AM_H2MFLAGS) \
+ -I $(top_srcdir)/man/$*.h2m \
+ -n $(if $($(subst -,_,$*)_DESCRIPTION), $($(subst -,_,$*)_DESCRIPTION), "manual page for $*") \
+ -o $@ \
+ $(abs_top_builddir)/$<
|