d: support ldc2 and dmd modes from top-level.
authorJoel Martin <github@martintribe.org>
Fri, 10 May 2019 19:05:53 +0000 (14:05 -0500)
committerJoel Martin <github@martintribe.org>
Fri, 10 May 2019 19:05:53 +0000 (14:05 -0500)
Symlink dmd to /usr/bin in the dockerfile so that no PATH modification
is necessary.

Also, add a runtime modes count to the README.

.travis.yml
Makefile
README.md
d/Dockerfile
d/Makefile

index 9e8f6e4..6d5f2bd 100644 (file)
@@ -20,7 +20,9 @@ matrix:
     - {env: IMPL=clojure clojure_MODE=cljs, services: [docker]}
     - {env: IMPL=common-lisp, services: [docker]}
     - {env: IMPL=crystal,   services: [docker]}
-    - {env: IMPL=d,         services: [docker]}
+    - {env: IMPL=d d_MODE=gdc,  services: [docker]}
+    - {env: IMPL=d d_MODE=ldc2, services: [docker]}
+    - {env: IMPL=d d_MODE=dmd,  services: [docker]}
     - {env: IMPL=dart,      services: [docker]}
     - {env: IMPL=elisp,     services: [docker]}
     - {env: IMPL=elixir,    services: [docker]}
index 7d6975f..06bcff1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,8 @@ MAL_IMPL = js
 basic_MODE = cbm
 # clj or cljs (Clojure vs ClojureScript/lumo)
 clojure_MODE = clj
+# gdc, ldc2, or dmd
+d_MODE = gdc
 # python, js, cpp, or neko
 haxe_MODE = neko
 # octave or matlab
index d5c9ad1..4d393b3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
 
 **1. Mal is a Clojure inspired Lisp interpreter**
 
-**2. Mal is implemented in 76 languages (77 implementations total)**
+**2. Mal is implemented in 76 languages (77 different implementations and 98 runtime modes)**
 
 | Language | Creator |
 | -------- | ------- |
index ee3e279..a7b7113 100644 (file)
@@ -6,11 +6,13 @@ MAINTAINER Joel Martin <github@martintribe.org>
 # implementations
 ##########################################################
 
+RUN apt-get -y update
+
 # Required for running tests
-RUN apt-get -y update && apt-get -y install make python
+RUN apt-get -y install make python
 
 # Some typical implementation and test requirements
-RUN apt-get -y update && apt-get -y install curl libreadline-dev libedit-dev
+RUN apt-get -y install curl libreadline-dev libedit-dev
 
 RUN mkdir -p /mal
 WORKDIR /mal
@@ -19,8 +21,11 @@ WORKDIR /mal
 # Specific implementation requirements
 ##########################################################
 
-RUN apt-get -y update && apt-get -y install gcc gdc ldc gpg wget
+RUN apt-get -y install gcc gdc ldc gpg wget
 
-RUN wget https://dlang.org/install.sh -q -O install.sh && bash install.sh -p /usr/local/dlang && chmod 755 /usr/local/dlang/dmd*
+RUN wget https://dlang.org/install.sh -q -O install.sh && \
+    bash install.sh -p /usr/local/dlang && \
+    chmod 755 /usr/local/dlang/dmd* && \
+    ln -sf /usr/local/dlang/dmd-*/linux/bin64/dmd /usr/bin/dmd
 
 ENV HOME /mal
index 3f3c2e1..7872d89 100644 (file)
@@ -1,4 +1,6 @@
-D ?= gdc
+d_MODE ?= gdc
+
+D ?= $(d_MODE)
 
 ifeq ($(D),gdc)
 CFLAGS += -g -O2 -Wall