Commit b7049747 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(check-doc): Only perform the tests if HAVE_PYTHON is set. Use

	$(PYTHON) instead of python.  Print a warning if HAVE_PYTHON
	isn't set.
parent c60b2fa5
# $Id: Makefile.am,v 1.54 2003/08/13 13:29:35 ceder Exp $ # $Id: Makefile.am,v 1.55 2003/08/13 20:38:42 ceder Exp $
# Copyright (C) 1998-1999, 2001-2002 Lysator Academic Computer Association. # Copyright (C) 1998-1999, 2001-2002 Lysator Academic Computer Association.
# #
# This file is part of the LysKOM server. # This file is part of the LysKOM server.
...@@ -132,6 +132,7 @@ update-www: protocol-a.info protocol-a.html protocol-a/index.html \ ...@@ -132,6 +132,7 @@ update-www: protocol-a.info protocol-a.html protocol-a/index.html \
check: check-doc pdf dvi check: check-doc pdf dvi
check-doc: Protocol-A.notab lyskomd.notab info check-doc: Protocol-A.notab lyskomd.notab info
if HAVE_PYTHON
## Create a list of all aux-items. ## Create a list of all aux-items.
sed -n 's/[0-9][0-9]* : \([^ ]*\) (.*/\1/p' \ sed -n 's/[0-9][0-9]* : \([^ ]*\) (.*/\1/p' \
$(top_srcdir)/run-support/aux-items.conf \ $(top_srcdir)/run-support/aux-items.conf \
...@@ -147,11 +148,11 @@ check-doc: Protocol-A.notab lyskomd.notab info ...@@ -147,11 +148,11 @@ check-doc: Protocol-A.notab lyskomd.notab info
> aux-items-extra-@.tmp > aux-items-extra-@.tmp
## Check for any overlap between the aux-item lists. ## Check for any overlap between the aux-item lists.
python $(srcdir)/filterlines.py aux-items-extra-@.tmp \ $(PYTHON) $(srcdir)/filterlines.py aux-items-extra-@.tmp \
< aux-items-@.tmp \ < aux-items-@.tmp \
| diff -c aux-items-@.tmp - | diff -c aux-items-@.tmp -
python $(srcdir)/filterlines.py aux-items-@.tmp \ $(PYTHON) $(srcdir)/filterlines.py aux-items-@.tmp \
< aux-items-extra-@.tmp \ < aux-items-extra-@.tmp \
| diff -c aux-items-extra-@.tmp - | diff -c aux-items-extra-@.tmp -
...@@ -201,7 +202,7 @@ check-doc: Protocol-A.notab lyskomd.notab info ...@@ -201,7 +202,7 @@ check-doc: Protocol-A.notab lyskomd.notab info
> miscs-@.tmp > miscs-@.tmp
## Create a list of all conf-type bits. ## Create a list of all conf-type bits.
python $(srcdir)/tac.py < $(top_srcdir)/src/include/kom-types.h \ $(PYTHON) $(srcdir)/tac.py < $(top_srcdir)/src/include/kom-types.h \
| sed -e '/} Conf_type/,/typedef/!d' \ | sed -e '/} Conf_type/,/typedef/!d' \
| sed -n -e 's/.*unsigned int[ ]*\([^ :]*\)[ ]*:.*/\1/p' \ | sed -n -e 's/.*unsigned int[ ]*\([^ :]*\)[ ]*:.*/\1/p' \
| sed -e 's/_/-/g' \ | sed -e 's/_/-/g' \
...@@ -254,7 +255,7 @@ check-doc: Protocol-A.notab lyskomd.notab info ...@@ -254,7 +255,7 @@ check-doc: Protocol-A.notab lyskomd.notab info
> errorcodes-@.tmp > errorcodes-@.tmp
## Create a list of all privilege bits. ## Create a list of all privilege bits.
python $(srcdir)/tac.py < $(top_srcdir)/src/include/kom-types.h \ $(PYTHON) $(srcdir)/tac.py < $(top_srcdir)/src/include/kom-types.h \
| sed -n -e '/} Priv_bits;/,/typedef[ ]struct/!d' \ | sed -n -e '/} Priv_bits;/,/typedef[ ]struct/!d' \
-e 's/_/-/g' \ -e 's/_/-/g' \
-e 's/.* int[ ]\([-a-z0-9]*\)[ ]*:.*/\1/p' \ -e 's/.* int[ ]\([-a-z0-9]*\)[ ]*:.*/\1/p' \
...@@ -294,7 +295,7 @@ check-doc: Protocol-A.notab lyskomd.notab info ...@@ -294,7 +295,7 @@ check-doc: Protocol-A.notab lyskomd.notab info
| grep -v '@field{' \ | grep -v '@field{' \
| grep -v '@anchor{' \ | grep -v '@anchor{' \
| grep -v '@lt{' \ | grep -v '@lt{' \
| python $(srcdir)/filterlines.py \ | $(PYTHON) $(srcdir)/filterlines.py \
aux-items-@.tmp \ aux-items-@.tmp \
aux-items-extra-@.tmp \ aux-items-extra-@.tmp \
requests-@.tmp \ requests-@.tmp \
...@@ -313,7 +314,13 @@ check-doc: Protocol-A.notab lyskomd.notab info ...@@ -313,7 +314,13 @@ check-doc: Protocol-A.notab lyskomd.notab info
## Check @rarg{} and @aarg{} constructs. They are only allowed ## Check @rarg{} and @aarg{} constructs. They are only allowed
## to refer to named arguments of the call they are documenting. ## to refer to named arguments of the call they are documenting.
python $(srcdir)/checkargs.py $(srcdir)/Protocol-A.texi $(PYTHON) $(srcdir)/checkargs.py $(srcdir)/Protocol-A.texi
else
@echo >&2
@echo WARNING: no python interpreter was found by configure, so >&2
@echo most documentation tests could not be run. >&2
@echo >&2
endif
# The targets below are for the benefit of the Xenofarm automated # The targets below are for the benefit of the Xenofarm automated
# builds. They provide information for the build summary. See # builds. They provide information for the build summary. See
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment