From 0763bb19496b63d66f98f0bb1e3d8ce667e8852e Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 21 Oct 2003 18:59:15 +0000 Subject: create autotools setup 2003-10-21 Havoc Pennington * create autotools setup --- menu/.cvsignore | 11 ++++++++++ menu/AUTHORS | 0 menu/COPYING | 2 ++ menu/ChangeLog | 4 ++++ menu/Makefile.am | 16 ++++++++++++++ menu/NEWS | 0 menu/README | 1 + menu/autogen.sh | 3 +++ menu/configure.in | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ menu/menu-spec.xml | 4 ++-- menu/tests/menutest | 9 +++++++- 11 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 menu/.cvsignore create mode 100644 menu/AUTHORS create mode 100644 menu/COPYING create mode 100644 menu/ChangeLog create mode 100644 menu/Makefile.am create mode 100644 menu/NEWS create mode 100644 menu/README create mode 100755 menu/autogen.sh create mode 100644 menu/configure.in diff --git a/menu/.cvsignore b/menu/.cvsignore new file mode 100644 index 0000000..f90eaaf --- /dev/null +++ b/menu/.cvsignore @@ -0,0 +1,11 @@ +config.log +config.status +config.sub +configure +Makefile +Makefile.in +aclocal.m4 +autom4te.cache +config.guess +config.h +config.h.in diff --git a/menu/AUTHORS b/menu/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/menu/COPYING b/menu/COPYING new file mode 100644 index 0000000..73e7995 --- /dev/null +++ b/menu/COPYING @@ -0,0 +1,2 @@ +FIXME - we need a license for specs + diff --git a/menu/ChangeLog b/menu/ChangeLog new file mode 100644 index 0000000..7de8791 --- /dev/null +++ b/menu/ChangeLog @@ -0,0 +1,4 @@ +2003-10-21 Havoc Pennington + + * create autotools setup + diff --git a/menu/Makefile.am b/menu/Makefile.am new file mode 100644 index 0000000..92448da --- /dev/null +++ b/menu/Makefile.am @@ -0,0 +1,16 @@ +HTML_FILES= menu-spec.html + +XML_FILES= menu-spec.xml + +EXTRA_DIST= $(HTML_FILES) $(XML_FILES) + +if XML_DOCS_ENABLED +all-local: $(HTML_FILES) +endif + +%.html: %.xml + $(XMLTO) html-nochunks $< + +maintainer-clean-local: + rm -f $(HTML_FILES) + diff --git a/menu/NEWS b/menu/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/menu/README b/menu/README new file mode 100644 index 0000000..0edf632 --- /dev/null +++ b/menu/README @@ -0,0 +1 @@ +This is the specification and test suite for the menu system. diff --git a/menu/autogen.sh b/menu/autogen.sh new file mode 100755 index 0000000..b1376df --- /dev/null +++ b/menu/autogen.sh @@ -0,0 +1,3 @@ +#! /bin/sh +autoreconf -v --install || exit 1 +./configure --enable-maintainer-mode "$@" diff --git a/menu/configure.in b/menu/configure.in new file mode 100644 index 0000000..7a5a76c --- /dev/null +++ b/menu/configure.in @@ -0,0 +1,61 @@ +dnl -*- mode: m4 -*- +AC_PREREQ(2.52) + +AC_INIT(menu-spec.xml) + +AM_INIT_AUTOMAKE(desktop-menu-spec, 0.7) + +# Honor aclocal flags +ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" + + ## must come before we use the $USE_MAINTAINER_MODE variable later +AM_MAINTAINER_MODE + +AC_ARG_ENABLE(xml-docs, [ --enable-xml-docs build XML into HTML (requires xmlto)],enable_xml_docs=$enableval,enable_xml_docs=auto) + +### XML tools + +AC_PATH_PROG(XMLTO, xmlto, no) + +AC_MSG_CHECKING([whether to build XML documentation]) + +if test x$XMLTO = xno ; then + have_xmlto=no +else + have_xmlto=yes +fi + +if test x$enable_xml_docs = xauto ; then + if test x$have_xmlto = xno ; then + enable_xml_docs=no + else + enable_xml_docs=yes + fi +fi + +if test x$enable_xml_docs = xyes; then + if test x$have_xmlto = xno; then + AC_MSG_ERROR([Building XML docs explicitly required, but xmlto not found]) + fi +fi + +AM_CONDITIONAL(XML_DOCS_ENABLED, test x$enable_xml_docs = xyes) +AC_MSG_RESULT(yes) + +AC_OUTPUT([ +Makefile +]) + +dnl ========================================================================== +echo " + Menu specification $VERSION + ============== + + prefix: ${prefix} + source code location: ${srcdir} + xmlto: ${XMLTO}" + +echo " + Maintainer mode: ${USE_MAINTAINER_MODE} + Building XML docs: ${enable_xml_docs} +" diff --git a/menu/menu-spec.xml b/menu/menu-spec.xml index d1975ec..080f143 100644 --- a/menu/menu-spec.xml +++ b/menu/menu-spec.xml @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ ]>
- + Desktop Menu Specification Version 0.7 30 September 2003 @@ -62,7 +62,7 @@ - + Introduction diff --git a/menu/tests/menutest b/menu/tests/menutest index d164f26..33dd4b8 100755 --- a/menu/tests/menutest +++ b/menu/tests/menutest @@ -82,6 +82,7 @@ for TEST in ${TESTS}; do fi done + echo "OK tests: ${SUCCEEDED}" if ! test -z "${FAILED}" ; then @@ -89,4 +90,10 @@ if ! test -z "${FAILED}" ; then exit 1 fi -exit 0 +echo `echo ${SUCCEEDED} | wc -w`' tests passed, '`echo ${FAILED} | wc -w`' tests failed' + +if test -z "${FAILED}" ; then + exit 0 +else + exit 1 +fi -- cgit v1.2.3-70-g09d2