WIP [library.make] Make resource usage declarative in the class libraries (#3159)
[mono.git] / mcs / build / README.makefiles
index 610468d5cdf6e66573dc352ce48244676ffd7796..f5b95a5a32e011e5a092d80d945a1136cbf634ff 100644 (file)
@@ -15,8 +15,6 @@ build system needs to let us do, specifically:
 
 
 
-
-
 ** Makefile structure
 
 A general makefile looks like this:
@@ -266,6 +264,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:
@@ -421,7 +436,15 @@ To give it flags, set $(LOCAL_CFLAGS). As with compiling C#, the
 variable $(CFLAGS) will automatically be included on the command line.
 
 
+* Compiling resources with resgen
+
+If you have a resource that should be compiled with resgen and
+included in your assembly, you can use the RESOURCES_DEFS variable.
+This variable can contain lists of pairs that are separated by comma
+to represent the resource ID as embedded in the assembly followed by
+the file name, like this:
 
+RESOURCE_DEFS = Messages,TextResources.resx Errors,ErrorList.txt
 
 
 * Documentation-related needs? Use $(MDOC)