diff options
Diffstat (limited to 'maker.org')
| -rw-r--r-- | maker.org | 239 | 
1 files changed, 148 insertions, 91 deletions
| @@ -327,6 +327,8 @@ ldc_debug_tangle: tangle  #+BEGIN_SRC makefile :tangle makefile  skel: +	mkdir -p build; \ +	mkdir -p subprojects; \  	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/conf; \  	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/meta; \  	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/output; \ @@ -335,6 +337,7 @@ skel:  	mkdir -p $(PRG_BINDIR);  init: skel  clean: +	rm -rf build; \  	rm -rf $(PRG_SRCDIR); \  	rm -rf $(PRG_DOCDIR);  clean_bin: @@ -376,18 +379,12 @@ makefile_new:  restart: clean tangle  #+END_SRC -**** _reggae_ build                                                 :reggae: +**** _meson_ build                                                :meson: -#+BEGIN_SRC makefile :tangle makefile -ragga: -	reggae -b binary -	reggae -b ninja -	build -#+END_SRC - -#+BEGIN_SRC makefile -ragga: -	reggae -b binary && reggae -b ninja && build +#+BEGIN_SRC makefile :tangle build/makefile +meson: +	meson --buildtype=debugoptimized +	ninja  #+END_SRC  *** testrun (program against document markup) @@ -820,9 +817,9 @@ targetPath          "./bin"  #sourcePath          "./src/sdp"  stringImportPaths   "./views"  buildRequirements   "allowWarnings" -dependency          "toml"         version="~>0.4.0-rc.2" # https://code.dlang.org/packages/toml          https://github.com/toml-lang/toml/wiki -dependency          "toml:json"    version="~>0.4.0-rc.2" -dependency          "d2sqlite3"    version="~>0.16.1"     # https://code.dlang.org/packages/d2sqlite3     http://biozic.github.io/d2sqlite3/d2sqlite3.html +dependency          "toml"         version="~>1.0.0-rc.2" # https://code.dlang.org/packages/toml          https://github.com/toml-lang/toml/wiki +dependency          "toml:json"    version="~>1.0.0-rc.2" +dependency          "d2sqlite3"    version="~>0.16.2"     # https://code.dlang.org/packages/d2sqlite3     http://biozic.github.io/d2sqlite3/d2sqlite3.html    subconfiguration  "d2sqlite3"   "all-included"  dependency          "archive"      version="~>0.6.0"      # http://code.dlang.org/packages/archive        https://github.com/rcythr/archive  dependency          "imageformats" version="~>7.0.0"      # https://code.dlang.org/packages/imageformats  https://github.com/lgvz/imageformats @@ -843,20 +840,6 @@ configuration "build" {  }  #+END_SRC -*** reggae build (sdp)                                            :release: - -#+BEGIN_SRC sh  :tangle dub.sdl -configuration "reggae" { -  name                 "build" -  targetType           "executable" -  platforms            "posix" -  targetName           "bin/sdp-rg" -  dflags               "-J=views" "-I=src/sdp" -  buildOptions         "verbose" "releaseMode" "optimize" "inline" -  postGenerateCommands "/usr/bin/notify-send -t 0 'D release executable ready' 'sdp-rg'" -} -#+END_SRC -  *** sdp-release (sdp)                                             :release:  #+BEGIN_SRC sh  :tangle dub.sdl @@ -872,8 +855,7 @@ configuration "sdp-release" {  #+END_SRC  ** dmd                                                                 :dmd: -*** sdp-dmd                                                       :default: -**** sdp-dmd +*** sdp-dmd  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-dmd" { @@ -888,7 +870,7 @@ configuration "sdp-dmd" {  }  #+END_SRC -**** sdp-dmd-version +*** sdp-dmd-version  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-dmd-version" { @@ -902,7 +884,7 @@ configuration "sdp-dmd-version" {  }  #+END_SRC -**** sdp-dmd-release +*** sdp-dmd-release  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-dmd-release" { @@ -917,8 +899,7 @@ configuration "sdp-dmd-release" {  }  #+END_SRC -*** sdp-dmd-debug                                                   :debug: -**** sdp-dmd-debug +*** sdp-dmd-debug  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-dmd-debug" { @@ -935,10 +916,8 @@ configuration "sdp-dmd-debug" {  }  #+END_SRC -  ** ldc                                                                 :ldc: -*** sdp-ldc                                                       :default: -**** sdp-ldc +*** sdp-ldc  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-ldc" { @@ -953,7 +932,7 @@ configuration "sdp-ldc" {  }  #+END_SRC -**** sdp-ldc-version +*** sdp-ldc-version  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-ldc-version" { @@ -967,7 +946,7 @@ configuration "sdp-ldc-version" {  }  #+END_SRC -**** sdp-ldc-release +*** sdp-ldc-release  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-ldc-release" { @@ -982,8 +961,7 @@ configuration "sdp-ldc-release" {  }  #+END_SRC -*** sdp-ldc-debug                                                   :debug: -**** sdp-ldc-debug +*** sdp-ldc-debug  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-ldc-debug" { @@ -1000,8 +978,7 @@ configuration "sdp-ldc-debug" {  #+END_SRC  ** gdc                                                                 :gdc: -*** sdp-gdc                                                       :default: -**** sdp-gdc +*** sdp-gdc  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-gdc" { @@ -1017,7 +994,7 @@ configuration "sdp-gdc" {  }  #+END_SRC -**** sdp-gdc-version +*** sdp-gdc-version  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-gdc-version" { @@ -1032,7 +1009,7 @@ configuration "sdp-gdc-version" {  }  #+END_SRC -**** sdp-gdc-release +*** sdp-gdc-release  #+BEGIN_SRC sh  :tangle dub.sdl  configuration "sdp-gdc-release" { @@ -1048,10 +1025,9 @@ configuration "sdp-gdc-release" {  }  #+END_SRC -*** sdp-gdc-debug                                                   :debug: -**** sdp-gdc-debug +*** sdp-gdc-debug -#+BEGIN_SRC sh  :tangle dub.sdl +#+BEGIN_SRC sh :tangle dub.sdl  configuration "sdp-gdc-debug" {    name                 "debuging"    targetType           "executable" @@ -1065,13 +1041,126 @@ configuration "sdp-gdc-debug" {  }  #+END_SRC -* reggaefile.d                                                       :reggae: - -#+BEGIN_SRC d  :tangle reggaefile.d -import reggae; -alias _compile = dubDefaultTarget!(CompilerFlags("-g -O")); -alias _dub_conf = dubConfigurationTarget!(Configuration("reggae")); -mixin build!(_compile, _dub_conf); +* meson +** notes + +http://mesonbuild.com/D.html +http://mesonbuild.com/Dependencies.html#Dub +- create and move to subdirectory +  rm -r build; mkdir build && cd build + +- build + +  - regular build (faster compile time): +    meson && ninja + +  - optimized build (faster program run time): +    meson --buildtype=debugoptimized && ninja + +  - time build +    time ( meson --buildtype=debugoptimized && ninja ) + +- other +  - flags +    DFLAGS= DC=ldc2 meson .. + +** * projects + +#+BEGIN_SRC sh :tangle meson.build +project('sdp', 'd', +  license: 'GPL3', +  version: '0.26.5', +  meson_version: '>=0.46' +) +#if meson.get_compiler('d').get_id() == 'gcc' +#    error('sdp cannot be compiled with GDC at time. Sorry.') +#endif +sdp_sources = [ 'src/sdp/sdp.d', +  'src/sdp/conf/compile_time_info.d', +  'src/sdp/meta/conf_make_meta_json.d', +  'src/sdp/meta/conf_make_meta_structs.d', +  'src/sdp/meta/conf_make_meta_toml.d', +  'src/sdp/meta/defaults.d', +  'src/sdp/meta/doc_debugs.d', +  'src/sdp/meta/metadoc.d', +  'src/sdp/meta/metadoc_from_src.d', +  'src/sdp/meta/metadoc_summary.d', +  'src/sdp/meta/object_setter.d', +  'src/sdp/meta/package.d', +  'src/sdp/meta/rgx.d', +  'src/sdp/output/create_zip_file.d', +  'src/sdp/output/defaults.d', +  'src/sdp/output/epub3.d', +  'src/sdp/output/html.d', +  'src/sdp/output/hub.d', +  'src/sdp/output/package.d', +  'src/sdp/output/paths_output.d', +  'src/sdp/output/rgx.d', +  'src/sdp/output/source_sisupod.d', +  'src/sdp/output/sqlite.d', +  'src/sdp/output/xmls_css.d', +  'src/sdp/output/xmls.d', +  'src/sdp/source/paths_source.d', +  'src/sdp/source/read_config_files.d', +  'src/sdp/source/read_source_files.d', +] +source_root = meson.source_root() +sources_dir = include_directories('src/') +# Dependencies +dep_toml         = dependency('toml-d',         version: '>= 1.0.0',  fallback: ['toml-d',         'toml_dep']) +dep_d2sqlite3    = dependency('d2sqlite3',      version: '>= 0.16.2', fallback: ['d2sqlite3',      'd2sqlite3_dep']) +dep_archive      = dependency('archive',        version: '>= 0.6.0',  fallback: ['archived',       'archive_dep']) +dep_imageformats = dependency('imageformats-d', version: '>= 7.0.0',  fallback: ['imageformats-d', 'imageformats_dep']) +# executable +sdp_exe = executable('sdp', +  [sdp_sources], +  include_directories : [sources_dir], +  d_import_dirs: [include_directories('views')], +  dependencies : [ +    dep_toml, +    dep_d2sqlite3, +    dep_archive, +    dep_imageformats +  ], +  install : true +) +#+END_SRC + +** * subprojects +*** toml-d + +#+BEGIN_SRC sh :tangle subprojects/toml-d.wrap +[wrap-git] +directory = toml-d +url       = https://github.com/ximion/toml.git +revision  = head +#+END_SRC + +*** d2sqlite3 + +#+BEGIN_SRC sh :tangle subprojects/d2sqlite3.wrap +[wrap-git] +directory = d2sqlite3 +url       = https://github.com/ximion/d2sqlite3.git +revision  = head +#+END_SRC + +*** archived + +#+BEGIN_SRC sh :tangle subprojects/archived.wrap +[wrap-git] +directory = archived +url       = https://github.com/ximion/archive.git +revision  = head +#+END_SRC + +*** imageformats-d + +#+BEGIN_SRC sh :tangle subprojects/imageformats-d.wrap +[wrap-git] +directory = imageformats-d +url       = https://github.com/ximion/imageformats.git +revision  = head  #+END_SRC  * .gitignore                                                      :gitignore: @@ -1085,6 +1174,7 @@ mixin build!(_compile, _dub_conf);  !version.txt  !dub*.json  !dub.sdl +!meson.build  !tangle  !*.org  !*.d @@ -1102,6 +1192,9 @@ mixin build!(_compile, _dub_conf);  !*.ssm  !**/*.sst  !**/*.ssm +!subprojects +!**/*.wrap +!subprojects/*.wrap  !sisupod.manifest  !sisu_document_make  !config_local_site @@ -1111,7 +1204,6 @@ mixin build!(_compile, _dub_conf);  !views  !docs/*.html  .dub/** -.reggae/**  tmp/**  *_.org  *_.d @@ -1192,8 +1284,6 @@ time make all  time make all_ver  time make dmd_ver ldc_ver gdc_ver -time make ragga -  time make restart  time make restart ldc  time make tangle ldc @@ -1201,38 +1291,6 @@ time make tangle ldc  time make ldc_testrun_find_pod_epub  #+END_SRC -*** reggae - -touch src/sdp/sdp.d - -#+BEGIN_SRC sh -reggae -b binary && reggae -b ninja && build -#+END_SRC - -#+BEGIN_SRC sh -reggae -b binary && build -reggae -b ninja && build -# reggae -b ninja --dc=dmd && build -reggae -b binary --dc=ldmd2 && build -reggae -b ninja --dc=ldmd2 && build -# reggae -b ninja --dc=gdc && build -reggae -b binary --dc=gdmd && build -reggae -b ninja --dc=gdmd && build -#+END_SRC - -see/try: dub describe - -**** issues -issue with ldc2 -reggae -b ninja --dc ldc2 && build -https://github.com/atilaneves/reggae/issues/29 -use ldmd2 -reggae -b ninja --dc ldmd2 && build -https://stackoverflow.com/questions/35515138/ldc2-vs-ldmd2-whats-the-difference - -issue with gdc -reggae -b ninja --dc gdc && build -  ** dub zfunc                                                         :zfunc:  *** ,dubdmd                                                           :dmd: @@ -1331,7 +1389,6 @@ dub fetch sdlang-d  dub fetch taggedalgebraic  dub fetch libinputvisitor  dub fetch unit-threaded ? -dub fetch reggae  sdp ~master: /home/ralph/grotto/repo/git.repo/utils/sdp-x/  /home/ralph/.dub/packages/* | 
