Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

root/tags/releases/0.99.8/lib/dmdinclude

Revision 4433, 1.9 kB (checked in by larsivi, 3 years ago)

DMD 1.041 supported in 0.99.8 release

Line 
1 #!/bin/bash
2 #
3 # A library file for detecting dmd versions and setting up variables.  Now that
4 # Tango supports DMD 2, we must setup variables properly
5 #
6
7 # Various common build and install functionality
8
9 dmdversion() {
10     echo ">> Checking compiler version DMD"
11
12     DMDVERSION=`dmd | head -1 | cut -c 26-`
13     DMDVERSIONMAJ="${DMDVERSION:0:1}" #`echo $DMDVERSION | cut -d . -f 1`
14     DMDVERSIONMIN="${DMDVERSION:2}" #`echo $DMDVERSIOM | cut -c 3-`
15     echo ">> Compiler version is $DMDVERSIONMAJ.$DMDVERSIONMIN"
16     while [ "${DMDVERSIONMIN:0:1}" = "0" ]
17     do
18         DMDVERSIONMIN="${DMDVERSIONMIN:1}"
19     done
20 }
21
22 dmdsettings() {
23     dmdversion
24
25     if [ ! "$DMDVERSIONMAJ" -gt "1" ]
26     then
27     if [ "$DMDVERSIONMIN" -lt "40" ]
28     then
29             POSIXFLAG="-version=Posix"     
30             echo ">> Enabling -version=Posix for DMD older than 1.040."
31     fi
32     fi
33 }
34
35 dmdbugs() {
36     dmdversion
37
38     if [ ! "$DMDVERSIONMAJ" -gt "1" ]
39     then
40         if [ ! "$DMDVERSIONMIN" -gt "21" ]
41         then
42             INLINE=""
43             echo ">> Removing -inline due to bugzilla 668"
44         fi
45
46         if [ "$DMDVERSIONMIN" -lt "31" ]
47         then
48             echo ">> DMD 1.031 introduced several fixes for usage of implicit"
49             echo " >> template functions in particular, so you should consider an"
50             echo " >> upgrade if you experience problems."
51         fi
52
53         if [ "$DMDVERSIONMIN" = "32" ]
54         then
55             echo ">> DMD 1.032 is not supported by Tango. You are most likely going"
56             echo " >> to experience problems."
57         fi
58
59         if [ "$DMDVERSIONMIN" -gt "41" ]
60         then
61             echo ">> This version has not been tested with Tango prior to this release,"
62             echo " >> so if you experience any problems, try reverting to DMD 1.041"
63             echo " >> or earlier."
64         fi
65     else
66         echo ">> D 2.0 not supported in this code base"
67         exit 1
68     fi
69 }
Note: See TracBrowser for help on using the browser.