diff options
Diffstat (limited to '')
-rw-r--r-- | Prebuild/src/data/autotools.xml | 790 |
1 files changed, 0 insertions, 790 deletions
diff --git a/Prebuild/src/data/autotools.xml b/Prebuild/src/data/autotools.xml deleted file mode 100644 index ee4b064..0000000 --- a/Prebuild/src/data/autotools.xml +++ /dev/null | |||
@@ -1,790 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <Autotools> | ||
3 | <ProjectAutogenSh> | ||
4 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
5 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
6 | exclude-result-prefixes="dnpb" | ||
7 | > | ||
8 | <xsl:template match="/"><xsl:text disable-output-escaping="yes">#!/bin/sh | ||
9 | # Run this to generate all the initial makefiles, etc. | ||
10 | # Ripped off from Mono, which ripped off from GNOME macros version | ||
11 | |||
12 | DIE=0 | ||
13 | |||
14 | srcdir=`dirname $0` | ||
15 | test -z "$srcdir" && srcdir=. | ||
16 | |||
17 | if [ -n "$MONO_PATH" ]; then | ||
18 | # from -> /mono/lib:/another/mono/lib | ||
19 | # to -> /mono /another/mono | ||
20 | for i in `echo ${MONO_PATH} | tr ":" " "`; do | ||
21 | i=`dirname ${i}` | ||
22 | if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then | ||
23 | ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS" | ||
24 | fi | ||
25 | if [ -n "{i}" -a -d "${i}/bin" ]; then | ||
26 | PATH="${i}/bin:$PATH" | ||
27 | fi | ||
28 | done | ||
29 | export PATH | ||
30 | fi | ||
31 | |||
32 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { | ||
33 | echo | ||
34 | echo "**Error**: You must have \`autoconf' installed to compile Mono." | ||
35 | echo "Download the appropriate package for your distribution," | ||
36 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" | ||
37 | DIE=1 | ||
38 | } | ||
39 | |||
40 | if [ -z "$LIBTOOL" ]; then | ||
41 | LIBTOOL=`which glibtool 2>/dev/null` | ||
42 | if [ ! -x "$LIBTOOL" ]; then | ||
43 | LIBTOOL=`which libtool` | ||
44 | fi | ||
45 | fi | ||
46 | |||
47 | (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { | ||
48 | ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { | ||
49 | echo | ||
50 | echo "**Error**: You must have \`libtool' installed to compile Mono." | ||
51 | echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" | ||
52 | echo "(or a newer version if it is available)" | ||
53 | DIE=1 | ||
54 | } | ||
55 | } | ||
56 | |||
57 | grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { | ||
58 | grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ | ||
59 | (gettext --version) < /dev/null > /dev/null 2>&1 || { | ||
60 | echo | ||
61 | echo "**Error**: You must have \`gettext' installed to compile Mono." | ||
62 | echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" | ||
63 | echo "(or a newer version if it is available)" | ||
64 | DIE=1 | ||
65 | } | ||
66 | } | ||
67 | |||
68 | (automake --version) < /dev/null > /dev/null 2>&1 || { | ||
69 | echo | ||
70 | echo "**Error**: You must have \`automake' installed to compile Mono." | ||
71 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | ||
72 | echo "(or a newer version if it is available)" | ||
73 | DIE=1 | ||
74 | NO_AUTOMAKE=yes | ||
75 | } | ||
76 | |||
77 | # if no automake, don't bother testing for aclocal | ||
78 | test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { | ||
79 | echo | ||
80 | echo "**Error**: Missing \`aclocal'. The version of \`automake'" | ||
81 | echo "installed doesn't appear recent enough." | ||
82 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | ||
83 | echo "(or a newer version if it is available)" | ||
84 | DIE=1 | ||
85 | } | ||
86 | |||
87 | if test "$DIE" -eq 1; then | ||
88 | exit 1 | ||
89 | fi | ||
90 | |||
91 | if test -z "$NOCONFIGURE"; then | ||
92 | |||
93 | if test -z "$*"; then | ||
94 | echo "**Warning**: I am going to run \`configure' with no arguments." | ||
95 | echo "If you wish to pass any to it, please specify them on the" | ||
96 | echo \`$0\'" command line." | ||
97 | echo | ||
98 | fi | ||
99 | |||
100 | fi | ||
101 | |||
102 | case $CC in | ||
103 | xlc ) | ||
104 | am_opt=--include-deps;; | ||
105 | esac | ||
106 | |||
107 | |||
108 | if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then | ||
109 | if test -z "$NO_LIBTOOLIZE" ; then | ||
110 | echo "Running libtoolize..." | ||
111 | ${LIBTOOL}ize --force --copy | ||
112 | fi | ||
113 | fi | ||
114 | |||
115 | echo "Running aclocal $ACLOCAL_FLAGS ..." | ||
116 | aclocal $ACLOCAL_FLAGS || { | ||
117 | echo | ||
118 | echo "**Error**: aclocal failed. This may mean that you have not" | ||
119 | echo "installed all of the packages you need, or you may need to" | ||
120 | echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" | ||
121 | echo "for the prefix where you installed the packages whose" | ||
122 | echo "macros were not found" | ||
123 | exit 1 | ||
124 | } | ||
125 | |||
126 | if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then | ||
127 | echo "Running autoheader..." | ||
128 | autoheader || { echo "**Error**: autoheader failed."; exit 1; } | ||
129 | fi | ||
130 | |||
131 | echo "Running automake --gnu $am_opt ..." | ||
132 | automake --add-missing --gnu $am_opt || | ||
133 | { echo "**Error**: automake failed."; exit 1; } | ||
134 | echo "Running autoconf ..." | ||
135 | autoconf || { echo "**Error**: autoconf failed."; exit 1; } | ||
136 | |||
137 | conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c | ||
138 | |||
139 | if test x$NOCONFIGURE = x; then | ||
140 | echo Running $srcdir/configure $conf_flags "$@" ... | ||
141 | $srcdir/configure $conf_flags "$@" \ | ||
142 | && echo Now type \`make\' to compile $PKG_NAME || exit 1 | ||
143 | else | ||
144 | echo Skipping configure process. | ||
145 | fi | ||
146 | </xsl:text> | ||
147 | </xsl:template> | ||
148 | </xsl:stylesheet> | ||
149 | </ProjectAutogenSh> | ||
150 | |||
151 | <ProjectConfigureAc> | ||
152 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
153 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
154 | exclude-result-prefixes="dnpb" | ||
155 | xml:space="preserve" | ||
156 | > | ||
157 | <!-- Removes the xml version header in the generated file --> | ||
158 | <xsl:output method="text"/> | ||
159 | <xsl:param name="solutionName" /> | ||
160 | <xsl:param name="projectName" /> | ||
161 | <xsl:param name="projectVersion" /> | ||
162 | <xsl:param name="assemblyName" /> | ||
163 | <xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable> | ||
164 | <xsl:template match="/"> | ||
165 | <xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]" | ||
166 | >AC_INIT([<xsl:value-of select="$projectName" />],[<xsl:value-of select="$projectVersion" />]) | ||
167 | |||
168 | AC_PREREQ(2.60) | ||
169 | AC_CANONICAL_SYSTEM | ||
170 | AC_CONFIG_AUX_DIR(.) | ||
171 | AM_INIT_AUTOMAKE([1.9 tar-ustar foreign]) | ||
172 | AM_MAINTAINER_MODE | ||
173 | dnl AC_PROG_INTLTOOL([0.25]) | ||
174 | AC_PROG_INSTALL | ||
175 | |||
176 | ASSEMBLY_NAME=<xsl:value-of select="$assemblyName" /> | ||
177 | PROJECT_NAME=<xsl:value-of select="$projectName" /> | ||
178 | PROJECT_VERSION=$VERSION | ||
179 | PROJECT_DESCRIPTION="<xsl:value-of select="dnpb:Description/text()" />" | ||
180 | PROJECT_TYPE="<xsl:value-of select="@type" />" | ||
181 | |||
182 | AC_SUBST(ASSEMBLY_NAME) | ||
183 | AC_SUBST(PROJECT_NAME) | ||
184 | AC_SUBST(PROJECT_VERSION) | ||
185 | AC_SUBST(DESCRIPTION) | ||
186 | |||
187 | AC_MSG_CHECKING([assembly type]) | ||
188 | case $PROJECT_TYPE in | ||
189 | *Exe) | ||
190 | ASSEMBLY_EXTENSION=exe | ||
191 | ;; | ||
192 | *Library) | ||
193 | ASSEMBLY_EXTENSION=dll | ||
194 | ;; | ||
195 | *) | ||
196 | AC_MSG_ERROR([*** Please add support for project type $PROJECT_TYPE to configure.ac checks!]) | ||
197 | ;; | ||
198 | esac | ||
199 | AC_MSG_RESULT([$PROJECT_TYPE]) | ||
200 | |||
201 | AC_SUBST(ASSEMBLY_EXTENSION) | ||
202 | |||
203 | AC_MSG_CHECKING([whether we're compiling from an RCS]) | ||
204 | if test -f "$srcdir/.cvs_version" ; then | ||
205 | from_rcs=cvs | ||
206 | else | ||
207 | if test -f "$srcdir/.svn/entries" ; then | ||
208 | from_rcs=svn | ||
209 | else | ||
210 | from_rcs=no | ||
211 | fi | ||
212 | fi | ||
213 | |||
214 | AC_MSG_RESULT($from_rcs) | ||
215 | |||
216 | MONO_REQUIRED_VERSION=1.1 | ||
217 | <xsl:text disable-output-escaping="yes"> | ||
218 | PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false) | ||
219 | </xsl:text> | ||
220 | if test "x$has_mono" = "xtrue"; then | ||
221 | AC_PATH_PROG(RUNTIME, mono, no) | ||
222 | AC_PATH_PROG(CSC, gmcs, no) | ||
223 | AC_PATH_PROG(RESGEN, resgen2, no) | ||
224 | if test `uname -s` = "Darwin"; then | ||
225 | LIB_PREFIX= | ||
226 | LIB_SUFFIX=.dylib | ||
227 | else | ||
228 | LIB_PREFIX=.so | ||
229 | LIB_SUFFIX= | ||
230 | fi | ||
231 | else | ||
232 | AC_PATH_PROG(CSC, csc.exe, no) | ||
233 | if test x$CSC = "xno"; then | ||
234 | AC_MSG_ERROR([You need to install either mono or .Net]) | ||
235 | else | ||
236 | RUNTIME= | ||
237 | LIB_PREFIX= | ||
238 | LIB_SUFFIX= | ||
239 | fi | ||
240 | fi | ||
241 | |||
242 | AC_PATH_PROG(GACUTIL, gacutil) | ||
243 | if test "x$GACUTIL" = "xno" ; then | ||
244 | AC_MSG_ERROR([No gacutil tool found]) | ||
245 | fi | ||
246 | |||
247 | GACUTIL_FLAGS='/package <xsl:value-of select="$assemblyName" /> /gacdir $(DESTDIR)$(prefix)/lib' | ||
248 | AC_SUBST(GACUTIL_FLAGS) | ||
249 | |||
250 | AC_SUBST(PATH) | ||
251 | AC_SUBST(LD_LIBRARY_PATH) | ||
252 | |||
253 | AC_SUBST(LIB_PREFIX) | ||
254 | AC_SUBST(LIB_SUFFIX) | ||
255 | AC_SUBST(RUNTIME) | ||
256 | AC_SUBST(CSC) | ||
257 | AC_SUBST(RESGEN) | ||
258 | AC_SUBST(GACUTIL) | ||
259 | |||
260 | AC_SUBST(BASE_DEPENDENCIES_CFLAGS) | ||
261 | AC_SUBST(BASE_DEPENDENCIES_LIBS) | ||
262 | |||
263 | dnl Find monodoc | ||
264 | MONODOC_REQUIRED_VERSION=1.0 | ||
265 | AC_SUBST(MONODOC_REQUIRED_VERSION) | ||
266 | <xsl:text disable-output-escaping="yes"> | ||
267 | PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no) | ||
268 | </xsl:text> | ||
269 | if test "x$enable_monodoc" = "xyes"; then | ||
270 | AC_PATH_PROG(MONODOC, monodoc, no) | ||
271 | if test x$MONODOC = xno; then | ||
272 | enable_monodoc=no | ||
273 | fi | ||
274 | else | ||
275 | MONODOC= | ||
276 | fi | ||
277 | |||
278 | AC_SUBST(MONODOC) | ||
279 | AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes") | ||
280 | |||
281 | winbuild=no | ||
282 | case "$host" in | ||
283 | *-*-mingw*|*-*-cygwin*) | ||
284 | winbuild=yes | ||
285 | ;; | ||
286 | esac | ||
287 | AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes) | ||
288 | |||
289 | <xsl:if test="@type='Exe' or @type='WinExe'">AC_CONFIG_FILES(<xsl:value-of select="$lcProjectName" />)</xsl:if> | ||
290 | <xsl:if test="@type='Library'">AC_CONFIG_FILES(<xsl:value-of select="$projectName" />.pc)</xsl:if> | ||
291 | |||
292 | AC_CONFIG_FILES(Makefile) | ||
293 | AC_OUTPUT | ||
294 | |||
295 | echo "===" | ||
296 | echo "" | ||
297 | echo "Project configuration summary" | ||
298 | echo "" | ||
299 | echo " * Installation prefix: $prefix" | ||
300 | echo " * compiler: $CSC" | ||
301 | echo " * Documentation: $enable_monodoc ($MONODOC)" | ||
302 | echo " * Project Name: $PROJECT_NAME" | ||
303 | echo " * Version: $PROJECT_VERSION" | ||
304 | echo "" | ||
305 | echo "===" | ||
306 | |||
307 | </xsl:for-each> | ||
308 | </xsl:template> | ||
309 | </xsl:stylesheet> | ||
310 | </ProjectConfigureAc> | ||
311 | |||
312 | <ProjectMakefileAm> | ||
313 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
314 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
315 | exclude-result-prefixes="dnpb" | ||
316 | xml:space="preserve" | ||
317 | > | ||
318 | <xsl:param name="projectName" /> | ||
319 | <xsl:param name="solutionName" /> | ||
320 | <xsl:param name="assemblyName" /> | ||
321 | <xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable> | ||
322 | <xsl:param name="embeddedFiles" /> | ||
323 | <xsl:param name="compiledFiles" /> | ||
324 | <xsl:param name="contentFiles" /> | ||
325 | <xsl:param name="extraDistFiles" /> | ||
326 | <xsl:param name="pkgLibs" /> | ||
327 | <xsl:param name="binaryLibs" /> | ||
328 | <xsl:param name="systemLibs" /> | ||
329 | <xsl:param name="localCopyTargets" /> | ||
330 | <xsl:param name="hasAssemblyConfig" /> | ||
331 | |||
332 | <xsl:template match="/"> | ||
333 | <xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]"> | ||
334 | <xsl:variable name="lcType"><xsl:value-of select="translate(@type, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" /></xsl:variable> | ||
335 | |||
336 | ASSEMBLY=$(ASSEMBLY_NAME).$(ASSEMBLY_EXTENSION) | ||
337 | <!-- | ||
338 | If the project is an application, create targets for the wrapper script | ||
339 | --> | ||
340 | <xsl:if test="@type='Exe' or @type='WinExe'"> | ||
341 | <xsl:value-of select="$lcProjectName" />dir = $(prefix)/lib/<xsl:value-of select="$lcProjectName" /> | ||
342 | <xsl:value-of select="$lcProjectName" />_DATA = $(ASSEMBLY)<xsl:if test="$hasAssemblyConfig='true'"> $(ASSEMBLY).config</xsl:if> | ||
343 | |||
344 | bin_SCRIPTS=<xsl:value-of select="$lcProjectName" /> | ||
345 | </xsl:if><xsl:if test="@type='Library'"> | ||
346 | pkgconfigdir = $(prefix)/lib/pkgconfig | ||
347 | pkgconfig_DATA = <xsl:value-of select="$projectName" />.pc | ||
348 | <xsl:if test="$hasAssemblyConfig='true'"> | ||
349 | <xsl:value-of select="translate($lcProjectName, '.', '_')" />dir = $(prefix)/lib/mono/<xsl:value-of select="$projectName" /> | ||
350 | <xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA = $(ASSEMBLY).config | ||
351 | </xsl:if> | ||
352 | noinst_DATA = $(ASSEMBLY) | ||
353 | </xsl:if> | ||
354 | |||
355 | PACKAGES =<xsl:value-of select="$pkgLibs" /> | ||
356 | BINARY_LIBS =<xsl:value-of select="$binaryLibs" /> | ||
357 | SYSTEM_LIBS =<xsl:value-of select="$systemLibs" /> | ||
358 | RESOURCES_SRC =<xsl:value-of select="$embeddedFiles" /> | ||
359 | RESOURCES = $(RESOURCES_SRC:.resx=.resources) | ||
360 | SOURCES =<xsl:value-of select="$compiledFiles" /> | ||
361 | |||
362 | EXTRA_DIST=$(SOURCES) $(BINARY_LIBS) $(RESOURCES_SRC) install-sh missing <xsl:value-of select="$extraDistFiles" /> | ||
363 | |||
364 | CLEANFILES=$(ASSEMBLY) | ||
365 | |||
366 | <xsl:value-of select="$localCopyTargets" /> | ||
367 | |||
368 | <xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/dnpb:Configuration"> | ||
369 | <xsl:variable name="outputPath"><xsl:value-of select="dnpb:Options/dnpb:OutputPath/text()" /></xsl:variable> | ||
370 | <xsl:variable name="keyFile"><xsl:value-of select="dnpb:Options/dnpb:KeyFile/text()" /></xsl:variable> | ||
371 | <xsl:variable name="docFile"><xsl:value-of select="dnpb:Options/dnpb:XmlDocFile/text()" /></xsl:variable> | ||
372 | <xsl:value-of select="$outputPath"/>/$(ASSEMBLY): $(srcdir)/$(ASSEMBLY).response $(RESOURCES) $(SOURCES) $(BINARY_LIBS) <xsl:call-template name="substring-after-last-mod"><xsl:with-param name="input" select="$keyFile" /><xsl:with-param name="substr" select="'/'" /></xsl:call-template> | ||
373 | <xsl:if test="$docFile!=''">mkdir -p doc <xsl:text disable-output-escaping="yes">&&</xsl:text> </xsl:if>mkdir -p <xsl:value-of select="$outputPath" /> <xsl:text disable-output-escaping="yes">&&</xsl:text> $(CSC) /out:$@ \ | ||
374 | /target:<xsl:value-of select="$lcType" /> \<xsl:if test="$embeddedFiles!=''"> | ||
375 | $(addprefix /resource:$(srcdir)/, $(RESOURCES)) \</xsl:if><xsl:if test="$pkgLibs!=''"> | ||
376 | $(addprefix /pkg:, $(PACKAGES)) \</xsl:if><xsl:if test="$systemLibs!=''"> | ||
377 | $(addprefix /r:, $(SYSTEM_LIBS)) \</xsl:if><xsl:if test="$binaryLibs!=''"> | ||
378 | $(addprefix /r:$(srcdir)/, $(BINARY_LIBS)) \</xsl:if> | ||
379 | @$(srcdir)/$(ASSEMBLY).response \<xsl:if test="$docFile!=''"> | ||
380 | /doc:doc/<xsl:value-of select="$docFile" /> \</xsl:if><xsl:if test="$keyFile!=''"> | ||
381 | /keyfile:$(srcdir)/<xsl:call-template name="substring-after-last-mod"><xsl:with-param name="input" select="$keyFile" /><xsl:with-param name="substr" select="'/'" /></xsl:call-template> \</xsl:if><xsl:if test="dnpb:Options/dnpb:AllowUnsafe/text()='true'"> | ||
382 | /unsafe \</xsl:if><xsl:text disable-output-escaping="yes"> | ||
383 | && rm -f $(ASSEMBLY) \ | ||
384 | && ln $@ $(ASSEMBLY)</xsl:text> | ||
385 | |||
386 | CLEANFILES+=<xsl:value-of select="$outputPath"/>/$(ASSEMBLY) | ||
387 | |||
388 | <!-- if this project config has a KeyFile --> | ||
389 | <xsl:if test="$keyFile!=''">EXTRA_DIST+=<xsl:call-template name="substring-after-last-mod"><xsl:with-param name="input" select="$keyFile" /><xsl:with-param name="substr" select="'/'" /></xsl:call-template></xsl:if> | ||
390 | |||
391 | <xsl:value-of select="@name" />: <xsl:value-of select="$outputPath"/>/$(ASSEMBLY)<xsl:text disable-output-escaping="yes"> | ||
392 | rm -f $(ASSEMBLY) \ | ||
393 | &&</xsl:text> ln <xsl:value-of select="$outputPath"/>/$(ASSEMBLY) $(ASSEMBLY) | ||
394 | <!-- If the project is a library, create library-specific targets --> | ||
395 | <xsl:if test="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/@type='Library'"> | ||
396 | <xsl:choose> | ||
397 | <!-- | ||
398 | If the project has a keyfile, make a gac install/uninstall target | ||
399 | --> | ||
400 | <xsl:when test="dnpb:Options/dnpb:KeyFile/text()!=''"> | ||
401 | <xsl:value-of select="@name" />_install-data-local: <xsl:value-of select="$outputPath"/>/$(ASSEMBLY) | ||
402 | echo "$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \ | ||
403 | $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; | ||
404 | |||
405 | <xsl:value-of select="@name" />_uninstall-local: | ||
406 | if [`gacutil -l <xsl:value-of select="$projectName" /> | grep "Number" | awk -F= '{print $$2}'` -gt "0" ] ; \ | ||
407 | then \ | ||
408 | echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \ | ||
409 | $(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \ | ||
410 | fi | ||
411 | </xsl:when> | ||
412 | <!-- | ||
413 | If there is no keyfile for the project, define a filesystem | ||
414 | install target | ||
415 | --> | ||
416 | <xsl:otherwise> | ||
417 | noinst_<xsl:value-of select="@name" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />dir = $(prefix)/lib/mono/<xsl:value-of select="$projectName" /> | ||
418 | noinst_<xsl:value-of select="@name" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA = <xsl:value-of select="$outputPath"/>/$(ASSEMBLY) | ||
419 | </xsl:otherwise> | ||
420 | </xsl:choose> | ||
421 | </xsl:if> | ||
422 | </xsl:for-each> | ||
423 | |||
424 | <xsl:variable name="defaultConfig"><xsl:value-of select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/dnpb:Configuration/@name" /></xsl:variable> | ||
425 | $(ASSEMBLY): <xsl:value-of select="$defaultConfig" /> | ||
426 | |||
427 | <xsl:text disable-output-escaping="yes"> | ||
428 | $(srcdir)/$(ASSEMBLY).response: $(srcdir)/Makefile | ||
429 | echo "$(addprefix $(srcdir)/, $(SOURCES))" > $@ | ||
430 | </xsl:text> | ||
431 | |||
432 | all: $(ASSEMBLY) | ||
433 | |||
434 | # rule to compile .resx files to .resources | ||
435 | %.resources: %.resx | ||
436 | $(RESGEN) /useSourcePath /compile $(@:.resources=.resx) | ||
437 | |||
438 | <xsl:if test="@type='Library'"> | ||
439 | <!-- if the default config has a KeyFile --> | ||
440 | <xsl:choose> | ||
441 | <xsl:when test="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/dnpb:Configuration[@name=$defaultConfig]/dnpb:Options/dnpb:KeyFile/text()!=''"> | ||
442 | install-data-local: <xsl:value-of select="$defaultConfig" />_install-data-local | ||
443 | |||
444 | uninstall-local: <xsl:value-of select="$defaultConfig" />_uninstall-local | ||
445 | </xsl:when> | ||
446 | <!-- | ||
447 | If the default config does not have a KeyFile, don't really do | ||
448 | anything | ||
449 | --> | ||
450 | <xsl:otherwise> | ||
451 | #<xsl:value-of select="translate($lcProjectName, '.', '_')" />dir+=$(noinst_<xsl:value-of select="$defaultConfig" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />dir) | ||
452 | #<xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA+=$(noinst_<xsl:value-of select="$defaultConfig" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA) | ||
453 | </xsl:otherwise> | ||
454 | </xsl:choose> | ||
455 | </xsl:if> | ||
456 | </xsl:for-each> | ||
457 | </xsl:template> | ||
458 | |||
459 | <xsl:template name="substring-after-last" xml:space="default"> | ||
460 | <xsl:param name="input" /> | ||
461 | <xsl:param name="substr" /> | ||
462 | |||
463 | <!-- Extract the string which comes after the first occurence --> | ||
464 | <xsl:variable name="temp" select="substring-after($input,$substr)" /> | ||
465 | |||
466 | <xsl:choose> | ||
467 | <!-- If it still contains the search string then recursively process --> | ||
468 | <xsl:when test="$substr and contains($temp,$substr)"> | ||
469 | <xsl:call-template name="substring-after-last"> | ||
470 | <xsl:with-param name="input" select="$temp" /> | ||
471 | <xsl:with-param name="substr" select="$substr" /> | ||
472 | </xsl:call-template> | ||
473 | </xsl:when> | ||
474 | <xsl:otherwise> | ||
475 | <xsl:value-of select="$temp" /> | ||
476 | </xsl:otherwise> | ||
477 | </xsl:choose> | ||
478 | </xsl:template> | ||
479 | |||
480 | <xsl:template name="substring-after-last-mod" xml:space="default"> | ||
481 | <xsl:param name="input" /> | ||
482 | <xsl:param name="substr" /> | ||
483 | |||
484 | <xsl:choose> | ||
485 | <xsl:when test="contains($input,$substr)"> | ||
486 | <xsl:call-template name="substring-after-last"> | ||
487 | <xsl:with-param name="input" select="$input" /> | ||
488 | <xsl:with-param name="substr" select="$substr" /> | ||
489 | </xsl:call-template> | ||
490 | </xsl:when> | ||
491 | <xsl:otherwise> | ||
492 | <xsl:value-of select="$input" /> | ||
493 | </xsl:otherwise> | ||
494 | </xsl:choose> | ||
495 | </xsl:template> | ||
496 | </xsl:stylesheet> | ||
497 | </ProjectMakefileAm> | ||
498 | |||
499 | <ProjectPcIn> | ||
500 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
501 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
502 | exclude-result-prefixes="dnpb" | ||
503 | xml:space="preserve" | ||
504 | > | ||
505 | <!-- Removes the xml version header in the generated file --> | ||
506 | <xsl:output method="text"/> | ||
507 | <xsl:param name="projectName" /> | ||
508 | <xsl:param name="solutionName" /> | ||
509 | <xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable> | ||
510 | <xsl:template match="/"><xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]">prefix=@prefix@ | ||
511 | exec_prefix=${prefix} | ||
512 | libdir=${exec_prefix}/lib/mono/@PROJECT_NAME@ | ||
513 | |||
514 | Name: <xsl:value-of select="@name" /> | ||
515 | Description: <xsl:value-of select="Description/text()" /> | ||
516 | Version: @PROJECT_VERSION@ | ||
517 | Requires:<xsl:for-each select="Reference"><xsl:if test="@localCopy=false"><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@name" /></xsl:if></xsl:for-each> | ||
518 | Libs: -r:${libdir}/@PROJECT_NAME@.dll | ||
519 | |||
520 | </xsl:for-each> | ||
521 | |||
522 | </xsl:template> | ||
523 | </xsl:stylesheet> | ||
524 | </ProjectPcIn> | ||
525 | |||
526 | <SolutionAutogenSh> | ||
527 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
528 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
529 | exclude-result-prefixes="dnpb" | ||
530 | > | ||
531 | <xsl:param name="solutionName" /> | ||
532 | <xsl:template match="/"><xsl:text disable-output-escaping="yes">#!/bin/sh | ||
533 | # Run this to generate all the initial makefiles, etc. | ||
534 | # Ripped off from Mono, which ripped off from GNOME macros version | ||
535 | |||
536 | DIE=0 | ||
537 | |||
538 | srcdir=`dirname $0` | ||
539 | test -z "$srcdir" && srcdir=. | ||
540 | |||
541 | if [ -n "$MONO_PATH" ]; then | ||
542 | # from -> /mono/lib:/another/mono/lib | ||
543 | # to -> /mono /another/mono | ||
544 | for i in `echo ${MONO_PATH} | tr ":" " "`; do | ||
545 | i=`dirname ${i}` | ||
546 | if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then | ||
547 | ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS" | ||
548 | fi | ||
549 | if [ -n "{i}" -a -d "${i}/bin" ]; then | ||
550 | PATH="${i}/bin:$PATH" | ||
551 | fi | ||
552 | done | ||
553 | export PATH | ||
554 | fi | ||
555 | |||
556 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { | ||
557 | echo | ||
558 | echo "**Error**: You must have \`autoconf' installed to compile Mono." | ||
559 | echo "Download the appropriate package for your distribution," | ||
560 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" | ||
561 | DIE=1 | ||
562 | } | ||
563 | |||
564 | if [ -z "$LIBTOOL" ]; then | ||
565 | LIBTOOL=`which glibtool 2>/dev/null` | ||
566 | if [ ! -x "$LIBTOOL" ]; then | ||
567 | LIBTOOL=`which libtool` | ||
568 | fi | ||
569 | fi | ||
570 | |||
571 | (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { | ||
572 | ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { | ||
573 | echo | ||
574 | echo "**Error**: You must have \`libtool' installed to compile Mono." | ||
575 | echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" | ||
576 | echo "(or a newer version if it is available)" | ||
577 | DIE=1 | ||
578 | } | ||
579 | } | ||
580 | |||
581 | grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { | ||
582 | grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ | ||
583 | (gettext --version) < /dev/null > /dev/null 2>&1 || { | ||
584 | echo | ||
585 | echo "**Error**: You must have \`gettext' installed to compile Mono." | ||
586 | echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" | ||
587 | echo "(or a newer version if it is available)" | ||
588 | DIE=1 | ||
589 | } | ||
590 | } | ||
591 | |||
592 | (automake --version) < /dev/null > /dev/null 2>&1 || { | ||
593 | echo | ||
594 | echo "**Error**: You must have \`automake' installed to compile Mono." | ||
595 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | ||
596 | echo "(or a newer version if it is available)" | ||
597 | DIE=1 | ||
598 | NO_AUTOMAKE=yes | ||
599 | } | ||
600 | |||
601 | |||
602 | # if no automake, don't bother testing for aclocal | ||
603 | test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { | ||
604 | echo | ||
605 | echo "**Error**: Missing \`aclocal'. The version of \`automake'" | ||
606 | echo "installed doesn't appear recent enough." | ||
607 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | ||
608 | echo "(or a newer version if it is available)" | ||
609 | DIE=1 | ||
610 | } | ||
611 | |||
612 | if test "$DIE" -eq 1; then | ||
613 | exit 1 | ||
614 | fi | ||
615 | |||
616 | if test -z "$*"; then | ||
617 | echo "**Warning**: I am going to run \`configure' with no arguments." | ||
618 | echo "If you wish to pass any to it, please specify them on the" | ||
619 | echo \`$0\'" command line." | ||
620 | echo | ||
621 | fi | ||
622 | |||
623 | case $CC in | ||
624 | xlc ) | ||
625 | am_opt=--include-deps;; | ||
626 | esac | ||
627 | |||
628 | |||
629 | if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then | ||
630 | if test -z "$NO_LIBTOOLIZE" ; then | ||
631 | echo "Running libtoolize..." | ||
632 | ${LIBTOOL}ize --force --copy | ||
633 | fi | ||
634 | fi | ||
635 | |||
636 | echo "Running aclocal $ACLOCAL_FLAGS ..." | ||
637 | aclocal $ACLOCAL_FLAGS || { | ||
638 | echo | ||
639 | echo "**Error**: aclocal failed. This may mean that you have not" | ||
640 | echo "installed all of the packages you need, or you may need to" | ||
641 | echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" | ||
642 | echo "for the prefix where you installed the packages whose" | ||
643 | echo "macros were not found" | ||
644 | exit 1 | ||
645 | } | ||
646 | |||
647 | if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then | ||
648 | echo "Running autoheader..." | ||
649 | autoheader || { echo "**Error**: autoheader failed."; exit 1; } | ||
650 | fi | ||
651 | |||
652 | echo "Running automake --gnu $am_opt ..." | ||
653 | automake --add-missing --gnu $am_opt || | ||
654 | { echo "**Error**: automake failed."; exit 1; } | ||
655 | echo "Running autoconf ..." | ||
656 | autoconf || { echo "**Error**: autoconf failed."; exit 1; } | ||
657 | </xsl:text> | ||
658 | <xsl:for-each select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Project"> | ||
659 | echo Running <xsl:value-of select="@name" />/autogen.sh ... | ||
660 | (cd $srcdir/<xsl:value-of select="@name" /> ; NOCONFIGURE=1 /bin/sh ./autogen.sh "$@") | ||
661 | echo Done running <xsl:value-of select="@name" />/autogen.sh ... | ||
662 | </xsl:for-each> | ||
663 | <xsl:text disable-output-escaping="yes"> | ||
664 | conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c | ||
665 | |||
666 | if test x$NOCONFIGURE = x; then | ||
667 | echo Running $srcdir/configure $conf_flags "$@" ... | ||
668 | $srcdir/configure $conf_flags "$@" \ | ||
669 | && echo Now type \`make\' to compile $PKG_NAME || exit 1 | ||
670 | else | ||
671 | echo Skipping configure process. | ||
672 | fi | ||
673 | </xsl:text> | ||
674 | </xsl:template> | ||
675 | </xsl:stylesheet> | ||
676 | </SolutionAutogenSh> | ||
677 | |||
678 | <SolutionConfigureAc> | ||
679 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
680 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
681 | exclude-result-prefixes="dnpb" | ||
682 | xml:space="preserve" | ||
683 | > | ||
684 | <!-- Removes the xml version header in the generated file --> | ||
685 | <xsl:output method="text"/> | ||
686 | <xsl:param name="solutionName" /> | ||
687 | <xsl:template match="/" | ||
688 | >AC_INIT([<xsl:value-of select="$solutionName" />]-solution,[<xsl:value-of select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/@version" />]) | ||
689 | AC_CONFIG_AUX_DIR(.) | ||
690 | AM_INIT_AUTOMAKE([1.9 tar-ustar foreign]) | ||
691 | EXTRA_DIST="install-sh missing" | ||
692 | SOLUTION_NAME=<xsl:value-of select="$solutionName" /> | ||
693 | SOLUTION_VERSION=$VERSION | ||
694 | SOLUTION_DESCRIPTION="<xsl:value-of select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Description" />" | ||
695 | AC_SUBST(DESCRIPTION) | ||
696 | |||
697 | AM_MAINTAINER_MODE | ||
698 | |||
699 | dnl AC_PROG_INTLTOOL([0.25]) | ||
700 | |||
701 | AC_PROG_INSTALL | ||
702 | |||
703 | AC_MSG_CHECKING([whether we're building from an RCS]) | ||
704 | if test -f "$srcdir/.cvs_version" ; then | ||
705 | from_rcs=cvs | ||
706 | else | ||
707 | if test -f "$srcdir/.svn/entries" ; then | ||
708 | from_rcs=svn | ||
709 | else | ||
710 | from_rcs=no | ||
711 | fi | ||
712 | fi | ||
713 | |||
714 | AC_MSG_RESULT($from_rcs) | ||
715 | |||
716 | CONFIG="Release" | ||
717 | AC_SUBST(CONFIG) | ||
718 | <!-- TODO: Ensure that these SUBDIRS are processed in dependency order --> | ||
719 | AC_CONFIG_SUBDIRS(<xsl:for-each select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Project"><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@name" /> | ||
720 | </xsl:for-each>) | ||
721 | <xsl:text disable-output-escaping="yes"> | ||
722 | |||
723 | AC_OUTPUT([ | ||
724 | Makefile | ||
725 | ]) | ||
726 | |||
727 | echo "===" | ||
728 | echo "" | ||
729 | echo "Solution configuration summary" | ||
730 | echo "" | ||
731 | echo " * Solution Name: $SOLUTION_NAME" | ||
732 | echo " * Version: $SOLUTION_VERSION" | ||
733 | echo " * Packages:"</xsl:text> | ||
734 | <xsl:for-each select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Project">echo " - <xsl:value-of select="@name" />" | ||
735 | </xsl:for-each><xsl:text disable-output-escaping="yes">echo "" | ||
736 | echo "===" | ||
737 | </xsl:text> | ||
738 | </xsl:template> | ||
739 | </xsl:stylesheet> | ||
740 | </SolutionConfigureAc> | ||
741 | |||
742 | <SolutionMakefileAm> | ||
743 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
744 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
745 | exclude-result-prefixes="dnpb" | ||
746 | xml:space="preserve" | ||
747 | > | ||
748 | <xsl:param name="solutionName" /> | ||
749 | <xsl:template match="/">SUBDIRS =<xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project"><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@name" /></xsl:for-each> | ||
750 | </xsl:template> | ||
751 | </xsl:stylesheet> | ||
752 | </SolutionMakefileAm> | ||
753 | <ProjectWrapperScriptIn> | ||
754 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
755 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
756 | exclude-result-prefixes="dnpb" | ||
757 | xml:space="preserve" | ||
758 | > | ||
759 | <!-- Removes the xml version header in the generated file --> | ||
760 | <xsl:output method="text"/> | ||
761 | <xsl:param name="projectName" /> | ||
762 | <xsl:param name="assemblyName" /> | ||
763 | <xsl:param name="solutionName" /> | ||
764 | <xsl:param name="monoPath" /> | ||
765 | <xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable> | ||
766 | <xsl:template match="/"><xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]">#! /bin/sh | ||
767 | |||
768 | PACKAGE=<xsl:value-of select="$assemblyName" /> | ||
769 | prefix=@prefix@ | ||
770 | exec_prefix=@exec_prefix@ | ||
771 | |||
772 | # %%$@%$# why oh why isn't it $sharedir/<xsl:value-of select="$lcProjectName" /> | ||
773 | # Day changed to 30 Mar 2007 | ||
774 | # ... | ||
775 | # 07:50 < cj> why are we installing .exe assemblies to $prefix/lib/$package/ and | ||
776 | # not $prefix/share/$package ? | ||
777 | # 07:50 < jonp> momentum. | ||
778 | # 07:50 < jonp> and it's hard to say that a .exe isn't platform specific | ||
779 | # 07:50 < jonp> as it can still contain DllImport's which make platform | ||
780 | # assumptions | ||
781 | |||
782 | packagedir=$prefix/lib/<xsl:value-of select="$lcProjectName" /> | ||
783 | export MONO_PATH=$MONO_PATH<xsl:value-of select="$monoPath" /> | ||
784 | |||
785 | exec @RUNTIME@ $packagedir/$PACKAGE.exe "$@" | ||
786 | </xsl:for-each> | ||
787 | </xsl:template> | ||
788 | </xsl:stylesheet> | ||
789 | </ProjectWrapperScriptIn> | ||
790 | </Autotools> | ||