From 0245c394af1a4a1400f87916bd10c398005f40da Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 14 Jun 2016 22:52:15 -0400 Subject: step4 some additional work --- maker.org | 227 +++++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 196 insertions(+), 31 deletions(-) (limited to 'maker.org') diff --git a/maker.org b/maker.org index 0bb9519..2cc2ea7 100644 --- a/maker.org +++ b/maker.org @@ -12,11 +12,11 @@ #+FILETAGS: :sdp:rel:makefile: #+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n) -* sdp makefile :makefile: [[./org/sdp.org][sdp.org]] [[./org/][org/]] +* sdp makefile :makefile: ** TODO settings [+2] :settings: -*** alternative D compilers [+1] :compiler: -**** dmd :dmd: +*** alternative D compilers (dmd/ldc2/gdc) [+1] :compiler: +**** [#A] dmd :dmd: #+BEGIN_SRC makefile :tangle makefile DMD=dmd @@ -25,7 +25,7 @@ DMD_FLAGS_RELEASE=-O -release DMD_FLAG_BINOF=-of #+END_SRC -**** ldc2 :ldc: +**** [#A] ldc2 :ldc: #+BEGIN_SRC makefile :tangle makefile LDC=ldc2 @@ -34,7 +34,7 @@ LDC_FLAGS_RELEASE=-O4 -release LDC_FLAG_BINOF=-of= #+END_SRC -**** gdc :gdc: +**** TODO gdc :gdc: #+BEGIN_SRC makefile :tangle makefile GDC=gdc @@ -44,7 +44,7 @@ GDC_FLAGS_RELEASE=-march=native -O3 -pipe -frelease GDC_FLAG_BINOF=-o #+END_SRC -*** build tools :build:tool: +*** build tools (dub/rdmd) [+1] :build:tool: **** rdmd :rdmd: #+BEGIN_SRC makefile :tangle makefile @@ -52,28 +52,28 @@ RDMD=rdmd RDMD_FLAGS=--build-only --compiler= #+END_SRC -**** dub :dub: +**** [#A] 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: +*** TODO [#A] 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=) -**** TODO [#A] SET compiler: "SET_D_COMPILER=": :compiler:select: +**** TODO SET compiler: "SET_D_COMPILER=": :compiler:select: [[http://wiki.dlang.org/Compilers][D Compilers wiki]] [[http://dlang.org/download.html][D Compilers download]] Set D_COMPILER one of DMD, LDC or GDC e.g.: SET_D_COMPILER=DMD #+BEGIN_SRC makefile :tangle makefile # SET_D_COMPILER=(one of: DMD LDC or GDC): -SET_D_COMPILER=DMD +SET_D_COMPILER=LDC #+END_SRC -**** TODO [#A] SET debug flags: "SET_DC_FLAGS_DEBUG_EXTRA=-debug=": :compiler:flags:debug: +**** TODO SET debug flags: "SET_DC_FLAGS_DEBUG_EXTRA=-debug=": :compiler:flags:debug: 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 @@ -180,7 +180,7 @@ PRG_BINDIR=./bin #+BEGIN_SRC makefile :tangle makefile # ORG -ORG_VERSION=20160411 +ORG_VERSION=20160530 EMACSLISP=/usr/share/emacs/site-lisp EMACSLISP_ORG=~/.emacs.d/elpa/org-$($(shell echo $(ORG_VERSION))) EMACSLISP_ORG_CONTRIB=~/.emacs.d/elpa/org-plus-contrib-$($(shell echo $(ORG_VERSION))) @@ -206,8 +206,9 @@ ORGDIR=$(shell echo `pwd`) - gitsnapshot *** build commands [+1] :build:compile: -**** build rebuild +**** build rebuild :build:rebuild: +***** compilers #+BEGIN_SRC makefile :tangle makefile all: tangle build @@ -222,15 +223,41 @@ makefile_new: make -k tangle_maker #+END_SRC -**** dub build rebuild +***** dub build rebuild :dub: + #+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) +# dmd +dub_dmd_release: expunge skel tangle + $(DUB) $(DUB_FLAGS)dmd --config=sdp-release +dub_dmd_release_test: tangle + $(DUB) $(DUB_FLAGS)dmd --config=sdp-dmd +dub_dmd_debug: tangle + $(DUB) $(DUB_FLAGS)dmd --config=sdp-debug +dub_dmd_debug_clean: tangle + $(DUB) $(DUB_FLAGS)dmd --config=sdp-debug-clean +dub_dmd_tmp: tangle + $(DUB) $(DUB_FLAGS)dmd --config=sdp-tmp +# ldc2 +dub_ldc_release: expunge skel tangle + $(DUB) $(DUB_FLAGS)ldc2 --config=sdp-release +dub_ldc_release_test: tangle + $(DUB) $(DUB_FLAGS)ldc2 --config=sdp-ldc +dub_ldc_debug: tangle + $(DUB) $(DUB_FLAGS)ldc2 --config=sdp-debug +dub_ldc_debug_clean: tangle + $(DUB) $(DUB_FLAGS)ldc2 --config=sdp-debug-clean +dub_ldc_tmp: tangle + $(DUB) $(DUB_FLAGS)ldc2 --config=sdp-tmp +# test releases +dub_release_test_dmd: tangle dub_dmd_release_test +dub_release_test_ldc: tangle dub_ldc_release_test #+END_SRC -**** rdmd build rebuild +***** rdmd build rebuild :rdmd: #+BEGIN_SRC makefile :tangle makefile rdmd: $(PRG_SRCDIR)/$(PRG_SRC) @@ -239,7 +266,9 @@ rdmd: $(PRG_SRCDIR)/$(PRG_SRC) $(PRG_SRCDIR)/$(PRG_NAME)/$(PRG_SRC) #+END_SRC -**** debug +**** debug :debug: + +***** debug #+BEGIN_SRC makefile :tangle makefile debug: $(PRG_SRCDIR)/$(PRG_SRC) @@ -263,7 +292,7 @@ debug_gdc: $(PRG_SRCDIR)/$(PRG_SRC) $(PRG_SRCDIR)/$(PRG_SRC) #+END_SRC -**** debug rdmd +***** debug rdmd #+BEGIN_SRC makefile :tangle makefile debug_rdmd: $(PRG_SRCDIR)/$(PRG_SRC) @@ -287,7 +316,9 @@ debug_rdmd_gdc: $(PRG_SRCDIR)/$(PRG_SRC) $(PRG_SRCDIR)/$(PRG_NAME)/$(PRG_SRC) #+END_SRC -**** release +**** release :release: + +***** release #+BEGIN_SRC makefile :tangle makefile release: distclean tangle $(PRG_SRCDIR)/$(PRG_SRC) @@ -296,7 +327,7 @@ release: distclean tangle $(PRG_SRCDIR)/$(PRG_SRC) $(PRG_SRCDIR)/$(PRG_SRC) #+END_SRC -**** release rdmd +***** release rdmd #+BEGIN_SRC makefile :tangle makefile release_rdmd: distclean tangle $(PRG_SRCDIR)/$(PRG_SRC) @@ -319,11 +350,13 @@ clean: expunge: rm -rf $(PRG_BINDIR); \ - rm -rf $(PRG_SRCDIR); + rm -rf $(PRG_SRCDIR)/$(PRG_NAME); distclean: expunge -distclean_and_init: expunge skel +distclean_and_init: expunge + mkdir -p $(PRG_SRCDIR)/$(PRG_NAME); \ + mkdir -p $(PRG_BINDIR); #+END_SRC *** Org Babel Tangle batch process command :tangle: @@ -387,10 +420,83 @@ gitsnapshot: distclean tangle #+END_SRC * conf misc -** dub.json :dub:description: - +** dub :dub:description: 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]]) +*** dub.sdl :sdl: + +#+BEGIN_SRC sh :tangle dub.sdl +name "sdp" +description "sisu document parser." +homepage "http://sisudoc.org" +authors "Ralph Amissah" +copyright "©2016 Ralph Amissah" +license "AGPL-3+" +targetPath "./bin" +sourcePath "./src" +stringImportPaths "./views" +buildRequirements "disallowDeprecations" +configuration "sdp-release" { + name "release" + targetType "executable" + platforms "posix" + targetName "sdp" + buildOptions "releaseMode" "optimize" "inline" + postGenerateCommands "/usr/bin/notify-send -t 0 'D release executable ready' 'sdp'" +} +configuration "sdp-dmd" { + name "dmd" + targetType "executable" + platforms "posix" + #compiler "dmd" + targetName "sdp-dmd" + buildOptions "releaseMode" "optimize" "inline" + postGenerateCommands "/usr/bin/notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-dmd'" +} +configuration "sdp-ldc" { + name "ldc" + targetType "executable" + platforms "posix" + #compiler "ldc2" + targetName "sdp-ldc" + buildOptions "releaseMode" "optimize" "inline" + postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-ldc'" +} +configuration "sdp-debug" { + name "debuging" + targetType "executable" + platforms "posix" + targetName "sdp-debug" + debugVersions "checkdoc" + debugVersions "summary" + debugVersions "dumpdoc" + buildOptions "debugMode" "debugInfo" "optimize" + postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-debug'" +} +configuration "sdp-tmp" { + name "tmp" + targetType "executable" + platforms "posix" + targetName "sdp-tmp" + debugVersions "tmp" + debugVersions "crap" + buildOptions "debugMode" "debugInfo" "optimize" + postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-tmp'" +} +configuration "sdp-debug-clean" { + name "debug-clean" + targetType "executable" + platforms "posix" + targetName "sdp-debug-clean" + buildOptions "debugMode" "debugInfo" "optimize" + postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-debug-clean'" +} +#+END_SRC + +*** +dub.json+ :json: + +**** +sdp+ +#+BEGIN_SRC json :tangle no #+BEGIN_SRC json :tangle dub.json { "name" : "sdp", @@ -412,12 +518,13 @@ Every DUB package should contain a [[http://code.dlang.org/package-format?lang=j #+BEGIN_SRC sh :tangle .gitignore # git ls-files --others --exclude-from=.git/info/exclude #./.dub/** -.dub/** * !.gitignore !makefile !version.txt -!./dub.json +!dub.json +!dub.sdl +.dub/** !tangle !*.org !*.d @@ -434,7 +541,7 @@ Every DUB package should contain a [[http://code.dlang.org/package-format?lang=j #+END_SRC ** sh script to batch process emacs org babel tangle :shell_script:tangle: - [http://orgmode.org/manual/Batch-execution.html] + [[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 ./src/sdp/ (similar functionality is contained within the "makefile" created by this @@ -446,7 +553,7 @@ babel tangle) org files in ./org/ to create .d source files in ./src/sdp/ DIR=`pwd` ORGFILES="" EMACSLISP=/usr/share/emacs/site-lisp -ORG_VERSION=20160411 +ORG_VERSION=20160530 EMACSLISP_ORG=~/.emacs.d/elpa/org-$($(shell echo $(ORG_VERSION))) EMACSLISP_ORG_CONTRIB=~/.emacs.d/elpa/org-plus-contrib-$($(shell echo $(ORG_VERSION))) # wrap each argument in the code required to call tangle on it @@ -466,6 +573,16 @@ emacs --batch -Q -q \ (kill-buffer)) '($ORGFILES)))" 2>&1 #|grep tangled #+END_SRC +* dub zfunc :zfunc: +** ,dubdmd :dmd: +#+BEGIN_SRC sh :tangle no +time dub --compiler=dmd -v --force +#+END_SRC + +** ,dubldc :ldc: +#+BEGIN_SRC sh :tangle no +time dub --compiler=ldc2 -v --force +#+END_SRC * D build notes :notes: ** compilers :compiler: *** [#A] dmd :dmd: @@ -521,10 +638,58 @@ 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 +--compiler=dmd +--compiler=ldc2 + +--compiler=dmd -v --force +--compiler=ldc2 -v --force +#+END_SRC + +#+BEGIN_SRC sh +dub -v --force --debug=checkdoc --debug=summary --debug=dumpdoc +dub -v --force --build=release + +dub -v --combined --build-mode allAtOnce --build release # --annotate +dub build sdp -v --combined --build-mode allAtOnce 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 + +dub -v --force --build=release + +dub -v --force --config=sdp-debug +dub -v --force --config=sdp-release +dub -v --force --config=sdp-release --build=release + +dub --compiler=dmd --force -v --config=sdp-debug +dub --compiler=dmd --force -v --config=sdp-release + +# dmd +,dubdmd --config=sdp-debug-clean +# time ~sdp3/bin/sdp-debug-clean -v --html --no-assert en/autonomy_markup0.sst + +# ldc +# flags +,dubldc --config=sdp-release # sdp +# time ~sdp3/bin/sdp -v --html --no-assert en/autonomy_markup0.sst +,dubldc --config=sdp-debug # sdp-debug +# time ~sdp3/bin/sdp-debug -v --html --no-assert en/autonomy_markup0.sst +,dubldc --config=sdp-tmp # sdp-tmp +# time ~sdp3/bin/sdp-tmp -v --html --no-assert en/autonomy_markup0.sst +,dubldc --config=sdp-debug-clean # sdp-debug-clean +# time ~sdp3/bin/sdp-debug-clean -v --html --no-assert en/autonomy_markup0.sst + +#+END_SRC + +** make (emacs) + +#+BEGIN_SRC sh +make -k dub_dmd_release +make -k dub_dmd_debug +make -k dub_dmd_debug_clean +make -k dub_dmd_tmp + +make -k dub_ldc_release +make -k dub_ldc_debug +make -k dub_ldc_debug_clean +make -k dub_ldc_tmp #+END_SRC -- cgit v1.2.3