Permalink
Browse files

Add documentation

svn path=/trunk/njb-sharp/; revision=51631
  • Loading branch information...
1 parent c179d67 commit 971d0cad693e743293c76897f853f0b3e4682103 @abock abock committed Oct 11, 2005
View
@@ -19,19 +19,42 @@ AM_PROG_LIBTOOL
PKG_CHECK_MODULES(NJB,
libnjb >= 2.2.4)
-AC_PATH_PROG(MONO, mono)
-if test "x$MONO" = "x"; then
+AC_PATH_PROG(MONO, mono, no)
+if test "x$MONO" = "xno"; then
AC_MSG_ERROR([Can not find "mono" in your PATH])
fi
-AC_PATH_PROG(MCS, mcs)
-if test "x$MCS" = "x"; then
+AC_PATH_PROG(MCS, mcs, no)
+if test "x$MCS" = "xno"; then
AC_MSG_ERROR([Can not find "mcs" in your PATH])
fi
+AC_ARG_ENABLE(docs, AC_HELP_STRING([--disable-docs], [Do not build documentation]), with_docs=no, with_docs=yes)
+
+if test "x$with_docs" = "xyes"; then
+ AC_PATH_PROG(MONODOCER, monodocer, no)
+ if test "x$MONODOC" = "xno"; then
+ AC_MSG_ERROR([You need to install monodoc])
+ fi
+
+ AC_PATH_PROG(MDASSEMBLER, mdassembler, no)
+ if test "x$MDASSEMBLER" = "xno"; then
+ AC_MSG_ERROR([You need to install mdassembler])
+ fi
+
+ DOCDIR=`$PKG_CONFIG monodoc --variable=sourcesdir`
+ AC_SUBST(DOCDIR)
+
+ AM_CONDITIONAL(BUILD_DOCS, true)
+else
+ AC_MSG_NOTICE([not building API documentation])
+ AM_CONDITIONAL(BUILD_DOCS, false)
+fi
+
AC_OUTPUT([
Makefile
njb-sharp.pc
src/Makefile
+ src/AssemblyInfo.cs
])
View
@@ -0,0 +1,39 @@
+/* -*- Mode: csharp; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: t -*- */
+/***************************************************************************
+ * AssemblyInfo.cs
+ *
+ * Copyright (C) 2005 Novell
+ * Written by Aaron Bockover (aaron@aaronbock.net)
+ ****************************************************************************/
+
+/* AUTOGENERATED!! DO NOT EDIT!! */
+
+/* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW:
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyVersion("@MAJOR_VERSION@.@MINOR_VERSION@.@MICRO_VERSION@.*")]
+[assembly: AssemblyTitle("njb-sharp")]
+[assembly: AssemblyDescription("njb-sharp provides C# bindings to libnjb (http://libnjb.sourceforge.net)")]
+[assembly: AssemblyCopyright("Copyright 2005 Novell, Inc.")]
+[assembly: AssemblyCompany("Novell, Inc")]
View
@@ -2,6 +2,9 @@ ASSEMBLY = njb-sharp.dll
TESTASM = njb-test.exe
INCLUDES = $(NJB_CFLAGS)
+DOC_UPDATER = @MONODOCER@ -delete
+DOC_ASSEMBLER = @MDASSEMBLER@ --out njb-sharp-docs --ecma
+
njbdir = $(prefix)/lib/njb-sharp
njb_DATA = $(ASSEMBLY)
njb_LTLIBRARIES = libnjbglue.la
@@ -25,19 +28,42 @@ ASSEMBLY_SOURCES = \
TESTASM_SOURCES = \
$(srcdir)/NjbTest.cs
+if BUILD_DOCS
+docdir = $(DOCDIR)
+doc_DATA = \
+ njb-sharp-docs.zip \
+ njb-sharp-docs.tree \
+ njb-sharp-docs.source
+endif
+
+njb_sharp_sources_in = AssemblyInfo.cs.in
+njb_sharp_generated_sources = $(njb_sharp_sources_in:.in=)
+
all: $(ASSEMBLY) $(TESTASM)
$(ASSEMBLY): $(ASSEMBLY_SOURCES)
- $(MCS) $(MCS_FLAGS) -target:library -out:$@ $(ASSEMBLY_SOURCES)
+ $(MCS) $(MCS_FLAGS) -target:library -out:$@ $(ASSEMBLY_SOURCES) $(njb_sharp_generated_sources)
$(TESTASM): $(TESTASM_SOURCES)
$(MCS) $(MCS_FLAGS) -out:$@ -r:$(ASSEMBLY) $(TESTASM_SOURCES)
+update-docs: $(ASSEMBLY)
+ $(DOC_UPDATER) -assembly:$(ASSEMBLY) -path:en
+
+njb-sharp-docs.zip njb-sharp-docs.tree: $(srcdir)/en/*/*.xml
+ $(DOC_ASSEMBLER) $(srcdir)/en
+
run:
$(MONO) $(TESTASM)
-EXTRA_DIST = $(ASSEMBLY_SOURCES) $(TESTASM_SOURCES)
+EXTRA_DIST = \
+ $(ASSEMBLY_SOURCES) \
+ $(TESTASM_SOURCES) \
+ $(srcdir)/en/*.xml \
+ $(srcdir)/en/*/*.xml \
+ njb-sharp-docs.source \
+ AssemblyInfo.cs.in
CLEANFILES = $(ASSEMBLY) $(TESTASM)
-DISTCLEANFILES = Makefile.in
+DISTCLEANFILES = Makefile.in njb-sharp-docs.zip njb-sharp-docs.tree
View
@@ -0,0 +1,6 @@
+<Namespace Name="Njb">
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+</Namespace>
Oops, something went wrong.

0 comments on commit 971d0ca

Please sign in to comment.