1 ################################################################################
3 # nant.cygclass - functions for building .NET packages with NAnt
5 # Part of cygport - Cygwin packaging application
6 # Copyright (C) 2006-2020 Cygport authors
7 # Provided by the Cygwin project <https://cygwin.com/>
9 # cygport is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # cygport is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with cygport. If not, see <https://www.gnu.org/licenses/>.
22 ################################################################################
24 #****ih* Cygclasses/nant.cygclass
28 # NAnt is a build system written in .NET and used in some .NET projects.
29 # The build is controlled by a single XML file, named '*.build' by default,
30 # which specifies the targets to be built, the commands to build them, and the
31 # options which may be given to control the build.
33 # NAnt includes support for a number of commands (called tasks), including
34 # compiling and executing .NET code, generating documentation, downloading
35 # files, de/compressing archives, and running testsuites. Third-party NAnt
36 # tasks also exist to support additional commands.
38 # This cygclass builds packages which use the NAnt build system.
49 #****id* nant.cygclass/NANT
51 # Absolute path to the NAnt build tool.
55 #****iv* nant.cygclass/NANT_BUILD_FILE
57 # Name or relative path of the NAnt build file. This need only be defined
58 # if it is not '*.build' (the default).
61 #****iC* nant.cygclass/cygnant
65 # Runs NAnt with the given options, if any.
70 if ! find . -maxdepth 1 -name "${NANT_BUILD_FILE:*.build}"
72 error "NAnt *.build file not found"
75 if defined NANT_BUILD_FILE
77 fileargs="-buildfile:${NANT_BUILD_FILE}"
80 /usr/bin/nant ${fileargs} ${@} || error "nant build failed"
83 #****iI* nant.cygclass/donanttask
85 # donanttask ASSEMBLY [ASSEMBLY] ...
87 # Installs the given assembly file(s) into the NAnt task directory.
90 local _insinto_tmp=${_insinto_dir}
92 insinto /usr/share/NAnt/bin/tasks
95 _insinto_dir=${_insinto_tmp}
98 #****iv* nant.cygclass/NANT_BUILD_ARGS
100 # Arguments to pass to the NAnt build command if this src_compile is used.
102 #****iv* nant.cygclass/NANT_BUILD_TARGETS
104 # Target(s) to be built during the NAnt build command if this src_compile is used.
107 #****io* nant.cygclass/src_compile (nant)
112 cygnant ${NANT_BUILD_ARGS} ${NANT_BUILD_TARGETS}
116 #****iv* nant.cygclass/NANT_TEST_ARGS
118 # Arguments to pass to NAnt during testing if this src_test is used.
120 #****iv* nant.cygclass/NANT_TEST_TARGETS
122 # Target(s) to be built to run the testsuite if this src_test is used.
125 #****io* nant.cygclass/src_test (nant)
129 cygnant ${NANT_TEST_ARGS} ${NANT_TEST_TARGETS:-test}
133 readonly -f cygnant donanttask