Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- Makefile.am | 3 --- 1 file changed, 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 689b61e39ffd..4370355c34b8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,7 +16,6 @@ EXTRA_DIST = INSTALL_DIRS = noinst_DATA =
- AM_V_XSLT = $(AM_V_XSLT_$(V)) AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY)) AM_V_XSLT_0 = @echo " XSLT " $@; @@ -38,7 +37,6 @@ nitsi_PYTHON = \ src/nitsi/test.py \ src/nitsi/virtual_environ.py
- nitsidir = $(pythondir)/nitsi
# ------------------------------------------------------------------------------ @@ -90,7 +88,6 @@ man/%.5: man/%.xml
man/%.html: man/%.xml man/custom-html.xsl $(XSLTPROC_COMMAND_HTML) - endif
# ------------------------------------------------------------------------------
Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- .gitignore | 3 +-- m4/ax_python_module.m4 | 56 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 m4/ax_python_module.m4
diff --git a/.gitignore b/.gitignore index 9c34c9d6de67..8b229665e586 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -/m4 /Makefile /build-aux /libtool @@ -29,4 +28,4 @@ config.log config.status configure install-sh -stamp-* \ No newline at end of file +stamp-* diff --git a/m4/ax_python_module.m4 b/m4/ax_python_module.m4 new file mode 100644 index 000000000000..f0f873d199d5 --- /dev/null +++ b/m4/ax_python_module.m4 @@ -0,0 +1,56 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_python_module.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PYTHON_MODULE(modname[, fatal, python]) +# +# DESCRIPTION +# +# Checks for Python module. +# +# If fatal is non-empty then absence of a module will trigger an error. +# The third parameter can either be "python" for Python 2 or "python3" for +# Python 3; defaults to Python 3. +# +# LICENSE +# +# Copyright (c) 2008 Andrew Collier +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 9 + +AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE]) +AC_DEFUN([AX_PYTHON_MODULE],[ + if test -z $PYTHON; + then + if test -z "$3"; + then + PYTHON="python3" + else + PYTHON="$3" + fi + fi + PYTHON_NAME=`basename $PYTHON` + AC_MSG_CHECKING($PYTHON_NAME module: $1) + $PYTHON -c "import $1" 2>/dev/null + if test $? -eq 0; + then + AC_MSG_RESULT(yes) + eval AS_TR_CPP(HAVE_PYMOD_$1)=yes + else + AC_MSG_RESULT(no) + eval AS_TR_CPP(HAVE_PYMOD_$1)=no + # + if test -n "$2" + then + AC_MSG_ERROR(failed to find required module $1) + exit 1 + fi + fi +])
It was impossible to disable the man pages generation before this patch.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- Makefile.am | 20 ++++++++++---------- configure.ac | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 4370355c34b8..dadb50941269 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,27 +42,27 @@ nitsidir = $(pythondir)/nitsi # ------------------------------------------------------------------------------
.PHONY: man -man: $(MANPAGES) $(MANPAGES_HTML) +man: $(MAN_PAGES) $(MAN_PAGES_HTML)
-if ENABLE_MANPAGES -MANPAGES = \ +if ENABLE_MAN_PAGES +MAN_PAGES = \ man/nitsi.1
-MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES))) -MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML)) +MAN_PAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MAN_PAGES))) +MAN_PAGES_HTML = $(patsubst %.xml,%.html,$(MAN_PAGES_XML))
man_MANS = \ - $(MANPAGES) + $(MAN_PAGES)
noinst_DATA += \ - $(MANPAGES_HTML) + $(MAN_PAGES_HTML)
CLEANFILES += \ $(man_MANS) \ - $(MANPAGES_HTML) + $(MAN_PAGES_HTML)
EXTRA_DIST += \ - $(MANPAGES_XML) \ + $(MAN_PAGES_XML) \ man/custom-html.xsl
XSLTPROC_FLAGS = \ @@ -102,4 +102,4 @@ SED_PROCESS = \ < $< > $@
nitsi: nitsi.in Makefile - $(SED_PROCESS) \ No newline at end of file + $(SED_PROCESS) diff --git a/configure.ac b/configure.ac index 279309bf538d..23b69d5ed886 100644 --- a/configure.ac +++ b/configure.ac @@ -43,11 +43,11 @@ PKG_PROG_PKG_CONFIG m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
# ------------------------------------------------------------------------------ -have_manpages=no -AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages], +have_man_pages=no +AC_ARG_ENABLE(man-pages, AS_HELP_STRING([--disable-man-pages], [do not install man pages])) -AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes]) -AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) +AS_IF([test "x$enable_man_pages" != xno], [have_man_pages=yes]) +AM_CONDITIONAL(ENABLE_MAN_PAGES, [test "x$have_man_pages" = "xyes"])
# ------------------------------------------------------------------------------
@@ -62,5 +62,5 @@ AC_MSG_RESULT([ prefix: ${prefix} sysconfdir: ${sysconfdir}
- Generate man-pages: ${have_manpages} -]) \ No newline at end of file + Generate man-pages: ${have_man_pages} +])
Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- Makefile.am | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/Makefile.am b/Makefile.am index dadb50941269..b36d6ae3ff4e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,6 +26,9 @@ bin_SCRIPTS = \ CLEANFILES += \ nitsi
+EXTRA_DIST += \ + nitsi.in + nitsi_PYTHON = \ src/nitsi/__init__.py \ src/nitsi/disk.py \
Man pages don't exist yet, so make distcheck fails.
This patch has to be reverted as soon as man pages are available.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- Makefile.am | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/Makefile.am b/Makefile.am index b36d6ae3ff4e..5fc9df645a04 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,6 +16,9 @@ EXTRA_DIST = INSTALL_DIRS = noinst_DATA =
+DISTCHECK_CONFIGURE_FLAGS = \ + --disable-man-pages + AM_V_XSLT = $(AM_V_XSLT_$(V)) AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY)) AM_V_XSLT_0 = @echo " XSLT " $@;