From 30865cf1a75a144629c6029ac55fbc744e330adf Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 8 Aug 2017 12:10:22 -0400 Subject: maker.org makefile supported compilers, make all_builds_debug - dmd ldc2 gdc --- dub.sdl | 83 ++++++++++++++++++----- makefile | 36 ++++++++-- maker.org | 193 +++++++++++++++++++++++++++++++++++++++++++----------- org/sdp.org | 21 ++++++ views/version.txt | 10 +++ 5 files changed, 282 insertions(+), 61 deletions(-) diff --git a/dub.sdl b/dub.sdl index ebb41d1..428140b 100644 --- a/dub.sdl +++ b/dub.sdl @@ -32,22 +32,6 @@ configuration "sdp-debug" { debugVersions "dumpdoc" 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" - dflags "-J=views" "-I=src/sdp" - #lflags "ld.gold" - buildRequirements "allowWarnings" - buildOptions "verbose" "debugMode" "debugInfo" "optimize" - debugVersions "checkdoc" "summary" - debugVersions "tmp" - debugVersions "crap" - debugVersions "header" - debugVersions "header1" - postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-tmp'" -} configuration "sdp-debug-clean" { name "debug-clean" targetType "executable" @@ -67,6 +51,16 @@ configuration "sdp-dmd" { buildOptions "verbose" "releaseMode" "optimize" "inline" postGenerateCommands "/usr/bin/notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-dmd'" } +configuration "sdp-dmd-version" { + name "dmd" + targetType "executable" + platforms "posix" + targetName "sdp-dmd-ver" + dflags "-J=views" "-I=src/sdp" + buildRequirements "allowWarnings" + buildOptions "verbose" "releaseMode" "optimize" "inline" + postGenerateCommands "/usr/bin/notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-[version]-dmd'" +} configuration "sdp-dmd-debug" { name "debuging" targetType "executable" @@ -79,6 +73,18 @@ configuration "sdp-dmd-debug" { debugVersions "dumpdoc" postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-dmd-debug'" } +configuration "sdp-dmd-debug-version" { + name "debuging" + targetType "executable" + platforms "posix" + targetName "sdp-dmd-debug-ver" + dflags "-g" "-J=views" "-I=src/sdp" + buildRequirements "allowWarnings" + buildOptions "verbose" "debugMode" "debugInfo" "optimize" + debugVersions "checkdoc" "summary" + debugVersions "dumpdoc" + postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-[version]-dmd-debug'" +} configuration "sdp-dmd-debug-unittest" { name "debuging" targetType "executable" @@ -109,11 +115,21 @@ configuration "sdp-ldc" { targetType "executable" platforms "posix" targetName "sdp-ldc" - dflags "-J=views" "-I=src/sdp" + dflags "-O2" "-J=views" "-I=src/sdp" buildRequirements "allowWarnings" buildOptions "verbose" "releaseMode" "optimize" "inline" postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-ldc'" } +configuration "sdp-ldc-version" { + name "ldc" + targetType "executable" + platforms "posix" + targetName "sdp-ldc-ver" + dflags "-O2" "-J=views" "-I=src/sdp" + buildRequirements "allowWarnings" + buildOptions "verbose" "releaseMode" "optimize" "inline" + postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-[version]-ldc'" +} configuration "sdp-ldc-debug" { name "debuging" targetType "executable" @@ -125,6 +141,17 @@ configuration "sdp-ldc-debug" { debugVersions "checkdoc" "summary" postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-ldc-debug'" } +configuration "sdp-ldc-debug-version" { + name "debuging" + targetType "executable" + platforms "posix" + targetName "sdp-ldc-debug-ver" + dflags "-g" "-J=views" "-I=src/sdp" + buildRequirements "allowWarnings" + buildOptions "verbose" "debugMode" "debugInfo" "optimize" + debugVersions "checkdoc" "summary" + postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-[version]-ldc-debug'" +} configuration "sdp-ldc-debug-unittest" { name "debuging" targetType "executable" @@ -158,6 +185,17 @@ configuration "sdp-gdc" { buildOptions "verbose" "releaseMode" "optimize" "inline" postGenerateCommands "/usr/bin/notify-send -t 0 'D gdc compiled test release executable ready' 'sdp-gdc'" } +configuration "sdp-gdc-version" { + name "gdc" + targetType "executable" + platforms "posix" + targetName "sdp-gdc-ver" + dflags "-O2" "-J=views" "-I=src/sdp" + lflags "-lz" + buildRequirements "allowWarnings" + buildOptions "verbose" "releaseMode" "optimize" "inline" + postGenerateCommands "/usr/bin/notify-send -t 0 'D gdc compiled test release executable ready' 'sdp-[version]-gdc'" +} configuration "sdp-gdc-debug" { name "debuging" targetType "executable" @@ -169,6 +207,17 @@ configuration "sdp-gdc-debug" { debugVersions "checkdoc" "summary" postGenerateCommands "/usr/bin/notify-send -t 0 'D gdc compiled (debug with -g) executable ready' 'sdp-gdc-debug'" } +configuration "sdp-gdc-debug-version" { + name "debuging" + targetType "executable" + platforms "posix" + targetName "sdp-gdc-debug-ver" + dflags "-O2" "-fbuiltin" "-Wall" "-Werror" "-Wformat=2" "-g" "-J=views" "-I=src/sdp" + lflags "-lz" + buildOptions "verbose" "debugMode" "debugInfo" "optimize" + debugVersions "checkdoc" "summary" + postGenerateCommands "/usr/bin/notify-send -t 0 'D gdc compiled (debug with -g) executable ready' 'sdp-gdc-debug'" +} configuration "sdp-gdc-debug-unittest" { name "debuging" targetType "executable" diff --git a/makefile b/makefile index 4c2ab15..12e27a2 100644 --- a/makefile +++ b/makefile @@ -64,6 +64,36 @@ dub: $(PRG_SRCDIR)/$(PRG_SRC) $(DUB) $(DUB_FLAGS)$(DC) debug_dub: $(PRG_SRCDIR)/$(PRG_SRC) $(DUB) $(DUB_FLAGS)$(DC) $(DUB_FLAGS_DEBUG) +all_builds_quick: + $(DUB) --compiler=dmd --config=sdp-dmd-version + mv bin/sdp-dmd-ver bin/sdp-$(PROJECT_VERSION)-dmd + $(DUB) --compiler=ldc2 --config=sdp-ldc-version + mv bin/sdp-ldc-ver bin/sdp-$(PROJECT_VERSION)-ldc + $(DUB) --compiler=gdc --config=sdp-gdc-version + mv bin/sdp-gdc-ver bin/sdp-$(PROJECT_VERSION)-gdc +all_builds_quick_release: + $(DUB) --compiler=dmd --config=sdp-dmd-version + mv bin/sdp-dmd-ver bin/sdp-$(PROJECT_VERSION)-dmd + $(DUB) --compiler=ldc2 --config=sdp-ldc-version + mv bin/sdp-ldc-ver bin/sdp-$(PROJECT_VERSION)-ldc + $(DUB) --compiler=gdc --config=sdp-gdc-version + mv bin/sdp-gdc-ver bin/sdp-$(PROJECT_VERSION)-gdc +all_builds: clean skel tangle + $(DUB) --compiler=dmd --config=sdp-dmd-version + mv bin/sdp-dmd-ver bin/sdp-$(PROJECT_VERSION)-dmd + $(DUB) --compiler=ldc2 --config=sdp-ldc-version + mv bin/sdp-ldc-ver bin/sdp-$(PROJECT_VERSION)-ldc + $(DUB) --compiler=gdc --config=sdp-gdc-version + mv bin/sdp-gdc-ver bin/sdp-$(PROJECT_VERSION)-gdc +all_builds_debug: clean skel tangle + $(DUB) --compiler=dmd --config=sdp-dmd-debug-version + mv bin/sdp-dmd-debug-ver bin/sdp-$(PROJECT_VERSION)-dmd-debug + $(DUB) --compiler=ldc2 --config=sdp-ldc-debug-version + mv bin/sdp-ldc-debug-ver bin/sdp-$(PROJECT_VERSION)-ldc-debug + $(DUB) --compiler=gdc --config=sdp-gdc-debug-version + mv bin/sdp-gdc-debug-ver bin/sdp-$(PROJECT_VERSION)-gdc-debug +ver: + echo sdp-$(PROJECT_VERSION) # dmd dmd_release: expunge skel tangle $(DUB) --compiler=dmd --config=sdp-release @@ -86,8 +116,6 @@ dmd_debug_unittest: tangle $(DUB) --compiler=dmd --config=sdp-dmd-debug-unittest dmd_debug_clean: tangle $(DUB) --compiler=dmd --config=sdp-debug-clean -dmd_tmp: tangle - $(DUB) --compiler=dmd --config=sdp-tmp dmd_debug_src: $(DUB) --compiler=dmd --config=sdp-debug # gdc @@ -112,8 +140,6 @@ gdc_debug_unittest: tangle $(DUB) --compiler=gdc --config=sdp-gdc-debug-unittest gdc_debug_clean: tangle $(DUB) --compiler=gdc --config=sdp-debug-clean -gdc_tmp: tangle - $(DUB) --compiler=gdc --config=sdp-tmp gdc_debug_src: $(DUB) --compiler=gdc --config=sdp-debug # ldc2 @@ -138,8 +164,6 @@ ldc_debug_unittest: tangle $(DUB) --compiler=ldc2 --config=sdp-ldc-debug-unittest ldc_debug_clean: tangle $(DUB) --compiler=ldc2 --config=sdp-debug-clean -ldc_tmp: tangle - $(DUB) --compiler=ldc2 --config=sdp-tmp ldc_debug_src: $(DUB) --compiler=ldc2 --config=sdp-debug dmd_release_test: tangle dmd_test_release diff --git a/maker.org b/maker.org index 75b513f..38f738a 100644 --- a/maker.org +++ b/maker.org @@ -240,7 +240,7 @@ makefile_new: make -k tangle_maker #+END_SRC -**** _dub_ build rebuild [#A] :dub: +**** _dub_ build rebuild [#A] :dub: ***** generic #+BEGIN_SRC makefile :tangle makefile @@ -250,6 +250,51 @@ debug_dub: $(PRG_SRCDIR)/$(PRG_SRC) $(DUB) $(DUB_FLAGS)$(DC) $(DUB_FLAGS_DEBUG) #+END_SRC +#+BEGIN_SRC makefile :tangle makefile +all_builds_quick: + $(DUB) --compiler=dmd --config=sdp-dmd-version + mv bin/sdp-dmd-ver bin/sdp-$(PROJECT_VERSION)-dmd + $(DUB) --compiler=ldc2 --config=sdp-ldc-version + mv bin/sdp-ldc-ver bin/sdp-$(PROJECT_VERSION)-ldc + $(DUB) --compiler=gdc --config=sdp-gdc-version + mv bin/sdp-gdc-ver bin/sdp-$(PROJECT_VERSION)-gdc +#+END_SRC + +#+BEGIN_SRC makefile :tangle makefile +all_builds_quick_release: + $(DUB) --compiler=dmd --config=sdp-dmd-version + mv bin/sdp-dmd-ver bin/sdp-$(PROJECT_VERSION)-dmd + $(DUB) --compiler=ldc2 --config=sdp-ldc-version + mv bin/sdp-ldc-ver bin/sdp-$(PROJECT_VERSION)-ldc + $(DUB) --compiler=gdc --config=sdp-gdc-version + mv bin/sdp-gdc-ver bin/sdp-$(PROJECT_VERSION)-gdc +#+END_SRC + +#+BEGIN_SRC makefile :tangle makefile +all_builds: clean skel tangle + $(DUB) --compiler=dmd --config=sdp-dmd-version + mv bin/sdp-dmd-ver bin/sdp-$(PROJECT_VERSION)-dmd + $(DUB) --compiler=ldc2 --config=sdp-ldc-version + mv bin/sdp-ldc-ver bin/sdp-$(PROJECT_VERSION)-ldc + $(DUB) --compiler=gdc --config=sdp-gdc-version + mv bin/sdp-gdc-ver bin/sdp-$(PROJECT_VERSION)-gdc +#+END_SRC + +#+BEGIN_SRC makefile :tangle makefile +all_builds_debug: clean skel tangle + $(DUB) --compiler=dmd --config=sdp-dmd-debug-version + mv bin/sdp-dmd-debug-ver bin/sdp-$(PROJECT_VERSION)-dmd-debug + $(DUB) --compiler=ldc2 --config=sdp-ldc-debug-version + mv bin/sdp-ldc-debug-ver bin/sdp-$(PROJECT_VERSION)-ldc-debug + $(DUB) --compiler=gdc --config=sdp-gdc-debug-version + mv bin/sdp-gdc-debug-ver bin/sdp-$(PROJECT_VERSION)-gdc-debug +#+END_SRC + +#+BEGIN_SRC makefile :tangle makefile +ver: + echo sdp-$(PROJECT_VERSION) +#+END_SRC + ***** dmd #+BEGIN_SRC makefile :tangle makefile @@ -275,8 +320,6 @@ dmd_debug_unittest: tangle $(DUB) --compiler=dmd --config=sdp-dmd-debug-unittest dmd_debug_clean: tangle $(DUB) --compiler=dmd --config=sdp-debug-clean -dmd_tmp: tangle - $(DUB) --compiler=dmd --config=sdp-tmp dmd_debug_src: $(DUB) --compiler=dmd --config=sdp-debug #+END_SRC @@ -306,8 +349,6 @@ gdc_debug_unittest: tangle $(DUB) --compiler=gdc --config=sdp-gdc-debug-unittest gdc_debug_clean: tangle $(DUB) --compiler=gdc --config=sdp-debug-clean -gdc_tmp: tangle - $(DUB) --compiler=gdc --config=sdp-tmp gdc_debug_src: $(DUB) --compiler=gdc --config=sdp-debug #+END_SRC @@ -337,8 +378,6 @@ ldc_debug_unittest: tangle $(DUB) --compiler=ldc2 --config=sdp-ldc-debug-unittest ldc_debug_clean: tangle $(DUB) --compiler=ldc2 --config=sdp-debug-clean -ldc_tmp: tangle - $(DUB) --compiler=ldc2 --config=sdp-tmp ldc_debug_src: $(DUB) --compiler=ldc2 --config=sdp-debug #+END_SRC @@ -580,27 +619,6 @@ configuration "sdp-debug" { } #+END_SRC -**** sdp-tmp - -#+BEGIN_SRC sh :tangle dub.sdl -configuration "sdp-tmp" { - name "tmp" - targetType "executable" - platforms "posix" - targetName "sdp-tmp" - dflags "-J=views" "-I=src/sdp" - #lflags "ld.gold" - buildRequirements "allowWarnings" - buildOptions "verbose" "debugMode" "debugInfo" "optimize" - debugVersions "checkdoc" "summary" - debugVersions "tmp" - debugVersions "crap" - debugVersions "header" - debugVersions "header1" - postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-tmp'" -} -#+END_SRC - **** sdp-debug-clean #+BEGIN_SRC sh :tangle dub.sdl @@ -617,6 +635,7 @@ configuration "sdp-debug-clean" { *** dmd [#A] :dmd: **** sdp-dmd +***** sdp-dmd #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-dmd" { @@ -631,7 +650,23 @@ configuration "sdp-dmd" { } #+END_SRC +***** sdp-dmd-version + +#+BEGIN_SRC sh :tangle dub.sdl +configuration "sdp-dmd-version" { + name "dmd" + targetType "executable" + platforms "posix" + targetName "sdp-dmd-ver" + dflags "-J=views" "-I=src/sdp" + buildRequirements "allowWarnings" + buildOptions "verbose" "releaseMode" "optimize" "inline" + postGenerateCommands "/usr/bin/notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-[version]-dmd'" +} +#+END_SRC + **** sdp-dmd-debug :debug: +***** sdp-dmd-debug :debug: #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-dmd-debug" { @@ -648,7 +683,24 @@ configuration "sdp-dmd-debug" { } #+END_SRC -**** sdp-dmd-debug-unittest :unittest:debug: +***** sdp-dmd-debug-version :debug: + +#+BEGIN_SRC sh :tangle dub.sdl +configuration "sdp-dmd-debug-version" { + name "debuging" + targetType "executable" + platforms "posix" + targetName "sdp-dmd-debug-ver" + dflags "-g" "-J=views" "-I=src/sdp" + buildRequirements "allowWarnings" + buildOptions "verbose" "debugMode" "debugInfo" "optimize" + debugVersions "checkdoc" "summary" + debugVersions "dumpdoc" + postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-[version]-dmd-debug'" +} +#+END_SRC + +***** sdp-dmd-debug-unittest :unittest:debug: #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-dmd-debug-unittest" { @@ -665,7 +717,7 @@ configuration "sdp-dmd-debug-unittest" { } #+END_SRC -**** sdp-dmd-debug-docs :docs:debug: +***** sdp-dmd-debug-docs :docs:debug: #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-dmd-debug-docs" { @@ -685,6 +737,7 @@ configuration "sdp-dmd-debug-docs" { *** ldc [#A] :ldc: **** sdp-ldc +***** sdp-ldc #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-ldc" { @@ -692,14 +745,30 @@ configuration "sdp-ldc" { targetType "executable" platforms "posix" targetName "sdp-ldc" - dflags "-J=views" "-I=src/sdp" + dflags "-O2" "-J=views" "-I=src/sdp" buildRequirements "allowWarnings" buildOptions "verbose" "releaseMode" "optimize" "inline" postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-ldc'" } #+END_SRC +***** sdp-ldc-version + +#+BEGIN_SRC sh :tangle dub.sdl +configuration "sdp-ldc-version" { + name "ldc" + targetType "executable" + platforms "posix" + targetName "sdp-ldc-ver" + dflags "-O2" "-J=views" "-I=src/sdp" + buildRequirements "allowWarnings" + buildOptions "verbose" "releaseMode" "optimize" "inline" + postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-[version]-ldc'" +} +#+END_SRC + **** sdp-ldc-debug :debug: +***** sdp-ldc-debug :debug: #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-ldc-debug" { @@ -715,7 +784,23 @@ configuration "sdp-ldc-debug" { } #+END_SRC -**** sdp-ldc-debug-unittest :unittest:debug: +***** sdp-ldc-debug-version :debug: + +#+BEGIN_SRC sh :tangle dub.sdl +configuration "sdp-ldc-debug-version" { + name "debuging" + targetType "executable" + platforms "posix" + targetName "sdp-ldc-debug-ver" + dflags "-g" "-J=views" "-I=src/sdp" + buildRequirements "allowWarnings" + buildOptions "verbose" "debugMode" "debugInfo" "optimize" + debugVersions "checkdoc" "summary" + postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-[version]-ldc-debug'" +} +#+END_SRC + +***** sdp-ldc-debug-unittest :unittest:debug: #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-ldc-debug-unittest" { @@ -731,7 +816,7 @@ configuration "sdp-ldc-debug-unittest" { } #+END_SRC -**** sdp-ldc-debug-docs :docs:debug: +***** sdp-ldc-debug-docs :docs:debug: #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-ldc-debug-docs" { @@ -749,6 +834,7 @@ configuration "sdp-ldc-debug-docs" { *** gdc :gdc: **** sdp-gdc +***** sdp-gdc #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-gdc" { @@ -764,7 +850,24 @@ configuration "sdp-gdc" { } #+END_SRC -**** sdp-gdc-debug :debug: +***** sdp-gdc-version + +#+BEGIN_SRC sh :tangle dub.sdl +configuration "sdp-gdc-version" { + name "gdc" + targetType "executable" + platforms "posix" + targetName "sdp-gdc-ver" + dflags "-O2" "-J=views" "-I=src/sdp" + lflags "-lz" + buildRequirements "allowWarnings" + buildOptions "verbose" "releaseMode" "optimize" "inline" + postGenerateCommands "/usr/bin/notify-send -t 0 'D gdc compiled test release executable ready' 'sdp-[version]-gdc'" +} +#+END_SRC + +**** sdp-gdc-debug :debug: +***** sdp-gdc-debug :debug: #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-gdc-debug" { @@ -780,7 +883,23 @@ configuration "sdp-gdc-debug" { } #+END_SRC -**** sdp-gdc-debug-unittest :unittest:debug: +***** sdp-gdc-debug-version :debug: + +#+BEGIN_SRC sh :tangle dub.sdl +configuration "sdp-gdc-debug-version" { + name "debuging" + targetType "executable" + platforms "posix" + targetName "sdp-gdc-debug-ver" + dflags "-O2" "-fbuiltin" "-Wall" "-Werror" "-Wformat=2" "-g" "-J=views" "-I=src/sdp" + lflags "-lz" + buildOptions "verbose" "debugMode" "debugInfo" "optimize" + debugVersions "checkdoc" "summary" + postGenerateCommands "/usr/bin/notify-send -t 0 'D gdc compiled (debug with -g) executable ready' 'sdp-gdc-debug'" +} +#+END_SRC + +***** sdp-gdc-debug-unittest :unittest:debug: #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-gdc-debug-unittest" { @@ -797,7 +916,7 @@ configuration "sdp-gdc-debug-unittest" { } #+END_SRC -**** sdp-gdc-debug-docs :docs:debug: +***** sdp-gdc-debug-docs :docs:debug: #+BEGIN_SRC sh :tangle dub.sdl configuration "sdp-gdc-debug-docs" { @@ -976,8 +1095,6 @@ dub --compiler=ldc2 -v --force --config=sdp-release # sdp # time ~sdp3/bin/sdp -v --html --no-assert en/autonomy_markup0.sst dub --compiler=ldc2 -v --force --config=sdp-debug # sdp-debug # time ~sdp3/bin/sdp-debug -v --html --no-assert en/autonomy_markup0.sst -dub --compiler=ldc2 -v --force --config=sdp-tmp # sdp-tmp -# time ~sdp3/bin/sdp-tmp -v --html --no-assert en/autonomy_markup0.sst dub --compiler=ldc2 -v --force --config=sdp-debug-clean # sdp-debug-clean # time ~sdp3/bin/sdp-debug-clean -v --html --no-assert en/autonomy_markup0.sst #+END_SRC diff --git a/org/sdp.org b/org/sdp.org index 63557ed..5eb1364 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -17,6 +17,8 @@ [[../maker.org][maker.org makefile]] [[./][org/]] * 0. version.txt (set version) :version: +** set program version + #+NAME: version_txt #+BEGIN_SRC d :tangle ../views/version.txt /+ obt - org generated file +/ @@ -28,6 +30,25 @@ struct Version { enum ver = Version(0, 18, 0); #+END_SRC +#+NAME: version_txt + +** compilation restrictions (supported compilers) + +http://dlang.org/spec/version.html#predefined-versions + +#+BEGIN_SRC d :tangle ../views/version.txt +version (Posix) { + version (DigitalMars) { + } else version (LDC) { + } else version (GNU) { + } else { + static assert (0, "Unsupported D compiler"); + } +} else { + static assert (0, "Unsupported D compiler"); +} +#+END_SRC + * 1. sdp (sisu document parser) :sdp: - deal with imports diff --git a/views/version.txt b/views/version.txt index 07683c2..db9b02e 100644 --- a/views/version.txt +++ b/views/version.txt @@ -5,3 +5,13 @@ struct Version { int patch; } enum ver = Version(0, 18, 0); +version (Posix) { + version (DigitalMars) { + } else version (LDC) { + } else version (GNU) { + } else { + static assert (0, "Unsupported D compiler"); + } +} else { + static assert (0, "Unsupported D compiler"); +} -- cgit v1.2.3