Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of github.com:D-Programming-Language/phobos int…
…o 5224
  • Loading branch information
andralex committed May 26, 2013
2 parents 98b47ad + ddf5567 commit ac555de
Show file tree
Hide file tree
Showing 50 changed files with 6,193 additions and 9,289 deletions.
2 changes: 1 addition & 1 deletion changelog.dd
Expand Up @@ -110,7 +110,7 @@ $(VERSION 060, ddd mm, 2012, =================================================,
$(LI $(BUGZILLA 4629): BufferedFile.printf() wants char[] as first argument)
$(LI $(BUGZILLA 4695): std.range.zip is broken)
$(LI $(BUGZILLA 4744): std.conv: string->enum doesn't look for longer match)
$(LI $(BUGZILLA 4822): Problem with std.stdio.File.writef("%c")
$(LI $(BUGZILLA 4822): Problem with std.stdio.File.writef("%c"))
$(LI $(BUGZILLA 5011): std.container: SList linearRemove produces wrong results)
$(LI $(BUGZILLA 5089): feqrel does not compile for floats)
$(LI $(BUGZILLA 5260): std.math.feqrel() returns negative number)
Expand Down
3 changes: 2 additions & 1 deletion etc/c/zlib/win32.mak
Expand Up @@ -2,6 +2,7 @@

CC=dmc
LD=link
LIB=lib
CFLAGS=-o
LDFLAGS=
O=.obj
Expand Down Expand Up @@ -74,7 +75,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h
$(CC) -c $(cvarsdll) $(CFLAGS) $*.c

zlib.lib: $(OBJS)
lib -c zlib.lib $(OBJS)
$(LIB) -c zlib.lib $(OBJS)

example.exe: example.obj zlib.lib
$(LD) $(LDFLAGS) example.obj zlib.lib
Expand Down
10 changes: 5 additions & 5 deletions etc/c/zlib/win64.mak
@@ -1,12 +1,12 @@
# Makefile for zlib64

VCDIR="\Program Files (x86)\Microsoft Visual Studio 10.0\VC"
VCDIR=\Program Files (x86)\Microsoft Visual Studio 10.0\VC

CC=$(VCDIR)\bin\amd64\cl
LD=$(VCDIR)\bin\amd64\link
LIB=$(VCDIR)\bin\amd64\lib
CC="$(VCDIR)\bin\amd64\cl"
LD="$(VCDIR)\bin\amd64\link"
LIB="$(VCDIR)\bin\amd64\lib"

CFLAGS=/O2 /nologo /I$(VCDIR)\INCLUDE
CFLAGS=/O2 /nologo /I"$(VCDIR)\INCLUDE"
LIBFLAGS=/nologo
LDFLAGS=/nologo
O=.obj
Expand Down
4 changes: 2 additions & 2 deletions index.d
Expand Up @@ -121,7 +121,7 @@ D language compiler. Also, check out the
<dl>
<dt><a href="std_ascii.html"><b>std.base64</b></a>
<dt><a href="std_ascii.html"><b>std.ascii</b></a>
<dd>Functions that operate on ASCII characters.
<dt><a href="std_base64.html"><b>std.base64</b></a>
Expand Down Expand Up @@ -190,7 +190,7 @@ $(V1
<dd>Recursively search file system and (currently Windows
only) FTP sites.
)
<dt><a href="std_regexp.html"><b>std.regexp</b></a>
<dt><a href="std_regex.html"><b>std.regex</b></a>
<dd>The usual regular expression functions.
<dt><a href="std_socket.html"><b>std.socket</b></a>
Expand Down
32 changes: 29 additions & 3 deletions posix.mak
Expand Up @@ -80,6 +80,7 @@ MAKEFILE:=$(lastword $(MAKEFILE_LIST))
# Set DRUNTIME name and full path
ifeq (,$(findstring win,$(OS)))
DRUNTIME = $(DRUNTIME_PATH)/lib/libdruntime-$(OS)$(MODEL).a
DRUNTIMESO = $(DRUNTIME_PATH)/lib/libdruntime-$(OS)$(MODEL)so.a
else
DRUNTIME = $(DRUNTIME_PATH)/lib/druntime.lib
endif
Expand Down Expand Up @@ -148,9 +149,17 @@ endif
# Set DDOC, the documentation generator
DDOC=$(DMD)

# Set VERSION, where the file is that contains the version string
VERSION=../dmd/VERSION

# Set SONAME, the name of the shared library.
# The awk script will produce the last 2 digits of the version string, i.e. 2.063 produces 63
SONAME = libphobos2.so.0.$(shell awk -F. '{ print $$NF + 0 }' $(VERSION))

# Set LIB, the ultimate target
ifeq (,$(findstring win,$(OS)))
LIB = $(ROOT)/libphobos2.a
LIBSO = $(ROOT)/$(SONAME).0
else
LIB = $(ROOT)/phobos.lib
endif
Expand All @@ -161,10 +170,10 @@ MAIN = $(ROOT)/emptymain.d
# Stuff in std/
STD_MODULES = $(addprefix std/, algorithm array ascii base64 bigint \
bitmanip compiler complex concurrency container conv \
cpuid cstream ctype csv datetime demangle encoding exception \
cstream csv datetime demangle encoding exception \
file format functional getopt json math mathspecial md5 \
metastrings mmfile numeric outbuffer parallelism path perf \
process random range regex regexp signals socket socketstream \
metastrings mmfile numeric outbuffer parallelism path \
process random range regex signals socket socketstream \
stdint stdio stdiobase stream string syserror system traits \
typecons typetuple uni uri utf uuid variant xml zip zlib)

Expand Down Expand Up @@ -229,8 +238,14 @@ ifeq ($(BUILD),)
# targets. BUILD is not defined in user runs, only by recursive
# self-invocations. So the targets in this branch are accessible to
# end users.
ifeq (linux,$(OS))
release :
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=release PIC=1 dll
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=release
else
release :
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=release
endif
debug :
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=debug
unittest :
Expand All @@ -253,6 +268,17 @@ $(ROOT)/%$(DOTOBJ) : %.c
$(LIB) : $(OBJS) $(ALL_D_FILES) $(DRUNTIME)
$(DMD) $(DFLAGS) -lib -of$@ $(DRUNTIME) $(D_FILES) $(OBJS)

dll : $(ROOT)/libphobos2.so

$(ROOT)/libphobos2.so: $(ROOT)/$(SONAME)
ln -s $(notdir $(LIBSO)) $@

$(ROOT)/$(SONAME): $(LIBSO)
ln -s $(notdir $(LIBSO)) $@

$(LIBSO): $(OBJS) $(ALL_D_FILES) $(DRUNTIME)
$(DMD) $(DFLAGS) -shared -debuglib= -defaultlib= -of$@ -L-soname=$(SONAME) $(DRUNTIMESO) $(D_FILES) $(OBJS)

ifeq (osx,$(OS))
# Build fat library that combines the 32 bit and the 64 bit libraries
libphobos2.a : generated/osx/release/32/libphobos2.a generated/osx/release/64/libphobos2.a
Expand Down

0 comments on commit ac555de

Please sign in to comment.