]> Pileus Git - ~andy/sunrise/blob - dev-lang/dmd/files/dmd-2.059-makefile.patch
0505f48eb0bf1c6db9fd360bf0a6f3e52a699729
[~andy/sunrise] / dev-lang / dmd / files / dmd-2.059-makefile.patch
1 The patches allow for MODEL, DMD (compiler for the library) and
2 DDOC (documentation generator) to be overriden on the command line.
3 The patch to gzio.c adds the missing errno.h include, to make the code portable:
4 http://d.puremagic.com/issues/show_bug.cgi?id=5463
5 --- dmd2/src/dmd/posix.mak
6 +++ dmd2/src/dmd/posix.mak
7 @@ -29,7 +29,7 @@
8  TK=tk
9  ROOT=root
10  
11 -MODEL=32
12 +MODEL?=32
13  
14  ifeq (OSX,$(TARGET))
15      ## See: http://developer.apple.com/documentation/developertools/conceptual/cross_development/Using/chapter_3_section_2.html#//apple_ref/doc/uid/20002000-1114311-BABGCAAB
16 --- dmd2/src/druntime/posix.mak
17 +++ dmd2/src/druntime/posix.mak
18 @@ -20,12 +20,12 @@
19      endif
20  endif
21  
22 -DMD=dmd
23 +DMD?=dmd
24  
25  DOCDIR=doc
26  IMPDIR=import
27  
28 -MODEL=32
29 +MODEL?=32
30  
31  DFLAGS=-m$(MODEL) -O -release -inline -nofloat -w -d -Isrc -Iimport -property
32  UDFLAGS=-m$(MODEL) -O -release -nofloat -w -d -Isrc -Iimport -property
33 --- dmd2/src/phobos/etc/c/zlib/gzio.c
34 +++ dmd2/src/phobos/etc/c/zlib/gzio.c
35 @@ -8,6 +8,7 @@
36  /* @(#) $Id$ */
37  
38  #include <stdio.h>
39 +#include <errno.h>
40  
41  #include "zutil.h"
42  
43 --- dmd2/src/phobos/posix.mak
44 +++ dmd2/src/phobos/posix.mak
45 @@ -61,8 +61,6 @@
46  
47  # Variable defined in an OS-dependent manner (see below)
48  CC =
49 -DMD =
50 -DDOC =
51  CFLAGS =
52  DFLAGS =
53  
54 @@ -83,14 +81,14 @@
55  # Set CC and DMD
56  ifeq ($(OS),win32wine)
57         CC = wine dmc.exe
58 -       DMD = wine dmd.exe
59 +       DMD ?= wine dmd.exe
60         RUN = wine
61  else
62         ifeq ($(OS),win32remote)
63 -               DMD = ssh 206.125.170.138 "cd code/dmd/phobos && dmd"
64 +               DMD ?= ssh 206.125.170.138 "cd code/dmd/phobos && dmd"
65                 CC = ssh 206.125.170.138 "cd code/dmd/phobos && dmc"
66         else
67 -               DMD = dmd
68 +               DMD ?= dmd
69                 ifeq ($(OS),win32)
70                         CC = dmc
71                 else
72 @@ -141,7 +139,7 @@
73  endif
74  
75  # Set DDOC, the documentation generator
76 -DDOC=$(DMD)
77 +DDOC?=$(DMD)
78  
79  # Set LIB, the ultimate target
80  ifeq (,$(findstring win,$(OS)))