X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fbuild%2FREADME.makefiles;h=1e1ace7d7b136e1ffce23cc783a72f27476f499d;hb=e7951e6ee0786855af92d677d5fb20fe14f5ecdf;hp=7460e88ff3809814d549e1afa40688e98d08e1dd;hpb=af90548a08ef5effc93b083b7eec44daa178b141;p=mono.git diff --git a/mcs/build/README.makefiles b/mcs/build/README.makefiles index 7460e88ff38..1e1ace7d7b1 100644 --- a/mcs/build/README.makefiles +++ b/mcs/build/README.makefiles @@ -11,6 +11,7 @@ build system needs to let us do, specifically: * Make distributions easily * Provide a framework for testing * Build platform-independently whenever possible + * Generate, update, and build monodoc documentation. @@ -47,20 +48,22 @@ DISTFILES = myfile.txt my_test_source.cs dist-local: dist-default +doc-update-local: + my_test_program.exe: my_test_source.cs $(CSCOMPILE) /target:exe /out:$@ $< ======================================== Each makefile follows the same pattern: it does some setup, includes -the standard make rules, and provides rules for seven standard targets: -all, install, test, run-test, clean, and dist. +the standard make rules, and provides rules for eight standard targets: +all, install, test, run-test, clean, dist, and doc-update. "Some setup" is defining two variables: $(thisdir) and $(SUBDIRS). $(thisdir) is the directory that the makefile lives in, relative to the top directory (ie, class/corlib) and $(SUBDIRS) defines the subdirectories that should be built in. -The seven targets do the following: +The eight targets do the following: * all-local builds whatever someone would expect to be built when they just type 'make'. Most likely Foo.dll or Foo.exe @@ -88,6 +91,11 @@ true that all files that go into a tarball need to be left after a make clean.) given by the variable $(distdir). dist-local always depends on the target 'dist-default'. See ** 'make dist' below. + * doc-update-local should generate or update monodoc documentation, +if appropriate. This is usually only appropriate for libraries. It's +defined as a standard target so that it can easily be run recursively +across all libraries within the module. + @@ -258,6 +266,23 @@ mytester.exe: mytester.cs $(CSCOMPILE) /target:exe /out:$@ mytester.cs ======================================== +If your program has NUnit tests, set the variable HAS_NUNIT_TEST: + +======================================== +PROGRAM = myprogram.exe +LOCAL_MCS_FLAGS = /r:System.Xml.dll +HAS_NUNIT_TEST = yes +include ../build/executable.make +======================================== + +HAS_NUNIT_TEST tests follow library.make NUnit test conventions: +the files should be in a subdirectory called Test/, and if +your program is called myprogram.exe, they should be listed in +myprogram_test.dll.sources. The names in that files should *not* have +the Test/ prefix. 'make test' will build myprogram_test_$(PROFILE).dll +in the current directory, automatically supplying the flags to +reference the original program and NUnit.Framework.dll. + If your program has 'built sources', that is, source files generated from other files (say, generated by jay), define a variable called BUILT_SOURCES and do *not* list the sources in $(PROGRAM).sources: @@ -365,6 +390,14 @@ If you're building a library, library.make is highly recommended; the only DLL that doesn't use it is corlib, because building corlib is a fair bit more complicated than it should be. Oh well. +library.make also automatically supports generating and updating +monodoc documentation. Documentation is stored within the +Documentation directory (a sibling to the Test directory), and is +generated/updated whenever the doc-update target is executed. +Assembling of the documentation so that the monodoc browser can +display the documentation is handled separately within the mcs/docs +all-local target; see mcs/docs/Makefile for details. + @@ -408,6 +441,21 @@ variable $(CFLAGS) will automatically be included on the command line. +* Documentation-related needs? Use $(MDOC) + +$(MDOC) is a front-end to the monodoc documentation system, supporting +documentation generation, updating, importing from Microsoft XML +Documentation and ECMA documentation formats, assembling documentation +for use within the monodoc documentation browser, and exporting +documentation to various other output formats such as static HTML. + +It is currently only used for library.make's doc-update-local target +and for assembling documentation within $topdir/docs. + + + + + * Installing files? Use $(MKINSTALLDIRS), $(INSTALL_DATA) or $(INSTALL_BIN), $(prefix), and $(DESTDIR).