From 898d5f6a8992c34d75c62dc224796da4fb14b475 Mon Sep 17 00:00:00 2001 From: frankmorgner Date: Sat, 29 Oct 2011 13:17:12 +0000 Subject: [PATCH] using generic autotools description for all subprojects git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@591 96b47cad-a561-4643-ad3b-153ac7d7599c --- ccid/Makefile.am | 3 +++ ccid/doc/Makefile.am | 21 ++++++++++++++++++++- ccid/doc/README.rst | 8 +------- ccid/doc/autotools.rst.in | 1 + doc/autotools.rst.in | 16 ++++++++++++++++ doc/conf.py | 9 +++++---- npa/Makefile.am | 5 +---- npa/doc/Makefile.am | 9 +++------ npa/doc/README.rst | 8 +------- npa/doc/autotools.rst.in | 1 + pcsc-relay/Makefile.am | 3 +++ pcsc-relay/doc/Makefile.am | 21 ++++++++++++++++++++- pcsc-relay/doc/README.rst | 8 +------- pcsc-relay/doc/autotools.rst.in | 1 + virtualsmartcard/Makefile.am | 3 +-- virtualsmartcard/doc/Makefile.am | 17 +++++++++++++++-- virtualsmartcard/doc/README.rst | 8 +------- virtualsmartcard/doc/autotools.rst.in | 1 + 18 files changed, 95 insertions(+), 48 deletions(-) create mode 120000 ccid/doc/autotools.rst.in create mode 100644 doc/autotools.rst.in create mode 120000 npa/doc/autotools.rst.in create mode 120000 pcsc-relay/doc/autotools.rst.in create mode 120000 virtualsmartcard/doc/autotools.rst.in diff --git a/ccid/Makefile.am b/ccid/Makefile.am index 3847151..10650bf 100644 --- a/ccid/Makefile.am +++ b/ccid/Makefile.am @@ -1,2 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src m4 patches doc + +doc : + $(MAKE) doc -C $(srcdir)/doc diff --git a/ccid/doc/Makefile.am b/ccid/doc/Makefile.am index aa044b3..98d2596 100644 --- a/ccid/doc/Makefile.am +++ b/ccid/doc/Makefile.am @@ -1 +1,20 @@ -EXTRA_DIST = README.rst +do_subst = sed \ + -e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \ + -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \ + -e 's,[@]builddir[@],$(builddir),g' \ + -e 's,[@]prefix[@],$(prefix),g' \ + -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ + -e 's,[@]libdir[@],$(libdir),g' \ + -e 's,[@]includedir[@],$(includedir),g' \ + -e 's,[@]VERSION[@],$(VERSION),g' \ + -e 's,[@]OPENSC_LIBS[@],$(OPENSC_LIBS),g' \ + -e 's,[@]top_srcdir[@],$(top_srcdir),g' + +EXTRA_DIST = README.rst autotools.rst.in + +.PHONY: doc +doc: + $(do_subst) < autotools.rst.in > autotools.rst + +clean-local: + rm -f autotools.rst diff --git a/ccid/doc/README.rst b/ccid/doc/README.rst index 678fa77..faa47f4 100644 --- a/ccid/doc/README.rst +++ b/ccid/doc/README.rst @@ -32,13 +32,7 @@ are based on the GadgetFS_ example and on the source code of the OpenSC_ tools. Installation ============= -ccid uses the GNU Build System to compile and install. If you are unfamiliar -with it, please have a look at the file :file:`INSTALL`. If you have a look around -and can not find it, you are probably working bleeding edge in the repository. -Run the following command in the npa directory to get the missing standard -auxiliary files:: - - autoreconf -i +.. include:: autotools.rst ccid as the following dependencies: diff --git a/ccid/doc/autotools.rst.in b/ccid/doc/autotools.rst.in new file mode 120000 index 0000000..6c037f0 --- /dev/null +++ b/ccid/doc/autotools.rst.in @@ -0,0 +1 @@ +../../doc/autotools.rst.in \ No newline at end of file diff --git a/doc/autotools.rst.in b/doc/autotools.rst.in new file mode 100644 index 0000000..7b273e0 --- /dev/null +++ b/doc/autotools.rst.in @@ -0,0 +1,16 @@ +.. highlight:: sh + +@PACKAGE_NAME@ uses the GNU Build System to compile and install. If you are +unfamiliar with it, please have a look at :file:`INSTALL`. If you have a look +around and can not find it, you are probably working bleeding edge in the +repository. Run the following command in the @PACKAGE_NAME@ directory to get +the missing standard auxiliary files:: + + autoreconf -i + +To configure (:command:`configure --help` lists possible options), build and +install @PACKAGE_NAME@ now do the following:: + + ./configure + make + make install diff --git a/doc/conf.py b/doc/conf.py index f81dac7..0d9611f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -12,7 +12,11 @@ # serve to show the default. import sys, os, breathe -from sphinxcontrib.doxylink import doxylink + +os.system("make doc -C npa >/dev/null") +os.system("make doc -C virtualsmartcard >/dev/null") +os.system("make doc -C ccid >/dev/null") +os.system("make doc -C pcsc-relay >/dev/null") # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -215,9 +219,6 @@ man_pages = [ ('index', 'virtualsmartcardarchitecture', u'Virtual Smartcard Architecture Documentation', [u'Dominik Oepen, Frank Morgner'], 1) ] - -os.system("make doc -C npa >/dev/null") -os.system("make doc -C virtualsmartcard >/dev/null") breathe_projects = {"npa": "npa/xml"} breathe_default_project = "npa" doxylink = { 'npa' : ('npa/npa.tag', '_static/doxygen-npa/'), } diff --git a/npa/Makefile.am b/npa/Makefile.am index 119d0f5..ce2bb50 100644 --- a/npa/Makefile.am +++ b/npa/Makefile.am @@ -21,11 +21,8 @@ win: ./configure --disable-doc && \ env OPENSSL_VERSION="1" OPENSSL_URL="https://www2.informatik.hu-berlin.de/~morgner/files/openssl-1.tar.gz" EXTRA_OPENSSL_CONFIG="experimental-pace" win32/installer_from_build.sh -if DOC_ENABLED -.PHONY: doc doc : - $(MAKE) doc -C doc -endif + $(MAKE) doc -C $(srcdir)/doc pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libnpa.pc diff --git a/npa/doc/Makefile.am b/npa/doc/Makefile.am index a58870f..0192f07 100644 --- a/npa/doc/Makefile.am +++ b/npa/doc/Makefile.am @@ -1,5 +1,3 @@ -ACLOCAL_AMFLAGS = -I m4 - do_subst = sed \ -e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \ -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \ @@ -12,15 +10,14 @@ do_subst = sed \ -e 's,[@]OPENSC_LIBS[@],$(OPENSC_LIBS),g' \ -e 's,[@]top_srcdir[@],$(top_srcdir),g' -EXTRA_DIST = README.rst Doxyfile.in example.c +EXTRA_DIST = README.rst Doxyfile.in example.c autotools.rst.in -if DOC_ENABLED .PHONY: doc doc: $(do_subst) < Doxyfile.in > Doxyfile $(DOXYGEN) Doxyfile touch api.rst -endif + $(do_subst) < autotools.rst.in > autotools.rst clean-local: - rm -f Doxyfile + rm -f Doxyfile autotools.rst diff --git a/npa/doc/README.rst b/npa/doc/README.rst index 0739cc0..6b8a0e2 100644 --- a/npa/doc/README.rst +++ b/npa/doc/README.rst @@ -35,13 +35,7 @@ APDUs inside a secure messaging channel established with PACE. Installation ============ -npa uses the GNU Build System to compile and install. If you are unfamiliar -with it, please have a look at file:`INSTALL`. If you have a look around -and can not find it, you are probably working bleeding edge in the repository. -Run the following command in the npa directory to get the missing standard -auxiliary files:: - - autoreconf -i +.. include:: autotools.rst npa has the following dependencies: diff --git a/npa/doc/autotools.rst.in b/npa/doc/autotools.rst.in new file mode 120000 index 0000000..6c037f0 --- /dev/null +++ b/npa/doc/autotools.rst.in @@ -0,0 +1 @@ +../../doc/autotools.rst.in \ No newline at end of file diff --git a/pcsc-relay/Makefile.am b/pcsc-relay/Makefile.am index 3920780..67ef6bf 100644 --- a/pcsc-relay/Makefile.am +++ b/pcsc-relay/Makefile.am @@ -1 +1,4 @@ SUBDIRS = src doc + +doc : + $(MAKE) doc -C $(srcdir)/doc diff --git a/pcsc-relay/doc/Makefile.am b/pcsc-relay/doc/Makefile.am index aa044b3..98d2596 100644 --- a/pcsc-relay/doc/Makefile.am +++ b/pcsc-relay/doc/Makefile.am @@ -1 +1,20 @@ -EXTRA_DIST = README.rst +do_subst = sed \ + -e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \ + -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \ + -e 's,[@]builddir[@],$(builddir),g' \ + -e 's,[@]prefix[@],$(prefix),g' \ + -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ + -e 's,[@]libdir[@],$(libdir),g' \ + -e 's,[@]includedir[@],$(includedir),g' \ + -e 's,[@]VERSION[@],$(VERSION),g' \ + -e 's,[@]OPENSC_LIBS[@],$(OPENSC_LIBS),g' \ + -e 's,[@]top_srcdir[@],$(top_srcdir),g' + +EXTRA_DIST = README.rst autotools.rst.in + +.PHONY: doc +doc: + $(do_subst) < autotools.rst.in > autotools.rst + +clean-local: + rm -f autotools.rst diff --git a/pcsc-relay/doc/README.rst b/pcsc-relay/doc/README.rst index ccb9227..ba6975d 100644 --- a/pcsc-relay/doc/README.rst +++ b/pcsc-relay/doc/README.rst @@ -26,13 +26,7 @@ ISO/IEC 14443 smart card. Installation ============ -pcsc-relay uses the GNU Build System to compile and install. If you are -unfamiliar with it, please have a look at the file :file:`INSTALL`. If you have a -look around and can not find it, you are probably working bleeding edge in the -repository. Run the following command in the pcsc-relay directory to get the -missing standard auxiliary files:: - - autoreconf -i +.. include:: autotools.rst pcsc-relay has the following dependencies: diff --git a/pcsc-relay/doc/autotools.rst.in b/pcsc-relay/doc/autotools.rst.in new file mode 120000 index 0000000..6c037f0 --- /dev/null +++ b/pcsc-relay/doc/autotools.rst.in @@ -0,0 +1 @@ +../../doc/autotools.rst.in \ No newline at end of file diff --git a/virtualsmartcard/Makefile.am b/virtualsmartcard/Makefile.am index f7d87a2..bfe12bc 100644 --- a/virtualsmartcard/Makefile.am +++ b/virtualsmartcard/Makefile.am @@ -1,5 +1,4 @@ SUBDIRS = src doc -.PHONY: doc doc: - $(MAKE) doc -C doc + $(MAKE) doc -C $(srcdir)/doc diff --git a/virtualsmartcard/doc/Makefile.am b/virtualsmartcard/doc/Makefile.am index 1bfa818..bbab0e2 100644 --- a/virtualsmartcard/doc/Makefile.am +++ b/virtualsmartcard/doc/Makefile.am @@ -1,8 +1,21 @@ -EXTRA_DIST = README.rst generate_modules.py api +do_subst = sed \ + -e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \ + -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \ + -e 's,[@]builddir[@],$(builddir),g' \ + -e 's,[@]prefix[@],$(prefix),g' \ + -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ + -e 's,[@]libdir[@],$(libdir),g' \ + -e 's,[@]includedir[@],$(includedir),g' \ + -e 's,[@]VERSION[@],$(VERSION),g' \ + -e 's,[@]OPENSC_LIBS[@],$(OPENSC_LIBS),g' \ + -e 's,[@]top_srcdir[@],$(top_srcdir),g' + +EXTRA_DIST = README.rst generate_modules.py api autotools.rst.in .PHONY: doc doc: + $(do_subst) < autotools.rst.in > autotools.rst ./generate_modules.py $(top_srcdir)/src/vpicc --dest-dir=api --suffix=rst --no-toc -1 clean-local: - rm -rf api/* + rm -rf api/* autotools.rst diff --git a/virtualsmartcard/doc/README.rst b/virtualsmartcard/doc/README.rst index a053750..d0c2fe2 100644 --- a/virtualsmartcard/doc/README.rst +++ b/virtualsmartcard/doc/README.rst @@ -43,13 +43,7 @@ cyberflex-shell_. Installation ------------ -virtualsmartcard uses the GNU Build System to compile and install. If you are -unfamiliar with it, please have a look at the file :file:`INSTALL`. If you have a -look around and can not find it, you are probably working bleeding edge in the -repository. Run the following command in the virtualsmartcard directory to get -the missing standard auxiliary files:: - - autoreconf -i +.. include:: autotools.rst Depending on your usage of the |vpicc| you might or might not need the following: diff --git a/virtualsmartcard/doc/autotools.rst.in b/virtualsmartcard/doc/autotools.rst.in new file mode 120000 index 0000000..6c037f0 --- /dev/null +++ b/virtualsmartcard/doc/autotools.rst.in @@ -0,0 +1 @@ +../../doc/autotools.rst.in \ No newline at end of file