Added documentation generation to build process

git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@525 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
oepen
2011-09-06 12:37:43 +00:00
parent be4fb180ca
commit ade39a9ef8
5 changed files with 25 additions and 5 deletions

View File

@@ -53,6 +53,17 @@ if test "${serialdropdir}" = false ; then
fi
fi
# Documentation (default: no)
AC_ARG_ENABLE([doc],AS_HELP_STRING([--enable-doc],[Enable documentation generation.]),[enable_doc=$enableval],[enable_doc="no"])
if test x"$enable_doc" = "xyes"
then
AC_PATH_PROG([DOXYGEN], [doxygen])
if test x$DOXYGEN = x
then
AC_MSG_ERROR([doxygen is mandatory.])
fi
fi
AM_CONDITIONAL(DOC_ENABLED, [test x"$enable_doc" = xyes])
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])

View File

@@ -1,6 +1,6 @@
bin_SCRIPTS = vicc
CLEANFILES = $(bin_SCRIPTS)
EXTRA_DIST = vicc.in
EXTRA_DIST = vicc.in Doxyfile.in
vpiccdir = $(pythondir)/virtualsmartcard
vpicccardsdir = $(vpiccdir)/cards
@@ -26,3 +26,10 @@ do_subst = sed -e 's,[@]PYTHON[@],$(PYTHON),g'
vicc: vicc.in Makefile
$(do_subst) < $(srcdir)/vicc.in > vicc
chmod +x vicc
if DOC_ENABLED
.PHONY: doc
doc:
$(do_subst) Doxyfile.in > Doxyfile
$(DOXYGEN) Doxyfile
endif

View File

@@ -95,7 +95,8 @@ FID["PATHSELECTION"] = 0x3FFF
FID["RESERVED"] = 0x3FFF
# }}}
#SM constants {{{
#Secure Messaging constants
#{{{
SM_Class = {}
#Basic secure messaging objects

View File

@@ -220,7 +220,7 @@ def make_property(prop, doc): # {{{
# }}}
class File(object): # {{{
class File(object):
"""Template class for a smartcard file."""
bertlv_data = make_property("bertlv_data", "list of (tag, length, value)-tuples of BER-TLV coded data objects (encrypted)")
lifecycle = make_property("lifecycle", "life cycle byte")

View File

@@ -263,8 +263,9 @@ class Iso7816OS(SmartcardOS): # {{{
except ValueError, e:
logging.warning(str(e))
return self.formatResult(0, "", SW["ERR_INCORRECTPARAMETERS"], False)
#Handle Class Byte{{{
#Handle Class Byte
#{{{
class_byte = c.cla
SM_STATUS = None
logical_channel = 0