aboutsummaryrefslogtreecommitdiffhomepage
path: root/maker.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-04-25 23:13:35 -0400
committerRalph Amissah <ralph@amissah.com>2016-04-26 07:37:25 -0400
commit44a42f6d4f68742914c0b5b5976593ae8c67a693 (patch)
treeb406c5b98ff755dbebe7309422b75b19594720a5 /maker.org
parentstep3 (diff)
dub config
Diffstat (limited to 'maker.org')
-rw-r--r--maker.org86
1 files changed, 80 insertions, 6 deletions
diff --git a/maker.org b/maker.org
index b2b7ba0..651473f 100644
--- a/maker.org
+++ b/maker.org
@@ -20,7 +20,7 @@
#+BEGIN_SRC makefile :tangle makefile
DMD=dmd
-DMD_FLAGS=-de -w -J./lib
+DMD_FLAGS=-de -w -J./views -I./src/sdp
DMD_FLAGS_RELEASE=-O -release
DMD_FLAG_BINOF=-of
#+END_SRC
@@ -29,7 +29,7 @@ DMD_FLAG_BINOF=-of
#+BEGIN_SRC makefile :tangle makefile
LDC=ldc2
-LDC_FLAGS=-w -J=lib
+LDC_FLAGS=-w -J=views -I=src/sdp
LDC_FLAGS_RELEASE=-O4 -release
LDC_FLAG_BINOF=-of=
#+END_SRC
@@ -41,17 +41,24 @@ GDC=gdc
#GDC=gdc-5
GDC_FLAGS=
GDC_FLAGS_RELEASE=-march=native -O3 -pipe -frelease
-#GDC_FLAGS_RELEASE=-frelease
GDC_FLAG_BINOF=-o
#+END_SRC
-**** rdmd
+*** build tools :build:tool:
+**** rdmd :rdmd:
#+BEGIN_SRC makefile :tangle makefile
RDMD=rdmd
RDMD_FLAGS=--build-only --compiler=
#+END_SRC
+**** dub :dub:
+
+#+BEGIN_SRC makefile :tangle makefile
+DUB=dub
+DUB_FLAGS=-v --force --compiler=
+#+END_SRC
+
*** TODO set/select: ~D compiler~ & ~debug flags~ [+1] [2/2] :select:
- [X] Set D_COMPILER (one of DMD LDC or GDC)
- [X] Set debug flags (using DMD standard flag -debug=)
@@ -77,6 +84,7 @@ re: dmd "one can easily get 2x (and even more) speedup by simply switching to gd
Set debug flags using DMD standard flag -debug= e.g.:
SET_DC_FLAGS_DEBUG_EXTRA=-debug=headings -debug=bookindex
SET_DC_FLAGS_DEBUG_EXTRA=-debug=headings -debug=footnotes -debug=endnotes
+ SET_DC_FLAGS_DEBUG_EXTRA=-debug=headings -debug=biblio
***** TODO [#A] set debug flags
#+BEGIN_SRC makefile :tangle makefile
@@ -163,6 +171,7 @@ endif
ifeq ($(DC), $(GDC))
DC_FLAGS_DEBUG :=$(shell echo $(DC_FLAGS_DEBUG_SET)| sed -e "s/-debug/-fdebug/g")
endif
+DUB_FLAGS_DEBUG :=$(shell echo $(DC_FLAGS_DEBUG_SET)| sed -e "s/-debug/--debug/g"| sed -e "s/-unittest//g")
#+END_SRC
*** Project Details :project:sdp:
@@ -170,7 +179,7 @@ endif
#+BEGIN_SRC makefile :tangle makefile
PRG_NAME=sdp
PRG_SRC=$(PRG_NAME).d
-PRG_SRCDIR=./lib
+PRG_SRCDIR=./src
PRG_BIN=$(PRG_NAME)
PRG_BINDIR=./bin
#+END_SRC
@@ -221,6 +230,14 @@ makefile_new:
make -k tangle_maker
#+END_SRC
+**** dub build rebuild
+#+BEGIN_SRC makefile :tangle makefile
+dub: $(PRG_SRCDIR)/$(PRG_SRC)
+ $(DUB) $(DUB_FLAGS)$(DC)
+debug_dub: $(PRG_SRCDIR)/$(PRG_SRC)
+ $(DUB) $(DUB_FLAGS)$(DC) $(DUB_FLAGS_DEBUG)
+#+END_SRC
+
**** rdmd build rebuild
#+BEGIN_SRC makefile :tangle makefile
@@ -380,7 +397,7 @@ gitsnapshot: distclean tangle
* sh script to batch process emacs org babel tangle :shell_script:tangle:
[http://orgmode.org/manual/Batch-execution.html]
creates a shell batch script called "tangle", that will tangle (emacs org
-babel tangle) org files in ./org/ to create .d source files in ./lib/sdp/
+babel tangle) org files in ./org/ to create .d source files in ./src/sdp/
(similar functionality is contained within the "makefile" created by this
"maker.org" file make tangle)
@@ -409,3 +426,60 @@ emacs --batch -Q -q \
(org-babel-tangle)
(kill-buffer)) '($ORGFILES)))" 2>&1 #|grep tangled
#+END_SRC
+
+* D build notes :notes:
+** compilers :compiler:
+*** [#A] dmd
+
+#+BEGIN_SRC sh
+dmd -de -w -J./views -I./src/sdp -unittest -debug=checkdoc -debug=summary -debug=dumpdoc -of./bin/sdp ./src/sdp.d
+dmd -de -w -J./views -I./src/sdp -of./bin/sdp ./src/sdp.d
+dmd -de -w -J./views -I./src/sdp -O -release -of./bin/sdp ./src/sdp.d
+#+END_SRC
+
+*** [#A] ldc2
+
+#+BEGIN_SRC sh
+ldc2 -de -w -J./views -I./src/sdp -unittest -d-debug=checkdoc -d-debug=summary -d-debug=dumpdoc -of=./bin/sdp ./src/sdp.d
+ldc2 -de -w -J./views -I./src/sdp -of=./bin/sdp ./src/sdp.d
+ldc2 -de -w -J./views -I./src/sdp -O4 -release -of=./bin/sdp ./src/sdp.d
+#+END_SRC
+
+*** TODO gdc
+
+not done
+
+#+BEGIN_SRC sh
+#+END_SRC
+
+** build tools :build:tool:
+*** [#B] rdmd
+
+flags similar to dmd
+
+#+BEGIN_SRC sh
+rdmd -de -w -J./views -I./src/sdp -unittest -debug=checkdoc -debug=summary -debug=dumpdoc -of./bin/sdp ./src/sdp.d
+rdmd -de -w -J./views -I./src/sdp -of./bin/sdp ./src/sdp.d
+rdmd -de -w -J./views -I./src/sdp -O -release -of./bin/sdp ./src/sdp.d
+
+#dmd
+rdmd -de -w -J./views -I./src/sdp -unittest -debug=checkdoc -debug=summary -debug=dumpdoc --compiler=ldc2 -of./bin/sdp ./src/sdp.d
+
+#ldc
+rdmd -de -w -J./views -I./src/sdp -unittest -d-debug=checkdoc -d-debug=summary -d-debug=dumpdoc --compiler=ldc2 -of./bin/sdp ./src/sdp.d
+#+END_SRC
+
+*** [#A] dub
+https://github.com/dlang/dub/
+http://code.dlang.org/getting_started
+http://code.dlang.org/docs/commandline
+Every DUB package should contain a [[http://code.dlang.org/package-format?lang=json][dub.json]] or [[http://code.dlang.org/package-format?lang=sdl][dub.sdl]]
+
+#+BEGIN_SRC sh
+dub -v --combined --build-mode allAtOnce --compiler ldc2 --build release # --annotate
+dub build sdp -v --combined --build-mode allAtOnce --compiler ldc2
+dub describe
+dub build sdp -v --force --debug=checkdoc --debug=dumpdoc
+dub build sdp -v --force --debug=checkdoc --debug=dumpdoc --compiler dmd
+dub build sdp -v --force --debug=checkdoc --debug=dumpdoc --compiler ldc2
+#+END_SRC