diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2020-05-12 17:11:53 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2020-05-21 11:51:58 -0400 |
commit | 6a5c473653f03aee818d835b53ca30b62a3be6c7 (patch) | |
tree | dfec2ef22a834f5c2a7003a4884bb7c7a8288609 /org | |
parent | doc abstraction, code & org whitespace, cosmetic (diff) |
meson using subproject directory, not dub directly
- will not work until meson.build files in
- d2sqlite3
- imageformats
(request adding upstream)
- dyaml and its dependency tinyendian already
provide their meson.build
(should probably revert to meson dub until
resolved)
- based on 1468425 meson build (no issue now with
imagefomats using 7.0.2)
Diffstat (limited to 'org')
-rw-r--r-- | org/spine_build_scaffold.org | 254 |
1 files changed, 131 insertions, 123 deletions
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index 22e156e..49716d9 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -1022,12 +1022,15 @@ http://mesonbuild.com/Dependencies.html#Dub ls -1 ./src/*/**/*.d tree -fi ./src |rg "\.d$" +fdfind -e .d tree -if src | rg ".+\.d$" > spine_sources.txt && \ for i in spine_sources.txt; do; \ sed -i "s/\(.\+\.d$\)/ '\1',/g" $i; done && \ cat spine_sources.txt +**** project meson.build + #+BEGIN_SRC sh :tangle ../meson.build project('spine', 'd', license: 'AGPL-3', @@ -1037,7 +1040,7 @@ project('spine', 'd', #if meson.get_compiler('d').get_id() == 'gcc' # error('spine cannot be compiled with GDC at time. Sorry.') #endif -spine_sources = [ +spine_src = [ 'src/doc_reform/spine.d', 'src/doc_reform/conf/compile_time_info.d', 'src/doc_reform/io_in/paths_source.d', @@ -1079,16 +1082,16 @@ spine_sources = [ 'src/doc_reform/share/defaults.d', ] source_root = meson.source_root() -sources_dir = include_directories('src/') +src_dir = include_directories('src/', 'subprojects/') # Dependencies -dep_tinyendian = dependency('tinyendian', version: '>= 0.2.0', fallback: ['tinyendian', 'tinyendian_dep'], method: 'dub') -dep_dyaml = dependency('dyaml', version: '>= 0.8.0', fallback: ['dyaml', 'dyaml_dep'], method: 'dub') -dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.18.3', fallback: ['d2sqlite3', 'd2sqlite3_dep'], method: 'dub') -dep_imageformats = dependency('imageformats', version: '>= 7.0.2', fallback: ['imageformats', 'imageformats_dep'], method: 'dub') +dep_tinyendian = dependency('tinyendian', version: '>= 0.2.0', fallback: ['tinyendian', 'tinyendian_dep']) +dep_dyaml = dependency('dyaml', version: '>= 0.8.0', fallback: ['dyaml', 'dyaml_dep']) +dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.18.3', fallback: ['d2sqlite3', 'd2sqlite3_dep']) +dep_imageformats = dependency('imageformats', version: '>= 7.0.2', fallback: ['imageformats', 'imageformats_dep']) # Executable spine_exe = executable('spine', - [spine_sources], - include_directories : [sources_dir], + [spine_src], + include_directories : [src_dir], d_import_dirs: [include_directories('views')], dependencies : [ dep_tinyendian, @@ -1100,9 +1103,10 @@ spine_exe = executable('spine', ) #+END_SRC -** subprojects +** meson subprojects [can be taken care of using dub] +*** README -#+BEGIN_SRC txt :NO-tangle ../subprojects/README +#+BEGIN_SRC txt :tangle ../subprojects/README - d2sqlite3 - dub - https://code.dlang.org/packages/d2sqlite3 @@ -1127,117 +1131,10 @@ spine_exe = executable('spine', - https://github.com/dlang-community/tinyendian.git #+END_SRC -* .gitignore :gitignore: - -#+BEGIN_SRC sh :tangle ../.gitignore -# git ls-files --others --exclude-from=.git/info/exclude -#./.dub/** -* -!.gitignore -!COPYRIGHT -!README -!makefile -!version.txt -!dub.json -!dub.sdl -!meson.build -!tangle -!*.org -!*.d -!*.rb -!conf.sdl -!doc -!doc/** -!man -!man/** -!org -!misc -!misc/** -!src -!src/** -!data -!data/* -!data/src/** -!data/src_yaml/** -!data/pod/** -!data/pod_yaml/** -!*.sst -!*.ssm -!**/*.sst -!**/*.ssm -!pod.manifest -!sisu_document_make -!config_local_site -!sisudoc -!views -!docs/*.html -!notes -notes/** -!notes/*.org -!notes/sisu-description.sst -!notes/reminders -!notes/reminders/** -.dub/** -**/.dub/** -**/cgi-bin/** -tmp/** -*_.org -*_.d -*_.txt -*_ -*~ -\#* -*.\#* -#!*/ -#*~ -#\#* -#*.\#* -#!debian -#!debian/** -#.reggae/** -#+END_SRC - -* 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 ./src/doc_reform/ -(similar functionality is contained within the "makefile" created by this -"dr_build_scaffold.org" file make tangle) - -#+BEGIN_SRC sh :tangle ../tangle :tangle-mode (identity #o755) :shebang #!/bin/sh -# -*- mode: shell-script -*- -# tangle files with org-mode -DIR=`pwd` -ORGFILES="" -EMACSLISP=/usr/share/emacs/site-lisp -ORG_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-???????? | cut -d '-' -f2`) -EMACSLISP_ORG=~/.emacs.d/elpa/org-$($(shell echo $(ORG_VER_AVAILABLE))) -ORG_CONTRIB_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-plus-???????? | cut -d '-' -f2`) -EMACSLISP_ORG_CONTRIB=~/.emacs.d/elpa/org-plus-contrib-$($(shell echo $(ORG_CONTRIB_VER_AVAILABLE))) -# wrap each argument in the code required to call tangle on it -for i in $@; do - ORGFILES="$ORGFILES \"$i\"" -done -emacs --batch -Q -q \ ---eval "(progn -(add-to-list 'load-path (expand-file-name \"$EMACSLISP\")) -(add-to-list 'load-path (expand-file-name \"$EMACSLISP_ORG\" t)) -(add-to-list 'load-path (expand-file-name \"$EMACSLISP_ORG_CONTRIB\" t)) -(require 'org)(require 'ob)(require 'ob-tangle) -(mapc (lambda (file) - (find-file (expand-file-name file \"$DIR\")) - (setq-local org-src-preserve-indentation t) - (org-babel-tangle) - (kill-buffer)) '($ORGFILES)))" 2>&1 #|grep tangled -#+END_SRC - -* __END__ - -** meson subprojects [now taken care of using dub] *** d2sqlite3 **** wrap -#+BEGIN_SRC sh :NO-tangle ../subprojects/d2sqlite3.wrap +#+BEGIN_SRC sh :tangle ../subprojects/d2sqlite3.wrap [wrap-git] directory = d2sqlite3 url = https://github.com/biozic/d2sqlite3.git @@ -1246,7 +1143,7 @@ revision = head **** meson.build -#+BEGIN_SRC sh :NO-tangle ../subprojects/d2sqlite3.meson.build +#+BEGIN_SRC sh :tangle ../subprojects/d2sqlite3.meson.build project('d2sqlite3', 'd', meson_version: '>=0.46', license: 'BSL-1.0', @@ -1300,7 +1197,7 @@ d2sqlite3_dep = declare_dependency( *** dyaml **** wrap -#+BEGIN_SRC sh :NO-tangle ../subprojects/dyaml.wrap +#+BEGIN_SRC sh :tangle ../subprojects/dyaml.wrap [wrap-git] directory = dyaml url = https://github.com/dlang-community/D-YAML.git @@ -1309,6 +1206,8 @@ revision = head **** meson.build (provided by upstream) +Upstream provides meson.build + #+BEGIN_SRC sh :NO-tangle ../subprojects/D-YAML/meson.build project('D-YAML', 'd', meson_version: '>=0.40.0', @@ -1385,7 +1284,7 @@ dyaml_dep = declare_dependency( *** imageformats **** wrap -#+BEGIN_SRC sh :NO-tangle ../subprojects/imageformats.wrap +#+BEGIN_SRC sh :tangle ../subprojects/imageformats.wrap [wrap-git] directory = imageformats url = https://github.com/lgvz/imageformats.git @@ -1394,7 +1293,7 @@ revision = head **** meson.build -#+BEGIN_SRC sh :NO-tangle ../subprojects/imageformats.meson.build +#+BEGIN_SRC sh :tangle ../subprojects/imageformats.meson.build project('imageformats', 'd', meson_version: '>=0.46', license: 'BSL-1.0', @@ -1440,7 +1339,7 @@ imageformats_dep = declare_dependency( *** tinyendian (dyaml dependency) **** wrap -#+BEGIN_SRC sh :NO-tangle ../subprojects/tinyendian.wrap +#+BEGIN_SRC sh :tangle ../subprojects/tinyendian.wrap [wrap-git] directory = tinyendian url = https://github.com/dlang-community/tinyendian.git @@ -1449,6 +1348,8 @@ revision = head **** meson.build (provided by upstream) +Upstream provides meson.build + #+BEGIN_SRC sh :NO-tangle ../subprojects/tinyendian/meson.build # -*- mode: python; -*- @@ -1493,6 +1394,113 @@ tinyendian_dep = declare_dependency( ) #+END_SRC +* .gitignore :gitignore: + +#+BEGIN_SRC sh :tangle ../.gitignore +# git ls-files --others --exclude-from=.git/info/exclude +#./.dub/** +* +!.gitignore +!COPYRIGHT +!README +!makefile +!version.txt +!dub.json +!dub.sdl +!meson.build +!tangle +!*.org +!*.d +!*.rb +!conf.sdl +!doc +!doc/** +!man +!man/** +!org +!misc +!misc/** +!src +!src/** +!data +!data/* +!data/src/** +!data/src_yaml/** +!data/pod/** +!data/pod_yaml/** +!*.sst +!*.ssm +!**/*.sst +!**/*.ssm +!subprojects +!subprojects/*.wrap +!subprojects/*.meson.build +!pod.manifest +!sisu_document_make +!config_local_site +!sisudoc +!views +!docs/*.html +!notes +notes/** +!notes/*.org +!notes/sisu-description.sst +!notes/reminders +!notes/reminders/** +.dub/** +**/.dub/** +**/cgi-bin/** +tmp/** +*_.org +*_.d +*_.txt +*_ +*~ +\#* +*.\#* +#!*/ +#*~ +#\#* +#*.\#* +#!debian +#!debian/** +#.reggae/** +#+END_SRC + +* 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 ./src/doc_reform/ +(similar functionality is contained within the "makefile" created by this +"dr_build_scaffold.org" file make tangle) + +#+BEGIN_SRC sh :tangle ../tangle :tangle-mode (identity #o755) :shebang #!/bin/sh +# -*- mode: shell-script -*- +# tangle files with org-mode +DIR=`pwd` +ORGFILES="" +EMACSLISP=/usr/share/emacs/site-lisp +ORG_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-???????? | cut -d '-' -f2`) +EMACSLISP_ORG=~/.emacs.d/elpa/org-$($(shell echo $(ORG_VER_AVAILABLE))) +ORG_CONTRIB_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-plus-???????? | cut -d '-' -f2`) +EMACSLISP_ORG_CONTRIB=~/.emacs.d/elpa/org-plus-contrib-$($(shell echo $(ORG_CONTRIB_VER_AVAILABLE))) +# wrap each argument in the code required to call tangle on it +for i in $@; do + ORGFILES="$ORGFILES \"$i\"" +done +emacs --batch -Q -q \ +--eval "(progn +(add-to-list 'load-path (expand-file-name \"$EMACSLISP\")) +(add-to-list 'load-path (expand-file-name \"$EMACSLISP_ORG\" t)) +(add-to-list 'load-path (expand-file-name \"$EMACSLISP_ORG_CONTRIB\" t)) +(require 'org)(require 'ob)(require 'ob-tangle) +(mapc (lambda (file) + (find-file (expand-file-name file \"$DIR\")) + (setq-local org-src-preserve-indentation t) + (org-babel-tangle) + (kill-buffer)) '($ORGFILES)))" 2>&1 #|grep tangled +#+END_SRC + ** build *** dub |