diff options
| -rw-r--r-- | makefile | 1212 | ||||
| -rw-r--r-- | org/config_d_cfte.org | 81 | ||||
| -rw-r--r-- | org/config_make.org | 1710 | ||||
| -rw-r--r-- | org/doc-reform.org | 1 | ||||
| -rw-r--r-- | sundry/spine_search_cgi/makefile | 52 | 
5 files changed, 2702 insertions, 354 deletions
| diff --git a/makefile b/makefile new file mode 100644 index 0000000..6b76b0a --- /dev/null +++ b/makefile @@ -0,0 +1,1212 @@ +PROG_VER_GIT :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`) +PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`) +DUB=dub +DUB_FLAGS=-v --force --compiler= +PRG_NAME=doc-reform +PRG_NICKAME=spine +PRG_NAME_DIR=$(shell echo `echo $(PRG_NAME) | sed -e "s/-/_/g"`) +PRG_SRC=$(PRG_NAME).d +PRG_SRCDIR=./src +PRG_BIN=$(PRG_NAME) +PRG_BINDIR=./bin +PRG_DOCDIR=./docs +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-contrib-???????? | cut -d '-' -f2`) +EMACSLISP_ORG_CONTRIB=~/.emacs.d/elpa/org-plus-contrib-$($(shell echo $(ORG_CONTRIB_VER_AVAILABLE))) +ORGFILELIST=$(shell echo `ls -1 org/*.org`) +ORGFILES="" +ORGDIR :=$(shell echo `pwd`) +SiSU_MARKUP_SAMPLES_FIND_PODS= \ +find data/pod -maxdepth 2 -name pod.manifest | cut -f 1-3 -d / | sort + +SiSU_MARKUP_SAMPLES_PODS_FOUND= \ +$(SiSU_MARKUP_SAMPLES_FIND_PODS) | xargs + +SiSU_MARKUP_SAMPLES_POD = \ +data/pod/accelerando.charles_stross \ +data/pod/alices_adventures_in_wonderland.lewis_carroll \ +data/pod/content.cory_doctorow \ +data/pod/democratizing_innovation.eric_von_hippel \ +data/pod/down_and_out_in_the_magic_kingdom.cory_doctorow \ +data/pod/for_the_win.cory_doctorow \ +data/pod/free_as_in_freedom_2.richard_stallman_and_the_free_software_revolution.sam_williams.richard_stallman \ +data/pod/free_culture.lawrence_lessig \ +data/pod/free_for_all.peter_wayner \ +data/pod/gpl2.fsf \ +data/pod/gpl3.fsf \ +data/pod/gullivers_travels.jonathan_swift \ +data/pod/little_brother.cory_doctorow \ +data/pod/live-manual \ +data/pod/sisu-manual \ +data/pod/the_autonomous_contract.ralph_amissah \ +data/pod/the_cathedral_and_the_bazaar.eric_s_raymond \ +data/pod/the_public_domain.james_boyle \ +data/pod/the_wealth_of_networks.yochai_benkler \ +data/pod/through_the_looking_glass.lewis_carroll \ +data/pod/two_bits.christopher_kelty \ +data/pod/un_contracts_international_sale_of_goods_convention_1980 \ +data/pod/viral_spiral.david_bollier +# SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND = \ +# find data/sisudir/media/text -name *.ss[tm] | sort | xargs +# +# SiSU_MARKUP_SAMPLES_DIR = \ +# data/sisudir/media/text/accelerando.charles_stross.sst \ +# data/sisudir/media/text/alices_adventures_in_wonderland.lewis_carroll.sst \ +# data/sisudir/media/text/content.cory_doctorow.sst \ +# data/sisudir/media/text/democratizing_innovation.eric_von_hippel.sst \ +# data/sisudir/media/text/down_and_out_in_the_magic_kingdom.cory_doctorow.sst \ +# data/sisudir/media/text/ffa_tmp.sst \ +# data/sisudir/media/text/for_the_win.cory_doctorow.sst \ +# data/sisudir/media/text/free_as_in_freedom_2.richard_stallman_and_the_free_software_revolution.sam_williams.richard_stallman.sst \ +# data/sisudir/media/text/free_culture.lawrence_lessig.sst \ +# data/sisudir/media/text/free_for_all.peter_wayner.sst \ +# data/sisudir/media/text/gpl2.fsf.sst \ +# data/sisudir/media/text/gpl3.fsf.sst \ +# data/sisudir/media/text/gullivers_travels.jonathan_swift.sst \ +# data/sisudir/media/text/little_brother.cory_doctorow.sst \ +# data/sisudir/media/text/sisu_markup.sst \ +# data/sisudir/media/text/sisu_markup_stress_test.sst \ +# data/sisudir/media/text/sisu_markup_test.sst \ +# data/sisudir/media/text/table_special_markup.sst \ +# data/sisudir/media/text/the_autonomous_contract.ralph_amissah.sst \ +# data/sisudir/media/text/the_cathedral_and_the_bazaar.eric_s_raymond.sst \ +# data/sisudir/media/text/the_public_domain.james_boyle.sst \ +# data/sisudir/media/text/the_wealth_of_networks.yochai_benkler.sst \ +# data/sisudir/media/text/through_the_looking_glass.lewis_carroll.sst \ +# data/sisudir/media/text/two_bits.christopher_kelty.sst \ +# data/sisudir/media/text/un_contracts_international_sale_of_goods_convention_1980.sst \ +# data/sisudir/media/text/viral_spiral.david_bollier.sst +# +Date                    := `date "+%Y%m%d"` +SpineBIN                := "${SpineBIN}" # './result/bin' +SpineOUT                := "${SpineOUT}" # '/srv/www/spine' +SpinePOD                := "${SpinePOD}" # '/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples/markup/pod' +SpineSearchActionLocal  := 'http://localhost/spine_search' +SpineSearchActionRemote := 'https://sisudoc.org/spine_search' +SpineCGIform            := 'spine_search' +SpineSQLdb              := 'spine.search.db' +PROG_VER_GIT            := '''`git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`''' +PROG_VER_DECLARED       := '''`cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`''' +hwd                     := `pwd` +gwd                     := `pwd` + "/src/ext_depends" +deps                    := "`ls -gx './src/ext_depends'`" +dirs_loc                := "`ls -gx '.'`" +#dirs                    := "`ls -gx {{gwd}}`" + +buildPhase: +	HOME=$${PWD}; \ +	for DC_ in dmd ldmd2 gdmd; do \ +	  echo "- check for D compiler $${DC_}"; \ +	  DC=$$(type -P $${DC_} || echo ""); \ +	  if [ ! "$${DC}" == "" ]; then \ +	    break; \ +	  fi; \ +	done; \ +  echo "D compiler = $${DC}"; \ +	if [ "$${DC}" == "" ]; then \ +    echo "Error: could not find D compiler"; \ +	  exit 1; \ +	fi; \ +	echo "$${DC_} used as D compiler to build $${pname}"; \ +	export DFLAGS="-O2 -inline"; \ +	dub build --compiler=$${DC} --build=release --combined --skip-registry=all; + +checkPhase: +	runHook preCheck; \ +	HOME=$${PWD}; \ +	dub test --combined --skip-registry=all; \ +	runHook postCheck + +installPhase: +	runHook preInstall; \ +	mkdir -p $${out}/bin; \ +	install -m755 ./bin/spine $${out}/bin/spine; \ +	runHook postInstall +#cp -r bin/spine $out/bin/. + +postInstall: +	echo "$${out}/share/cgi-bin"; \ +	echo `ls -la $${out}/bin/spine` + +commands: +	rg --color=always -B1 "^[a-z]\w+:" makefile | less + +cmd: +	rg --color=always -B1 "^[a-z]\w+:" makefile | bat + +# tangle org files +org-tangle: +	cd ./org; \ +	org-tangle *.org; \ +	cd - + +# project vim +proj-v: +	nvim ./org/doc-reform.org + +# project emacs, cli (single instance open) +proj-e: +	emacsclient -F -c -a -f ./org/doc-reform.org + +# project emacs, cli (multiple instance, no copy & paste) +proj: +	emacsclient -nw -a -f ./org/doc-reform.org + +# project emacs, gui +proj-emacs: +	emacs ./org/doc-reform.org & + +# epub output +out-epub: +	{{SpineBIN}}/spine -v \ +	--epub --output={{SpineOUT}} {{SpinePOD}}/* + +# html output with local search links +out-html: +	{{SpineBIN}}/spine -v --generated-by \ +	--curate \ +	--html --html-link-search --html-link-curate --cgi-url-action="{{SpineSearchActionLocal}}" \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# latex output +out-latex: +	{{SpineBIN}}/spine -v \ +	--latex \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# odf output +out-odf: +	{{SpineBIN}}/spine -v \ +	--odf \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# sqlite output +out-sqlite: +	{{SpineBIN}}/spine -v \ +	--sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# generate markup sample output with local search links +output-samples-local: +	{{SpineBIN}}/spine -v \ +	--latex --latex-init \ +	--epub \ +	--html --html-link-search --html-link-pdf --html-link-curate --html-link-markup \ +	--cgi-sqlite-search-filename="{{SpineCGIform}}" --cgi-url-action="{{SpineSearchActionLocal}}" \ +	--curate \ +	--sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# generate markup sample output with remote search links +output-samples-remote: +	{{SpineBIN}}/spine -v \ +	--generated-by \ +	--latex --latex-init \ +	--epub \ +	--html --html-link-search --html-link-pdf --html-link-curate \ +	--cgi-sqlite-search-filename="{{SpineCGIform}}" --cgi-url-action="{{SpineSearchActionRemote}}" \ +	--curate \ +	--sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# generate markup sample output with local search links +output-samples: output-samples-local + +# nix build (remote) run +generate-output-remote: nix-build output-samples-remote + +# nix build (local) run +generate-output-local: nix-build output-samples-local + +# preview org files vim +files-vim: +	fd --max-depth 6 --type file -g "*" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(nvim {})"; \ + +# preview org files emacs +files-emacs: +	fd --max-depth 6 --type file -g "*" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(emacsclient -nw -a -f {})"; \ + +# preview org files vim +org-vim: +	cd ./org; \ +	fd --max-depth 5 --type file -g "*.org" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(nvim {})"; \ +	cd - + +# preview org files emacs +org-emacs: +	cd ./org; \ +	fd --max-depth 5 --type file -g "*.org" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(emacsclient -nw -a -f {})"; \ +	cd - + +## search org files (view in vim) +#org-v find: +#	cd ./org; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(nvim -c \"silent! /{{find}}\" {1})"; \ +#	cd - +# +## search org files (view in emacsclient) +#org-e find: +#	cd ./org; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(emacsclient -nw -a -f {})"; \ +#	cd - +# +## search tips.org files (view in emacs) +#org-E find: +#	cd ./org; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(emacs {} &)"; \ +#	cd - +# +## search for in directory specified (view in vim, uses rg & fzf) ["find" for emacs] +#sDir-v find dir: +#	cd {{dir}}; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(nvim -c \"silent! /{{find}}\" {1})"; \ +#	cd - +# +## search for in directory specified (view in emacs, uses rg & fzf) ["search" for emacs] +#sDir-e find dir: +#	cd {{dir}}; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(emacsclient -nw -a -f {})"; \ +#	cd - +# +## search for in directory specified (view in emacs, uses rg & fzf) ["search" for emacs] +#sDir-E find dir: +#	cd {{dir}}; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(emacs {} &)"; \ +#	cd - + +# show markup pod source selections +markup: +	ls -1 --color=always {{SpinePOD}} +	ls -1 -d --color=always {{SpinePOD}}/*/ + +# show markup pod source tree +markup-pod-tree: +	exa -alT --git -I'.git|.dub|*_' --color=always -L5 ${SpinePOD} | less -R + +# show markup pod source tree +tree-src: +	exa -alT --git -I'*_' --color=always -L5 ${SpineSRC}/doc_reform ${SpinePROJ}/views | less -R + +## show markup pod source tree +#tree-src-omit: +#  exa -alT --git -I'.git|.dub|*_' --color=always -L5 ${SpineSRC} ${SpinePROJ}/views | less -R + +# show markup pod source tree +tree-src-search-cgi: +	  exa -alT --git -I'*_' --color=always -L5 ${SpineSearchCGI}/src ${SpineSearchCGI}/views | less -R + +# show markup files +markup-files: +	cd {{SpinePOD}}; \ +	find . -type f -iname "*sst"; \ +	cd -; \ +	echo {{SpinePOD}} +# find {{SpinePOD}}/. -type f -iname "*sst" + +# preview markup files vim +markup-files-vim: +	cd {{SpinePOD}}; \ +	fd --max-depth 5 --type file -g "*.ss?" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(nvim {})"; \ +	cd - + +# preview markup files emacs +markup-files-emacs: +	cd {{SpinePOD}}; \ +	fd --max-depth 5 --type file -g "*.ss?" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(emacsclient -nw -a -f {})"; \ +	cd - + +# markup samples list +markup-sample: markup-pod-sample + +# markup samples list +markup-pod-sample: +	find data/pod -name pod.manifest | cut -f 1-3 -d / | sort + +# markup samples pod manifests and sst files +markup-samples: markup-pod-samples markup-file-samples + +# markup samples pod manifests +markup-pod-samples: +	echo "{{SpinePOD}}"; \ +	find {{SpinePOD}} -name pod.manifest | sort + +#find {{SpinePOD}} -name pod.manifest | sed -E 's:.+?(([/][^/]+){2})$:\1:' + +# markup samples sst files +markup-file-samples: +	echo "{{SpinePOD}}"; \ +	find {{SpinePOD}} -name *.ss[tm] | sort + +# markup_dir_samples: +#   find data/sisudir/media/text -name *.ss[tm] | sort + +# version_tag: +#   echo "DRV=0.11.3; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \ +#   echo "git tag -f doc-reform_v0.11.3 -m\"doc-reform spine-0.11.3\" HEAD" + +# archive spine output (www) +spineWWWarchive: +	cd /srv/www ; \ +	rm spine_output.{{Date}}.tar.bz2 ; \ +	sudo tar --exclude='./spine/latex' --exclude='./spine/pod' --exclude='./spine/*_' -cjf spine_output.{{Date}}.tar.bz2 ./spine ; \ +	cd - + +# rsync archived spine output to Linode +spineWWWrsyncLinode: +	rsync -v /srv/www/spine_output.{{Date}}.tar.bz2 linode:./stage/. ; \ +	rsync -v /var/www/sqlite/spine.search.db linode:./stage/. ; \ +	echo "tar -xf ../spine_output.{{Date}}.tar.bz2" + +# get project external dependencies +depends_get: +	dub upgrade; \ +	cd {{gwd}} && \ +	echo "{{dirs_loc}}" && \ +	for dir in {{dirs_loc}}; do \ +	  if [[ -d ${dir} ]]; then \ +	    echo {{gwd}}/${dir} && \ +	    if [[ "imageformats" == ${dir} ]]; then \ +	      echo {{gwd}}/${dir} && \ +	      rm -rvf {{gwd}}/${dir} && \ +	      git clone --depth=1 https://github.com/tjhann/${dir} && \ +	      cd ${dir} && \ +	      echo $$PWD && \ +	      echo "${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../${dir}.meta && \ +	      echo "https://github.com/tjhann/${dir}"           >> ../${dir}.meta && \ +	      echo "Boost Software License 1.0 (BSL-1.0)"       >> ../${dir}.meta && \ +	      cd {{gwd}} && \ +	      rm -rf {{gwd}}/${dir}/.git; \ +	    elif [[ "d2sqlite3" == ${dir}  || "D-YAML" == ${dir} || "tinyendian" == ${dir} ]]; then \ +	      echo {{gwd}}/${dir} && \ +	      rm -rvf {{gwd}}/${dir} && \ +	      git clone --depth=1 https://github.com/dlang-community/${dir} && \ +	      cd {{gwd}}/${dir} && \ +	      echo "${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../${dir}.meta && \ +	      echo "https://github.com/dlang-community/${dir}"  >> ../${dir}.meta && \ +	      echo "Boost Software License 1.0 (BSL-1.0)"       >> ../${dir}.meta && \ +	      cd {{gwd}} && \ +	      rm -rf {{gwd}}/${dir}/.git; \ +	    fi; \ +	  fi; \ +	done; \ +	cd {{hwd}} + +# get and set project external dependencies +depends_set: depends_get +	dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g'  > dub_describe.json + +# markup_samples: +# 	find data/pod -name pod.manifest | cut -f 1-3 -d / | sort; \ +# 	find data/sisudir/media/text -name *.ss[tm] | sort +# +# markup_pod_samples: +# 	find data/pod -name pod.manifest | cut -f 1-3 -d / | sort +# +# markup_dir_samples: +# 	find data/sisudir/media/text -name *.ss[tm] | sort +# +version_tag: +	echo "DRV=0.11.3; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \ +	echo "git tag -f doc-reform_v0.11.3 -m\"doc-reform spine-0.11.3\" HEAD" + +changelog_: +	git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" > CHANGELOG_ + +# git changelog for project +changelog: +	git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" | sed "s/ \+$//" > CHANGELOG_ + +gitZip: +	git archive -v --format=tar --prefix=`echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)`/ HEAD | gzip > ../spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \ +	echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz" + +# git archive project, produce current state .tar.gz +gitArchive: +	git archive -v --format=tar --prefix=spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)/ HEAD | gzip > ../spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \ +	echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz" + +# git archive project, produce current state .tar.gz +# gitArchive: +# 	git archive -v --format=tar --prefix="spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}/" HEAD | gzip > ../spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz && \ +# 	echo "to unzip: tar -xzf spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz" + +get_depends: +	hwd=$$(echo `pwd`) && \ +	gwd="$${hwd}/src/ext_depends" && \ +	dirs=$$(echo `ls -gx $${gwd}`) && \ +	license_bsl="Boost Software License 1.0 (BSL-1.0)" && \ +	echo $${hwd} && \ +	echo $${gwd} && \ +	echo $${deps} && \ +	dub upgrade; \ +	cd $${gwd} && \ +	for dir in $${deps}; do \ +	  if [ -d $${dir} ]; then \ +	    echo $${dir} && \ +	    if [ "imageformats" == $${dir} ]; then \ +	      echo $${dir} && \ +	      rm -rf $${dir} && \ +	      git clone --depth=1 https://github.com/tjhann/$${dir} && \ +	      cd $${dir} && \ +	      echo $$PWD && \ +	      echo "$${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../$${dir}.meta && \ +	      echo "https://github.com/tjhann/$${dir}"          >> ../$${dir}.meta && \ +	      echo "$${license_bsl}"                            >> ../$${dir}.meta && \ +	      cd $${gwd} && \ +	      rm -rf $${dir}/.git; \ +	    elif [[ "d2sqlite3" == $${dir}  || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \ +	      echo $${dir} && \ +	      rm -rf $${dir} && \ +	      git clone --depth=1 https://github.com/dlang-community/$${dir} && \ +	      cd $${dir} && \ +	      echo "$${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../$${dir}.meta && \ +	      echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \ +	      echo "$${license_bsl}"                            >> ../$${dir}.meta && \ +	      cd $${gwd} && \ +	      rm -rf $${dir}/.git; \ +	    fi; \ +	  fi; \ +	done; \ +	cd $${hwd} + +set_depends: get_depends +	dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g'  > dub_describe.json + +rm_flakelock: +	git reset HEAD flake.lock && \ +	touch flake.lock \ +	git rm -f flake.lock + +flake_update: +	git add .; \ +	nix flake update && \ +	git reset HEAD flake.lock; \ +	cp flake.lock flake.lock_ + +flake_update_move_lock: flake_update +	touch flake.lock \ +	git rm -f flake.lock + +set_latest: set_depends flake_update rm_flakelock + +dub_upgrade: +	$(DUB) upgrade + +default: ldc + +all: dmd ldc gdc + +all_ver: dmd_ver ldc_ver gdc_ver + +all_debug: dmd_debug gdc_debug ldc_debug + +meson_clean_build_dir: +	rm -r build; mkdir build + +meson_build: meson_clean_build_dir +	meson --buildtype=debugoptimized build +	ninja -C build +	notify-send -t 0 'D meson build ldc compiled test release executable ready' 'spine' + +meson_redo: meson_clean_build_dir meson_build + +meson_project_build_clean: clean skel tangle dub_upgrade meson_build + +meson: meson_clean_build_dir dub_upgrade meson_build + +all_clean: clean tangle dmd ldc gdc + +all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver + +all_debug_ver: dmd_debug_ver gdc_debug_ver ldc_debug_ver + +all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver + +dmd: dub_upgrade +	$(DUB) --compiler=dmd --config=dmd --build=release-nobounds +	notify-send -t 0 'D dmd compiled test release executable ready' 'spine-dmd' + +dmd_debug: +	$(DUB) --compiler=dmd --config=dmd --build=debug + +# assumes git tags with program version +dmd_ver: dub_upgrade +	$(DUB) --compiler=dmd --config=dmd-version +	mv bin/spine-dmd-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd +	notify-send -t 0 'D dmd compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd' + +dmd_clean_ver: clean tangle dmd_ver + +dmd_rel: expunge skel tangle +	$(DUB) --compiler=dmd --config=spine-release + +dmd_rel_tangle: tangle +	$(DUB) --compiler=dmd --config=spine-dmd + +dmd_rel_expunge_tangle: expunge skel tangle dmd_rel_tangle + +dmd_debug_tangle: tangle +	$(DUB) --compiler=dmd --config=spine-dmd-debug + +gdc: dub_upgrade +	$(DUB) --compiler=gdc --config=gdc +	notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc' + +gdc_debug: +	$(DUB) --compiler=gdc --config=gdc --build=debug + +# assumes git tags with program version +gdc_ver: dub_upgrade +	$(DUB) --compiler=gdc --config=gdc-version +	mv bin/spine-gdc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc +	notify-send -t 0 'D gdc compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc' + +gdc_clean_ver: clean tangle gdc_ver + +gdc_rel: expunge skel tangle +	$(DUB) --compiler=gdc --config=spine-release + +gdc_rel_tangle: tangle +	$(DUB) --compiler=gdc --config=spine-gdc + +gdc_rel_expunge_tangle: expunge skel tangle gdc_rel_tangle + +gdc_debug_tangle: tangle +	$(DUB) --compiler=gdc --config=spine-gdc-debug + +ldc: dub_upgrade +	$(DUB) --compiler=ldc2 --config=ldc --build=release +	notify-send -t 0 'D ldc compiled test release executable ready' 'spine-ldc' + +ldc_debug: +	$(DUB) --compiler=ldc2 --config=ldc --build=debug + +# assumes git tags with program version +ldc_ver: dub_upgrade +	$(DUB) --compiler=ldc2 --config=ldc-version +	mv bin/spine-ldc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc +	notify-send -t 0 'D ldc2 compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc' + +ldc_clean_ver: clean tangle ldc_ver + +ldc_rel: expunge skel tangle +	$(DUB) --compiler=ldc2 --config=spine-release + +ldc_rel_tangle: tangle +	$(DUB) --compiler=ldc2 --config=spine-ldc + +ldc_rel_expunge_tangle: expunge skel tangle ldc_rel_tangle + +ldc_debug_tangle: tangle +	$(DUB) --compiler=ldc2 --config=spine-ldc-debug + +reinit: clean skel tangle + +skel: +	mkdir -p $(PRG_BINDIR); \ +	mkdir -p $(PRG_BINDIR)-archive; \ +	mkdir -p build; \ +	mkdir -p views; \ +	mkdir -p data; \ +	mkdir -p sundry/misc/util/d/cgi/search/cgi-bin/src; \ +	mkdir -p sundry/misc/util/d/tools/markup_conversion; \ +	mkdir -p sundry/misc/editor-syntax-etc/emacs; \ +	mkdir -p sundry/misc/editor-syntax-etc/vim/syntax; \ +	mkdir -p sundry/misc/editor-syntax-etc/vim/colors; \ +	mkdir -p sundry/misc/editor-syntax-etc/vim/ftplugin; \ +	mkdir -p sundry/misc/editor-syntax-etc/vim/rc; \ +	mkdir -p sundry/misc/editor-syntax-etc/vim/templates; \ +	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/conf; \ +	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/io_in; \ +	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/io_out; \ +	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/meta; \ +	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/share; \ +	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR); \ +	mkdir -p $(PRG_BINDIR); + +init: skel + +clean: +	rm -rf build; \ +	rm -rf $(PRG_SRCDIR); \ +	rm -rf $(PRG_DOCDIR); + +clean_bin: +	rm $(PRG_BINDIR)/* + +clean_src: +	rm -rf $(PRG_SRCDIR); + +clean_docs: +	rm -rf $(PRG_DOCDIR) + +expunge: +	rm -f dub.selections.json; \ +	rm -rf build; \ +	rm -rf $(PRG_SRCDIR); \ +	rm -rf $(PRG_BINDIR); \ +	rm -rf $(PRG_DOCDIR); + +distclean: expunge + +distclean_and_init: expunge +	mkdir -p views; \ +	mkdir -p sundry/misc/util/d/cgi/search/cgi-bin/src; \ +	mkdir -p sundry/misc/util/d/tools/markup_conversion; \ +	mkdir -p sundry/misc/editor-syntax-etc/emacs; \ +	mkdir -p sundry/misc/editor-syntax-etc/vim/syntax; \ +	mkdir -p sundry/misc/editor-syntax-etc/vim/colors; \ +	mkdir -p sundry/misc/editor-syntax-etc/vim/ftplugin; \ +	mkdir -p sundry/misc/editor-syntax-etc/vim/rc; \ +	mkdir -p sundry/misc/editor-syntax-etc/vim/templates; \ +	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR); \ +	mkdir -p $(PRG_BINDIR); + +ver: +	echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT) + +clean_tangle_build: clean tangle build + +tangle_build: tangle build + +build: $(PRG_SRCDIR)/$(PRG_SRC) +	$(DC) $(DC_FLAGS) \ +	$(DC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \ +	$(PRG_SRCDIR)/$(PRG_SRC) + +rebuild: $(PRG_SRCDIR)/$(PRG_SRC) $(PRG_BINDIR)/$(PRG_BIN).o clean build + +makefile_new: +	make -k tangle_maker + +restart: clean tangle + +find_pods: +	$(SiSU_MARKUP_SAMPLES_FIND_PODS) + +dmd_testrun_find: +	./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ +--sqlite-create --sqlite-update \ +--output-dir=tmp/program_output_pod \ +data/pod/sisu-manual + +dmd_testrun_find_pod_source: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-ldc -v --source --html --epub \ +	--output-dir=tmp/program_output_pod + +dmd_testrun_find_pod_pod: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-dmd -v --pod \ +	--output-dir=tmp/program_output_pod + +dmd_testrun_find_pod_html: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-dmd -v --html \ +	--output-dir=tmp/program_output_pod + +dmd_testrun_find_pod_epub: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-dmd -v --epub \ +	--output-dir=tmp/program_output_pod + +dmd_testrun_find_pod_all: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod + +dmd_testrun_paths_pod_source: +	./bin/spine-dmd -v --source \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +dmd_testrun_paths_pod_pod: +	./bin/spine-dmd -v --pod \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +dmd_testrun_paths_pod_html: +	./bin/spine-dmd -v --html \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +dmd_testrun_paths_pod_epub: +	./bin/spine-dmd -v --epub \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +dmd_testrun_paths_pod_all: +	./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +gdc_testrun_find: +	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	data/pod/sisu-manual + +gdc_testrun_find_pod_source: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-gdc -v --source \ +	--output-dir=tmp/program_output_pod + +gdc_testrun_find_pod_pod: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-gdc -v --pod \ +	--output-dir=tmp/program_output_pod + +gdc_testrun_find_pod_html: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-gdc -v --html \ +	--output-dir=tmp/program_output_pod + +gdc_testrun_find_pod_epub: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-gdc -v --epub \ +	--output-dir=tmp/program_output_pod + +gdc_testrun_find_pod_all: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod + +gdc_testrun_paths: +	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	data/pod/sisu-manual + +gdc_testrun_paths_pod_source: +	./bin/spine-gdc -v --source \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +gdc_testrun_paths_pod_pod: +	./bin/spine-gdc -v --pod \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +gdc_testrun_paths_pod_html: +	./bin/spine-gdc -v --html \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +gdc_testrun_paths_pod_epub: +	./bin/spine-gdc -v --epub \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +gdc_testrun_paths_pod_all: +	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +ldc_testrun_find: +	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	data/pod/sisu-manual + +ldc_testrun_find_pod_source: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-ldc -v --source \ +	--output-dir=tmp/program_output_pod + +ldc_testrun_find_pod_pod: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-ldc -v --pod \ +	--output-dir=tmp/program_output_pod + +ldc_testrun_find_pod_html: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-ldc -v --html \ +	--output-dir=tmp/program_output_pod + +ldc_testrun_find_pod_epub: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-ldc -v --epub \ +	--output-dir=tmp/program_output_pod + +ldc_testrun_find_pod_all: +	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ +	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod + +ldc_testrun_paths: +	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	data/pod/sisu-manual + +ldc_testrun_paths_pod_source: +	./bin/spine-ldc -v --source \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +ldc_testrun_paths_pod_pod: +	./bin/spine-ldc -v --pod \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +ldc_testrun_paths_pod_html: +	./bin/spine-ldc -v --html \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +ldc_testrun_paths_pod_epub: +	./bin/spine-ldc -v --epub \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +ldc_testrun_paths_pod_all: +	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) + +dmd_testrun_find_dir_source: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-dmd -v --source \ +	--output-dir=tmp/program_output_dir + +dmd_testrun_find_dir_pod: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-dmd -v --pod \ +	--output-dir=tmp/program_output_dir + +dmd_testrun_find_dir_html: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-dmd -v --html \ +	--output-dir=tmp/program_output_dir + +dmd_testrun_find_dir_epub: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-dmd -v --epub \ +	--output-dir=tmp/program_output_dir + +dmd_testrun_find_dir_all: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir + +dmd_testrun_filelist_dir_source: +	./bin/spine-dmd -v --source \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +dmd_testrun_filelist_dir_pod: +	./bin/spine-dmd -v --pod \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +dmd_testrun_filelist_dir_html: +	./bin/spine-dmd -v --html \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +dmd_testrun_filelist_dir_epub: +	./bin/spine-dmd -v --epub \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +dmd_testrun_filelist_dir_all: +	./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +gdc_testrun_find_dir_source: +	./bin/spine-gdc -v --source \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +gdc_testrun_find_dir_pod: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-gdc -v --pod \ +	--output-dir=tmp/program_output_dir + +gdc_testrun_find_dir_html: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-gdc -v --html \ +	--output-dir=tmp/program_output_dir + +gdc_testrun_find_dir_epub: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-gdc -v --epub \ +	--output-dir=tmp/program_output_dir + +gdc_testrun_find_dir_all: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir + +gdc_testrun_filelist_dir_source: +	./bin/spine-gdc -v --source \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +gdc_testrun_filelist_dir_pod: +	./bin/spine-gdc -v --pod \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +gdc_testrun_filelist_dir_html: +	./bin/spine-gdc -v --html \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +gdc_testrun_filelist_dir_epub: +	./bin/spine-gdc -v --epub \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +gdc_testrun_filelist_dir_all: +	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +ldc_testrun_find_dir_source: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-ldc -v --source \ +	--output-dir=tmp/program_output_dir + +ldc_testrun_find_dir_pod: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-ldc -v --pod \ +	--output-dir=tmp/program_output_dir + +ldc_testrun_find_dir_html: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-ldc -v --html \ +	--output-dir=tmp/program_output_dir + +ldc_testrun_find_dir_epub: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-ldc -v --epub \ +	--output-dir=tmp/program_output_dir + +ldc_testrun_find_dir_all: +	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ +	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir + +ldc_testrun_filelist_dir_source: +	./bin/spine-ldc -v --source \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +ldc_testrun_filelist_dir_pod: +	./bin/spine-ldc -v --pod \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +ldc_testrun_filelist_dir_html: +	./bin/spine-ldc -v --html \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +ldc_testrun_filelist_dir_epub: +	./bin/spine-ldc -v --epub \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +ldc_testrun_filelist_dir_all: +	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) + +tangle: skel +	for f in $(ORGFILELIST); do \ +		ORGFILES="$$ORGFILES \"$$f\""; \ +	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 \"$(ORGDIR)\")) \ +				(setq-local org-src-preserve-indentation t) \ +			(org-babel-tangle) \ +			(kill-buffer)) '($$ORGFILES)))" 2>&1 + +tangle_maker: +	for f in $(ORGFILELIST); do \ +		ORGFILES="\"org/dr_build_scaffold.org\""; \ +	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 \".\")) \ +				(setq-local org-src-preserve-indentation t) \ +			(org-babel-tangle) \ +			(kill-buffer)) '($$ORGFILES)))" 2>&1 + +lorri_shell: +	lorri shell + +# nix-shell +nix-shell: +	nix-shell -I .envrc + +nix-shell-pure: +	nix-shell -I .envrc --pure + +# nix-shell (with local tools, presumably latest dlang compiler & build tools (ldc & dub)) +nix-shell-updated: +	nix-shell -I nixpkgs=/nixpkgs-ra/nixpkgs --pure + +# shell.nix (with shebang) +shell: +	shell.nix + +# nix-build spine +nix-build: +	nix-build default.nix && ./result/bin/spine -v + +# nix-build spine (with local tools, presumably latest dlang compiler & build tools (ldc & dub)) +nix-build-use-tools-new: +	nix-build -I .envrc + +# tangle-build +tangle-build: org-tangle nix-build + +# build-run +build-run: nix-build output-samples + +# tangle-build-run +tangle-build-run: org-tangle nix-build output-samples + +# nix-build spine search +nix-build-search: +	cd ./sundry/spine_search_cgi; \ +	nix-build \ +	cd - + +_flake-lock-reset: +	git reset HEAD flake.lock + +_flake-show-name: +	nix search --json 2>/dev/null |jq; + +_flake-show-package: +	nix flake show; + +_flake-show-derivation: +	nix show-derivation |jq; + +nix-develop: +	nix develop -f default.nix -I nixpkgs=/nixpkgs-ra/nixpkgs + +# nix flake show +flake-show: _flake-show-package _flake-show-name _flake-show-derivation + +# nix-build flake spine +flake-build: _flake-show-name +	nix build --print-build-logs + +# nix-build flake spine +flake-reset-build: _flake-lock-reset _flake-show-name +	nix build --print-build-logs + +# nix-build flake spine debug +flake-build-debug: +	nix build --debug + +# nix-build spine (with local tools, presumably latest dlang compiler & build tools (ldc & dub)) +flake-build-use-tools-new: +	nix build --print-build-logs -I nixpkgs=/nixpkgs-ra/nixpkgs + +# tangle-build-flake +flake-tangle-build: org-tangle flake-build + +# build-flake-run +flake-build-run: flake-build output-samples + +# tangle-build-run +flake-tangle-build-run: org-tangle flake-build output-samples + +# nix-build spine search +flake-build-search: +	cd ./sundry/spine_search_cgi; \ +	nix build --print-build-logs \ +	cd - + +gitsnapshot: distclean tangle +	git commit -a + +.PHONY : all build rebuild debug release \ +	distclean init \ +	tangle gitsnapshot diff --git a/org/config_d_cfte.org b/org/config_d_cfte.org index 0a8aaae..0a4bdb5 100644 --- a/org/config_d_cfte.org +++ b/org/config_d_cfte.org @@ -16,7 +16,7 @@  #+PROPERTY:    header-args+ :padline no  #+PROPERTY:    header-args+ :mkdirp yes -- [[./doc-reform.org][doc-reform.org]]  [[./][org/]] +- [[./doc-reform.org][doc-reform.org]]  [[../org/][org/]]  * cfte views version.txt configuration.txt (set version & configuration) SET @@ -69,6 +69,7 @@ version (Posix) {  SEE NOTES on configuration hierarchy in spine.org  *** spine: configuration.txt SET +**** example  #+HEADER: :tangle "../views/configuration_example.txt"  #+BEGIN_SRC d @@ -97,6 +98,71 @@ struct Cfg {  enum _cfg = Cfg();  #+END_SRC +**** configure + +#+HEADER: :tangle ../views/configuration.txt_ +#+BEGIN_SRC d +<<config_localhost>> +#+END_SRC + +**** configure remote host (sisudoc.org) + +#+NAME: config_remotehost +#+HEADER: :tangle ../views/configuration.txt_remotehost_ +#+BEGIN_SRC d +struct Cfg { +  string http_request_type        = "https"; +  string http_host                = "sisudoc.org"; +  string www_url_doc_root         = "https://sisudoc.org"; +  string www_url_doc_subroot      = "/spine"; +  string processing_path_doc_root = "/srv/www/spine"; +  string cgi_bin_root             = "/var/www/cgi/cgi-bin"; +  string cgi_bin_subpath          = ""; +  string cgi_filename             = "spine_search"; +  string cgi_url_root             = "https://sisudoc.org"; +  string cgi_port                 = ""; +  string cgi_user                 = ""; +  string cgi_url_action           = "https://sisudoc.org/spine_search"; +  string cgi_search_form_title    = "≅ SiSU Spine search"; +  string db_sqlite_path           = "/var/www/sqlite"; +  string db_sqlite_filename       = "spine.search.db"; +  string default_language         = "en"; +  string default_papersize        = "a4"; +  string default_text_wrap        = "80"; +  string default_hash_digest      = "sha256"; +} +enum _cfg = Cfg(); +#+END_SRC + +**** configure localhost + +#+NAME: config_localhost +#+HEADER: :tangle ../views/configuration.txt_localhost_ +#+BEGIN_SRC d +struct Cfg { +  string http_request_type        = "http"; +  string http_host                = "localhost"; +  string www_url_doc_root         = "http://localhost"; +  string www_url_doc_subroot      = "/spine"; +  string processing_path_doc_root = "/srv/www/spine"; +  string cgi_bin_root             = "/var/www/cgi/cgi-bin"; +  string cgi_bin_subpath          = "/cgi-bin"; +  string cgi_filename             = "spine_search"; +  string cgi_url_root             = "http://localhost/cgi-bin"; +  string cgi_port                 = ""; +  string cgi_user                 = ""; +  string cgi_url_action           = "http://localhost/cgi-bin/spine_search"; +  string cgi_search_form_title    = "≅ SiSU Spine search"; +  string db_sqlite_path           = "/var/www/sqlite"; +  string db_sqlite_filename       = "spine.search.db"; +  string default_language         = "en"; +  string default_papersize        = "a4,letter.portrait"; +  string default_text_wrap        = "80"; +  string default_hash_digest      = "sha256"; +} +enum _cfg = Cfg(); +#+END_SRC +  *** spine_search: configuration.txt SET  #+HEADER: :tangle "../sundry/spine_search_cgi/views/configuration_example.txt" @@ -114,6 +180,19 @@ struct Cfg {  enum _cfg = Cfg();  #+END_SRC +#+BEGIN_SRC d +struct Cfg { +  string http_request_type     = "https"; +  string http_host             = "sisudoc.org"; +  string www_url_doc_subroot   = "/spine"; +  string cgi_filename          = "spine_search"; +  string cgi_search_form_title = "≅ SiSU Spine search"; +  string db_sqlite_path        = "/var/www/sqlite"; +  string db_sqlite_filename    = "spine.search.db"; +} +enum _cfg = Cfg(); +#+END_SRC +  *** shared settings SET defaults  #+NAME: http_request_type diff --git a/org/config_make.org b/org/config_make.org index 813a2a6..9932330 100644 --- a/org/config_make.org +++ b/org/config_make.org @@ -13,12 +13,12 @@  #+PROPERTY:    header-args+ :eval no  #+PROPERTY:    header-args+ :results no  #+PROPERTY:    header-args+ :cache no -#+PROPERTY:    header-args+ :padline no +#+PROPERTY:    header-args+ :padline yes  #+PROPERTY:    header-args+ :mkdirp yes  - [[./doc-reform.org][doc-reform.org]]  [[../org/][org/]] -* spine +* project  ** version info SET VERSION :version:set:project:  *** project SET VERSION @@ -43,48 +43,48 @@  0  #+END_SRC -** makefile :makefile: +* spine +** spine makefile :makefile:  *** tangle -#+HEADER: :tangle ../makefile_ +#+HEADER: :tangle ../makefile  #+BEGIN_SRC makefile -<<make_set_var_0_git_version>> -<<make_set_var_1_dub>> -<<make_set_var_2_project_details>> -<<make_set_var_3_emacs_org>> -<<make_set_var_4_markup_samples_pods>> -<<make_set_var_5_markup_samples_search_dirs>> -<<make_find_markup_samples_0_pod_and_dir>> -<<make_find_markup_samples_1_pod>> -<<make_find_markup_samples_2_dir>> +<<make_set_var_git_version>> +<<make_set_var_dub>> +<<make_set_var_project_details>> +<<make_set_var_emacs_org>> +<<make_set_var_markup_samples_pods>> +# <<make_set_var_markup_samples_search_dirs>> +<<make_initialize>> +<<make_set_nix>> +<<make_cmd_list>> +<<make_cmd_org>> +<<make_cmd_project>> +<<make_cmd_output_doc>> +<<make_cmd_search_project>> +<<make_cmd_search_markup_samples>> +<<make_cmd_dev_misc>> +# <<make_find_markup_samples_0_pod_and_dir>> +# <<make_find_markup_samples_1_pod>> +# <<make_find_markup_samples_2_dir>>  <<make_version_tag>>  <<make_changelog>>  <<make_project_zip_archive>>  <<make_get_project_dependencies_github>>  <<make_dub_upgrade>> -<<make_compile_0_compiler_default>> -<<make_compile_1_compiler_all>> -<<make_compile_2_compiler_all_versioned>> -<<make_compile_3_compiler_all_debug>> +<<make_compile_compiler_default>> +<<make_compile_compiler_all>>  <<make_meson_build>> -<<make_clean_tangle_compile_0_all_clean>> -<<make_clean_tangle_compile_1_all_clean_versioned>> -<<make_clean_tangle_compile_2_all_clean_debug>> -<<make_dub_compile_dmd_0_default>> -<<make_dub_compile_dmd_1_debug>> -<<make_dub_compile_dmd_2_versioned>> -<<make_dub_compile_dmd_3_release>> -<<make_dub_compile_gdc_0_default>> -<<make_dub_compile_gdc_1_debug>> -<<make_dub_compile_gdc_2_versioned>> -<<make_dub_compile_gdc_3_release>> -<<make_dub_compile_ldc_0_default>> -<<make_dub_compile_ldc_1_debug>> -<<make_dub_compile_ldc_2_versioned>> -<<make_dub_compile_ldc_3_release>> -<<make_initialization_operations_0_parts>> -<<make_initialization_operations_1_git_version>> -<<make_initialization_operations_2_assemble>> +<<make_clean_tangle_compile_all_clean>> +<<make_dub_compile_dmd_default>> +<<make_dub_compile_dmd_release>> +<<make_dub_compile_gdc_default>> +<<make_dub_compile_gdc_release>> +<<make_dub_compile_ldc_default>> +<<make_dub_compile_ldc_release>> +<<make_initialization_operations_parts>> +<<make_initialization_operations_git_version>> +<<make_initialization_operations_assemble>>  <<make_project_testrun_0_find_pods>>  <<make_project_testrun_1>>  <<make_project_testrun_2>> @@ -108,7 +108,7 @@  *** settings [+2] :settings:  **** git version stamp :git:version: -#+NAME: make_set_var_0_git_version +#+NAME: make_set_var_git_version  #+BEGIN_SRC makefile  PROG_VER_GIT :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`)  PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`) @@ -116,7 +116,7 @@ PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "  **** dub (build tool) :dub: -#+NAME: make_set_var_1_dub +#+NAME: make_set_var_dub  #+BEGIN_SRC makefile  DUB=dub  DUB_FLAGS=-v --force --compiler= @@ -124,7 +124,7 @@ DUB_FLAGS=-v --force --compiler=  **** Project Details :project:spine: -#+NAME: make_set_var_2_project_details +#+NAME: make_set_var_project_details  #+BEGIN_SRC makefile  PRG_NAME=doc-reform  PRG_NICKAME=spine @@ -138,7 +138,7 @@ PRG_DOCDIR=./docs  **** Emacs Org settings :settings:emacs:org:tangle: -#+NAME: make_set_var_3_emacs_org +#+NAME: make_set_var_emacs_org  #+BEGIN_SRC makefile  EMACSLISP=/usr/share/emacs/site-lisp  ORG_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-???????? | cut -d '-' -f2`) @@ -153,7 +153,7 @@ ORGDIR :=$(shell echo `pwd`)  **** Markup Samples  ***** pods -#+NAME: make_set_var_4_markup_samples_pods +#+NAME: make_set_var_markup_samples_pods  #+BEGIN_SRC makefile  SiSU_MARKUP_SAMPLES_FIND_PODS= \  find data/pod -maxdepth 2 -name pod.manifest | cut -f 1-3 -d / | sort @@ -189,7 +189,7 @@ data/pod/viral_spiral.david_bollier  ***** dir -#+NAME: make_set_var_5_markup_samples_search_dirs +#+NAME: make_set_var_markup_samples_search_dirs  #+BEGIN_SRC makefile  SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND = \  find data/sisudir/media/text -name *.ss[tm] | sort | xargs @@ -221,6 +221,7 @@ data/sisudir/media/text/through_the_looking_glass.lewis_carroll.sst \  data/sisudir/media/text/two_bits.christopher_kelty.sst \  data/sisudir/media/text/un_contracts_international_sale_of_goods_convention_1980.sst \  data/sisudir/media/text/viral_spiral.david_bollier.sst +  #+END_SRC  ****** sample markup file list @@ -229,19 +230,443 @@ data/sisudir/media/text/viral_spiral.david_bollier.sst  #+BEGIN_SRC makefile  markup_samples:  	find data/pod -name pod.manifest | cut -f 1-3 -d / | sort; \ -find data/sisudir/media/text -name *.ss[tm] | sort +	find data/sisudir/media/text -name *.ss[tm] | sort +  #+END_SRC  #+NAME: make_find_markup_samples_1_pod  #+BEGIN_SRC makefile  markup_pod_samples:  	find data/pod -name pod.manifest | cut -f 1-3 -d / | sort +  #+END_SRC  #+NAME: make_find_markup_samples_2_dir  #+BEGIN_SRC makefile  markup_dir_samples:  	find data/sisudir/media/text -name *.ss[tm] | sort + +#+END_SRC + +**** nix + +#+NAME: make_set_nix +#+BEGIN_SRC makefile +buildPhase: +	HOME=$${PWD}; \ +	for DC_ in dmd ldmd2 gdmd; do \ +	  echo "- check for D compiler $${DC_}"; \ +	  DC=$$(type -P $${DC_} || echo ""); \ +	  if [ ! "$${DC}" == "" ]; then \ +	    break; \ +	  fi; \ +	done; \ +  echo "D compiler = $${DC}"; \ +	if [ "$${DC}" == "" ]; then \ +    echo "Error: could not find D compiler"; \ +	  exit 1; \ +	fi; \ +	echo "$${DC_} used as D compiler to build $${pname}"; \ +	export DFLAGS="-O2 -inline"; \ +	dub build --compiler=$${DC} --build=release --combined --skip-registry=all; + +checkPhase: +	runHook preCheck; \ +	HOME=$${PWD}; \ +	dub test --combined --skip-registry=all; \ +	runHook postCheck + +installPhase: +	runHook preInstall; \ +	mkdir -p $${out}/bin; \ +	install -m755 ./bin/spine $${out}/bin/spine; \ +	runHook postInstall +#cp -r bin/spine $out/bin/. + +postInstall: +	echo "$${out}/share/cgi-bin"; \ +	echo `ls -la $${out}/bin/spine` + +#+END_SRC + +*** initialize + +#+NAME: make_initialize +#+BEGIN_SRC makefile +Date                    := `date "+%Y%m%d"` +SpineBIN                := "${SpineBIN}" # './result/bin' +SpineOUT                := "${SpineOUT}" # '/srv/www/spine' +SpinePOD                := "${SpinePOD}" # '/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples/markup/pod' +SpineSearchActionLocal  := 'http://localhost/spine_search' +SpineSearchActionRemote := 'https://sisudoc.org/spine_search' +SpineCGIform            := 'spine_search' +SpineSQLdb              := 'spine.search.db' +PROG_VER_GIT            := '''`git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`''' +PROG_VER_DECLARED       := '''`cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`''' +hwd                     := `pwd` +gwd                     := `pwd` + "/src/ext_depends" +deps                    := "`ls -gx './src/ext_depends'`" +dirs_loc                := "`ls -gx '.'`" +#dirs                    := "`ls -gx {{gwd}}`" + +#+END_SRC + +*** commands + + +#+NAME: make_cmd_list +#+BEGIN_SRC makefile +commands: +	rg --color=always -B1 "^[a-z]\w+:" makefile | less + +cmd: +	rg --color=always -B1 "^[a-z]\w+:" makefile | bat + +#+END_SRC + +**** org tangle + +#+NAME: make_cmd_org +#+BEGIN_SRC makefile +# tangle org files +org-tangle: +	cd ./org; \ +	org-tangle *.org; \ +	cd - + +#+END_SRC + +**** project + +#+NAME: make_cmd_project +#+BEGIN_SRC makefile +# project vim +proj-v: +	nvim ./org/doc-reform.org + +# project emacs, cli (single instance open) +proj-e: +	emacsclient -F -c -a -f ./org/doc-reform.org + +# project emacs, cli (multiple instance, no copy & paste) +proj: +	emacsclient -nw -a -f ./org/doc-reform.org + +# project emacs, gui +proj-emacs: +	emacs ./org/doc-reform.org & + +#+END_SRC + +**** generate output + +#+NAME: make_cmd_output_doc +#+BEGIN_SRC makefile +# epub output +out-epub: +	{{SpineBIN}}/spine -v \ +	--epub --output={{SpineOUT}} {{SpinePOD}}/* + +# html output with local search links +out-html: +	{{SpineBIN}}/spine -v --generated-by \ +	--curate \ +	--html --html-link-search --html-link-curate --cgi-url-action="{{SpineSearchActionLocal}}" \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# latex output +out-latex: +	{{SpineBIN}}/spine -v \ +	--latex \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# odf output +out-odf: +	{{SpineBIN}}/spine -v \ +	--odf \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# sqlite output +out-sqlite: +	{{SpineBIN}}/spine -v \ +	--sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# generate markup sample output with local search links +output-samples-local: +	{{SpineBIN}}/spine -v \ +	--latex --latex-init \ +	--epub \ +	--html --html-link-search --html-link-pdf --html-link-curate --html-link-markup \ +	--cgi-sqlite-search-filename="{{SpineCGIform}}" --cgi-url-action="{{SpineSearchActionLocal}}" \ +	--curate \ +	--sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# generate markup sample output with remote search links +output-samples-remote: +	{{SpineBIN}}/spine -v \ +	--generated-by \ +	--latex --latex-init \ +	--epub \ +	--html --html-link-search --html-link-pdf --html-link-curate \ +	--cgi-sqlite-search-filename="{{SpineCGIform}}" --cgi-url-action="{{SpineSearchActionRemote}}" \ +	--curate \ +	--sqlite-update --sqlite-db-filename="{{SpineSQLdb}}" \ +	--output={{SpineOUT}} {{SpinePOD}}/* + +# generate markup sample output with local search links +output-samples: output-samples-local + +# nix build (remote) run +generate-output-remote: nix-build output-samples-remote + +# nix build (local) run +generate-output-local: nix-build output-samples-local + +#+END_SRC + +**** search project + +#+NAME: make_cmd_search_project +#+BEGIN_SRC makefile +# preview org files vim +files-vim: +	fd --max-depth 6 --type file -g "*" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(nvim {})"; \ + +# preview org files emacs +files-emacs: +	fd --max-depth 6 --type file -g "*" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(emacsclient -nw -a -f {})"; \ + +# preview org files vim +org-vim: +	cd ./org; \ +	fd --max-depth 5 --type file -g "*.org" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(nvim {})"; \ +	cd - + +# preview org files emacs +org-emacs: +	cd ./org; \ +	fd --max-depth 5 --type file -g "*.org" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(emacsclient -nw -a -f {})"; \ +	cd - + +## search org files (view in vim) +#org-v find: +#	cd ./org; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(nvim -c \"silent! /{{find}}\" {1})"; \ +#	cd - +# +## search org files (view in emacsclient) +#org-e find: +#	cd ./org; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(emacsclient -nw -a -f {})"; \ +#	cd - +# +## search tips.org files (view in emacs) +#org-E find: +#	cd ./org; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(emacs {} &)"; \ +#	cd - +# +## search for in directory specified (view in vim, uses rg & fzf) ["find" for emacs] +#sDir-v find dir: +#	cd {{dir}}; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(nvim -c \"silent! /{{find}}\" {1})"; \ +#	cd - +# +## search for in directory specified (view in emacs, uses rg & fzf) ["search" for emacs] +#sDir-e find dir: +#	cd {{dir}}; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(emacsclient -nw -a -f {})"; \ +#	cd - +# +## search for in directory specified (view in emacs, uses rg & fzf) ["search" for emacs] +#sDir-E find dir: +#	cd {{dir}}; \ +#	rg --files-with-matches --no-messages "{{find}}" | \ +#	fzf --multi --ansi --print0 \ +#	  --preview-window=right:66% \ +#	  --preview="rg --pretty --after-context 3 --before-context 2 -- \"{{find}}\" {}" \ +#	  --bind="enter:execute(emacs {} &)"; \ +#	cd - + +#+END_SRC + +**** search markup samples + +#+NAME: make_cmd_search_markup_samples +#+BEGIN_SRC makefile +# show markup pod source selections +markup: +	ls -1 --color=always {{SpinePOD}} +	ls -1 -d --color=always {{SpinePOD}}/*/ + +# show markup pod source tree +markup-pod-tree: +	exa -alT --git -I'.git|.dub|*_' --color=always -L5 ${SpinePOD} | less -R + +# show markup pod source tree +tree-src: +	exa -alT --git -I'*_' --color=always -L5 ${SpineSRC}/doc_reform ${SpinePROJ}/views | less -R + +## show markup pod source tree +#tree-src-omit: +#  exa -alT --git -I'.git|.dub|*_' --color=always -L5 ${SpineSRC} ${SpinePROJ}/views | less -R + +# show markup pod source tree +tree-src-search-cgi: +	  exa -alT --git -I'*_' --color=always -L5 ${SpineSearchCGI}/src ${SpineSearchCGI}/views | less -R + +# show markup files +markup-files: +	cd {{SpinePOD}}; \ +	find . -type f -iname "*sst"; \ +	cd -; \ +	echo {{SpinePOD}} +# find {{SpinePOD}}/. -type f -iname "*sst" + +# preview markup files vim +markup-files-vim: +	cd {{SpinePOD}}; \ +	fd --max-depth 5 --type file -g "*.ss?" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(nvim {})"; \ +	cd - + +# preview markup files emacs +markup-files-emacs: +	cd {{SpinePOD}}; \ +	fd --max-depth 5 --type file -g "*.ss?" | sort \ +	| fzf \ +	  --preview='bat --color "always" {}' \ +	  --preview-window=right:66% \ +	  --bind="enter:execute(emacsclient -nw -a -f {})"; \ +	cd - + +# markup samples list +markup-sample: markup-pod-sample + +# markup samples list +markup-pod-sample: +	find data/pod -name pod.manifest | cut -f 1-3 -d / | sort + +# markup samples pod manifests and sst files +markup-samples: markup-pod-samples markup-file-samples + +# markup samples pod manifests +markup-pod-samples: +	echo "{{SpinePOD}}"; \ +	find {{SpinePOD}} -name pod.manifest | sort + +#find {{SpinePOD}} -name pod.manifest | sed -E 's:.+?(([/][^/]+){2})$:\1:' + +# markup samples sst files +markup-file-samples: +	echo "{{SpinePOD}}"; \ +	find {{SpinePOD}} -name *.ss[tm] | sort + +# markup_dir_samples: +#   find data/sisudir/media/text -name *.ss[tm] | sort + +#+END_SRC + +**** dev: git, depends + +#+NAME: make_cmd_dev_misc +#+BEGIN_SRC makefile +# version_tag: +#   echo "DRV=0.11.3; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \ +#   echo "git tag -f doc-reform_v0.11.3 -m\"doc-reform spine-0.11.3\" HEAD" + +# archive spine output (www) +spineWWWarchive: +	cd /srv/www ; \ +	rm spine_output.{{Date}}.tar.bz2 ; \ +	sudo tar --exclude='./spine/latex' --exclude='./spine/pod' --exclude='./spine/*_' -cjf spine_output.{{Date}}.tar.bz2 ./spine ; \ +	cd - + +# rsync archived spine output to Linode +spineWWWrsyncLinode: +	rsync -v /srv/www/spine_output.{{Date}}.tar.bz2 linode:./stage/. ; \ +	rsync -v /var/www/sqlite/spine.search.db linode:./stage/. ; \ +	echo "tar -xf ../spine_output.{{Date}}.tar.bz2" + +# get project external dependencies +depends_get: +	dub upgrade; \ +	cd {{gwd}} && \ +	echo "{{dirs_loc}}" && \ +	for dir in {{dirs_loc}}; do \ +	  if [[ -d ${dir} ]]; then \ +	    echo {{gwd}}/${dir} && \ +	    if [[ "imageformats" == ${dir} ]]; then \ +	      echo {{gwd}}/${dir} && \ +	      rm -rvf {{gwd}}/${dir} && \ +	      git clone --depth=1 https://github.com/tjhann/${dir} && \ +	      cd ${dir} && \ +	      echo $$PWD && \ +	      echo "${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../${dir}.meta && \ +	      echo "https://github.com/tjhann/${dir}"           >> ../${dir}.meta && \ +	      echo "Boost Software License 1.0 (BSL-1.0)"       >> ../${dir}.meta && \ +	      cd {{gwd}} && \ +	      rm -rf {{gwd}}/${dir}/.git; \ +	    elif [[ "d2sqlite3" == ${dir}  || "D-YAML" == ${dir} || "tinyendian" == ${dir} ]]; then \ +	      echo {{gwd}}/${dir} && \ +	      rm -rvf {{gwd}}/${dir} && \ +	      git clone --depth=1 https://github.com/dlang-community/${dir} && \ +	      cd {{gwd}}/${dir} && \ +	      echo "${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../${dir}.meta && \ +	      echo "https://github.com/dlang-community/${dir}"  >> ../${dir}.meta && \ +	      echo "Boost Software License 1.0 (BSL-1.0)"       >> ../${dir}.meta && \ +	      cd {{gwd}} && \ +	      rm -rf {{gwd}}/${dir}/.git; \ +	    fi; \ +	  fi; \ +	done; \ +	cd {{hwd}} + +# get and set project external dependencies +depends_set: depends_get +	dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g'  > dub_describe.json +  #+END_SRC  *** make archive @@ -251,9 +676,17 @@ markup_dir_samples:  gitZip:  	git archive -v --format=tar --prefix=`echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)`/ HEAD | gzip > ../spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \  	echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz" + +# git archive project, produce current state .tar.gz  gitArchive:  	git archive -v --format=tar --prefix=spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)/ HEAD | gzip > ../spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \  	echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz" + +# git archive project, produce current state .tar.gz +# gitArchive: +# 	git archive -v --format=tar --prefix="spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}/" HEAD | gzip > ../spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz && \ +# 	echo "to unzip: tar -xzf spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz" +  #+END_SRC  *** _make_ commands [+2] :make:commands: @@ -280,14 +713,20 @@ gitArchive:  version_tag:  	echo "DRV=<<spine_version_set>>; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \  	echo "git tag -f doc-reform_v<<spine_version_set>> -m\"doc-reform spine-<<spine_version_set>>\" HEAD" +  #+END_SRC  **** changelog  #+NAME: make_changelog  #+BEGIN_SRC makefile -changelog: +changelog_:  	git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" > CHANGELOG_ + +# git changelog for project +changelog: +	git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" | sed "s/ \+$//" > CHANGELOG_ +  #+END_SRC  **** build commands [+1] :build:compile: @@ -300,280 +739,167 @@ changelog:  #+BEGIN_SRC makefile  dub_upgrade:  	$(DUB) upgrade +  #+END_SRC -#+NAME: make_compile_0_compiler_default +#+NAME: make_compile_compiler_default  #+BEGIN_SRC makefile  default: ldc +  #+END_SRC  ******** quick :quick:  ********* default :default: -#+NAME: make_compile_1_compiler_all +#+NAME: make_compile_compiler_all  #+BEGIN_SRC makefile  all: dmd ldc gdc -#+END_SRC -********* version :version: - -#+NAME: make_compile_2_compiler_all_versioned -#+BEGIN_SRC makefile  all_ver: dmd_ver ldc_ver gdc_ver -#+END_SRC -********* get project dependencies - -#+NAME: make_get_project_dependencies_github -#+BEGIN_SRC makefile -get_depends: -	hwd=$$(echo `pwd`) && \ -	gwd="$${hwd}/src/ext_depends" && \ -	dirs=$$(echo `ls -gx $${gwd}`) && \ -	license_bsl="Boost Software License 1.0 (BSL-1.0)" && \ -	echo $${hwd} && \ -	echo $${gwd} && \ -	echo $${dirs} && \ -	dub upgrade; \ -	cd $${gwd} && \ -	for dir in $${dirs}; do \ -	  if [ -d $${dir} ]; then \ -	    echo $${dir} && \ -	    if [ "imageformats" == $${dir} ]; then \ -	      echo $${dir} && \ -	      rm -rf $${dir} && \ -	      git clone --depth=1 https://github.com/tjhann/$${dir} && \ -	      cd $${dir} && \ -	      echo $$PWD && \ -	      echo "$${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../$${dir}.meta && \ -	      echo "https://github.com/tjhann/$${dir}"          >> ../$${dir}.meta && \ -	      echo "$${license_bsl}"                            >> ../$${dir}.meta && \ -	      cd $${gwd} && \ -	      rm -rf $${dir}/.git; \ -	    elif [[ "d2sqlite3" == $${dir}  || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \ -	      echo $${dir} && \ -	      rm -rf $${dir} && \ -	      git clone --depth=1 https://github.com/dlang-community/$${dir} && \ -	      cd $${dir} && \ -	      echo "$${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../$${dir}.meta && \ -	      echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \ -	      echo "$${license_bsl}"                            >> ../$${dir}.meta && \ -	      cd $${gwd} && \ -	      rm -rf $${dir}/.git; \ -	    fi; \ -	  fi; \ -	done; \ -	cd $${hwd} -set_depends: get_depends -	dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g'  > dub_describe.json -rm_flakelock: -	git reset HEAD flake.lock && \ -	touch flake.lock \ -	git rm -f flake.lock -flake_update: -	git add .; \ -	nix flake update && \ -	git reset HEAD flake.lock; \ -	cp flake.lock flake.lock_ -flake_update_move_lock: flake_update -	touch flake.lock \ -	git rm -f flake.lock -set_latest: set_depends flake_update rm_flakelock -#+END_SRC - -gitDir=dub2nix; git clone --depth=1 https://github.com/lionello/${gitDir} | rm -rf ${gitDir}/.git - -********* debug :debug: - -#+NAME: make_compile_3_compiler_all_debug -#+BEGIN_SRC makefile  all_debug: dmd_debug gdc_debug ldc_debug -#+END_SRC - -********* _meson_ build :meson: - -meson using dub -- works & looks pretty clean -- but subprojects built externally & not suitable for debian packaging -#+NAME: make_meson_build -#+BEGIN_SRC makefile -meson_clean_build_dir: -	rm -r build; mkdir build -meson_build: meson_clean_build_dir -	meson --buildtype=debugoptimized build -	ninja -C build -	notify-send -t 0 'D meson build ldc compiled test release executable ready' 'spine' -meson_redo: meson_clean_build_dir meson_build -meson_project_build_clean: clean skel tangle dub_upgrade meson_build -meson: meson_clean_build_dir dub_upgrade meson_build  #+END_SRC -  ******** clean & tangle :clean:tangle:  ********* default :default: -#+NAME: make_clean_tangle_compile_0_all_clean +#+NAME: make_clean_tangle_compile_all_clean  #+BEGIN_SRC makefile  all_clean: clean tangle dmd ldc gdc -#+END_SRC -********* version :version: - -#+NAME: make_clean_tangle_compile_1_all_clean_versioned -#+BEGIN_SRC makefile  all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver -#+END_SRC -********* debug :debug: - -#+NAME: make_clean_tangle_compile_2_all_clean_debug -#+BEGIN_SRC makefile  all_debug_ver: dmd_debug_ver gdc_debug_ver ldc_debug_ver +  all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver +  #+END_SRC  ****** individual compiler builds :each:  ******* dmd :dmd: -******** quick :quick: -********* default :default: +******** quick builds :quick: -#+NAME: make_dub_compile_dmd_0_default +#+NAME: make_dub_compile_dmd_default  #+BEGIN_SRC makefile  dmd: dub_upgrade  	$(DUB) --compiler=dmd --config=dmd --build=release-nobounds  	notify-send -t 0 'D dmd compiled test release executable ready' 'spine-dmd' -#+END_SRC - -********* debug :debug: -#+NAME: make_dub_compile_dmd_1_debug -#+BEGIN_SRC makefile  dmd_debug:  	$(DUB) --compiler=dmd --config=dmd --build=debug -#+END_SRC - -********* version :version: -- assumes git tags with program version - -#+NAME: make_dub_compile_dmd_2_versioned -#+BEGIN_SRC makefile +# assumes git tags with program version  dmd_ver: dub_upgrade  	$(DUB) --compiler=dmd --config=dmd-version  	mv bin/spine-dmd-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd  	notify-send -t 0 'D dmd compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd' -dmd_clean_ver: clean tangle dmd_ver +  #+END_SRC  ******** clean & tangle :clean:tangle: -#+NAME: make_dub_compile_dmd_3_release +#+NAME: make_dub_compile_dmd_release  #+BEGIN_SRC makefile +dmd_clean_ver: clean tangle dmd_ver +  dmd_rel: expunge skel tangle  	$(DUB) --compiler=dmd --config=spine-release +  dmd_rel_tangle: tangle  	$(DUB) --compiler=dmd --config=spine-dmd +  dmd_rel_expunge_tangle: expunge skel tangle dmd_rel_tangle +  dmd_debug_tangle: tangle  	$(DUB) --compiler=dmd --config=spine-dmd-debug +  #+END_SRC  ******* gdc :gdc: -******** quick :quick: -********* default :default: +******** quick builds :quick: -#+NAME: make_dub_compile_gdc_0_default +#+NAME: make_dub_compile_gdc_default  #+BEGIN_SRC makefile  gdc: dub_upgrade  	$(DUB) --compiler=gdc --config=gdc  	notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc' -#+END_SRC -********* debug :debug: - -#+NAME: make_dub_compile_gdc_1_debug -#+BEGIN_SRC makefile  gdc_debug:  	$(DUB) --compiler=gdc --config=gdc --build=debug -#+END_SRC - -********* version :version: - -- assumes git tags with program version -#+NAME: make_dub_compile_gdc_2_versioned -#+BEGIN_SRC makefile +# assumes git tags with program version  gdc_ver: dub_upgrade  	$(DUB) --compiler=gdc --config=gdc-version  	mv bin/spine-gdc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc  	notify-send -t 0 'D gdc compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc' -gdc_clean_ver: clean tangle gdc_ver +  #+END_SRC  ******** clean & tangle :clean:tangle: -#+NAME: make_dub_compile_gdc_3_release +#+NAME: make_dub_compile_gdc_release  #+BEGIN_SRC makefile +gdc_clean_ver: clean tangle gdc_ver +  gdc_rel: expunge skel tangle  	$(DUB) --compiler=gdc --config=spine-release +  gdc_rel_tangle: tangle  	$(DUB) --compiler=gdc --config=spine-gdc +  gdc_rel_expunge_tangle: expunge skel tangle gdc_rel_tangle +  gdc_debug_tangle: tangle  	$(DUB) --compiler=gdc --config=spine-gdc-debug +  #+END_SRC  ******* ldc :ldc: -******** quick :quick: -********* default :default: +******** quick builds :quick: -#+NAME: make_dub_compile_ldc_0_default +#+NAME: make_dub_compile_ldc_default  #+BEGIN_SRC makefile  ldc: dub_upgrade  	$(DUB) --compiler=ldc2 --config=ldc --build=release  	notify-send -t 0 'D ldc compiled test release executable ready' 'spine-ldc' -#+END_SRC - -********* debug :debug: -#+NAME: make_dub_compile_ldc_1_debug -#+BEGIN_SRC makefile  ldc_debug:  	$(DUB) --compiler=ldc2 --config=ldc --build=debug -#+END_SRC - -********* version :version: -- assumes git tags with program version - -#+NAME: make_dub_compile_ldc_2_versioned -#+BEGIN_SRC makefile +# assumes git tags with program version  ldc_ver: dub_upgrade  	$(DUB) --compiler=ldc2 --config=ldc-version  	mv bin/spine-ldc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc  	notify-send -t 0 'D ldc2 compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc' +  ldc_clean_ver: clean tangle ldc_ver +  #+END_SRC  ******** clean & tangle :clean:tangle: -#+NAME: make_dub_compile_ldc_3_release +#+NAME: make_dub_compile_ldc_release  #+BEGIN_SRC makefile  ldc_rel: expunge skel tangle  	$(DUB) --compiler=ldc2 --config=spine-release +  ldc_rel_tangle: tangle  	$(DUB) --compiler=ldc2 --config=spine-ldc +  ldc_rel_expunge_tangle: expunge skel tangle ldc_rel_tangle +  ldc_debug_tangle: tangle  	$(DUB) --compiler=ldc2 --config=spine-ldc-debug +  #+END_SRC  ****** generic  ******* init clean distclean etc. :clean: -#+NAME: make_initialization_operations_0_parts +#+NAME: make_initialization_operations_parts  #+BEGIN_SRC makefile  reinit: clean skel tangle +  skel:  	mkdir -p $(PRG_BINDIR); \  	mkdir -p $(PRG_BINDIR)-archive; \ @@ -595,24 +921,32 @@ skel:  	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/share; \  	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR); \  	mkdir -p $(PRG_BINDIR); +  init: skel +  clean:  	rm -rf build; \  	rm -rf $(PRG_SRCDIR); \  	rm -rf $(PRG_DOCDIR); +  clean_bin:  	rm $(PRG_BINDIR)/* +  clean_src:  	rm -rf $(PRG_SRCDIR); +  clean_docs:  	rm -rf $(PRG_DOCDIR) +  expunge:  	rm -f dub.selections.json; \  	rm -rf build; \  	rm -rf $(PRG_SRCDIR); \  	rm -rf $(PRG_BINDIR); \  	rm -rf $(PRG_DOCDIR); +  distclean: expunge +  distclean_and_init: expunge  	mkdir -p views; \  	mkdir -p sundry/misc/util/d/cgi/search/cgi-bin/src; \ @@ -625,30 +959,129 @@ distclean_and_init: expunge  	mkdir -p sundry/misc/editor-syntax-etc/vim/templates; \  	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR); \  	mkdir -p $(PRG_BINDIR); +  #+END_SRC  ******* version :version: -#+NAME: make_initialization_operations_1_git_version +#+NAME: make_initialization_operations_git_version  #+BEGIN_SRC makefile  ver:  	echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT) +  #+END_SRC  ******* tangle build rebuild :clean:tangle:build: -#+NAME: make_initialization_operations_2_assemble +#+NAME: make_initialization_operations_assemble  #+BEGIN_SRC makefile  clean_tangle_build: clean tangle build +  tangle_build: tangle build +  build: $(PRG_SRCDIR)/$(PRG_SRC)  	$(DC) $(DC_FLAGS) \  	$(DC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \  	$(PRG_SRCDIR)/$(PRG_SRC) +  rebuild: $(PRG_SRCDIR)/$(PRG_SRC) $(PRG_BINDIR)/$(PRG_BIN).o clean build +  makefile_new:  	make -k tangle_maker +  restart: clean tangle + +#+END_SRC + +**** get project dependencies + +#+NAME: make_get_project_dependencies_github +#+BEGIN_SRC makefile +get_depends: +	hwd=$$(echo `pwd`) && \ +	gwd="$${hwd}/src/ext_depends" && \ +	dirs=$$(echo `ls -gx $${gwd}`) && \ +	license_bsl="Boost Software License 1.0 (BSL-1.0)" && \ +	echo $${hwd} && \ +	echo $${gwd} && \ +	echo $${deps} && \ +	dub upgrade; \ +	cd $${gwd} && \ +	for dir in $${deps}; do \ +	  if [ -d $${dir} ]; then \ +	    echo $${dir} && \ +	    if [ "imageformats" == $${dir} ]; then \ +	      echo $${dir} && \ +	      rm -rf $${dir} && \ +	      git clone --depth=1 https://github.com/tjhann/$${dir} && \ +	      cd $${dir} && \ +	      echo $$PWD && \ +	      echo "$${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../$${dir}.meta && \ +	      echo "https://github.com/tjhann/$${dir}"          >> ../$${dir}.meta && \ +	      echo "$${license_bsl}"                            >> ../$${dir}.meta && \ +	      cd $${gwd} && \ +	      rm -rf $${dir}/.git; \ +	    elif [[ "d2sqlite3" == $${dir}  || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \ +	      echo $${dir} && \ +	      rm -rf $${dir} && \ +	      git clone --depth=1 https://github.com/dlang-community/$${dir} && \ +	      cd $${dir} && \ +	      echo "$${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../$${dir}.meta && \ +	      echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \ +	      echo "$${license_bsl}"                            >> ../$${dir}.meta && \ +	      cd $${gwd} && \ +	      rm -rf $${dir}/.git; \ +	    fi; \ +	  fi; \ +	done; \ +	cd $${hwd} + +set_depends: get_depends +	dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g'  > dub_describe.json + +rm_flakelock: +	git reset HEAD flake.lock && \ +	touch flake.lock \ +	git rm -f flake.lock + +flake_update: +	git add .; \ +	nix flake update && \ +	git reset HEAD flake.lock; \ +	cp flake.lock flake.lock_ + +flake_update_move_lock: flake_update +	touch flake.lock \ +	git rm -f flake.lock + +set_latest: set_depends flake_update rm_flakelock + +#+END_SRC + +gitDir=dub2nix; git clone --depth=1 https://github.com/lionello/${gitDir} | rm -rf ${gitDir}/.git + +**** _meson_ build :meson: + +meson using dub +- works & looks pretty clean +- but subprojects built externally & not suitable for debian packaging + +#+NAME: make_meson_build +#+BEGIN_SRC makefile +meson_clean_build_dir: +	rm -r build; mkdir build + +meson_build: meson_clean_build_dir +	meson --buildtype=debugoptimized build +	ninja -C build +	notify-send -t 0 'D meson build ldc compiled test release executable ready' 'spine' + +meson_redo: meson_clean_build_dir meson_build + +meson_project_build_clean: clean skel tangle dub_upgrade meson_build + +meson: meson_clean_build_dir dub_upgrade meson_build +  #+END_SRC  **** testrun (program against document markup) :markup:sample: @@ -659,6 +1092,7 @@ restart: clean tangle  #+BEGIN_SRC makefile  find_pods:  	$(SiSU_MARKUP_SAMPLES_FIND_PODS) +  #+END_SRC  ****** dmd @@ -671,27 +1105,33 @@ dmd_testrun_find:  --sqlite-create --sqlite-update \  --output-dir=tmp/program_output_pod \  data/pod/sisu-manual +  dmd_testrun_find_pod_source:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/spine-ldc -v --source --html --epub \ ---output-dir=tmp/program_output_pod +	./bin/spine-ldc -v --source --html --epub \ +	--output-dir=tmp/program_output_pod +  dmd_testrun_find_pod_pod:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/spine-dmd -v --pod \ ---output-dir=tmp/program_output_pod +	./bin/spine-dmd -v --pod \ +	--output-dir=tmp/program_output_pod +  dmd_testrun_find_pod_html:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/spine-dmd -v --html \ ---output-dir=tmp/program_output_pod +	./bin/spine-dmd -v --html \ +	--output-dir=tmp/program_output_pod +  dmd_testrun_find_pod_epub:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/spine-dmd -v --epub \ ---output-dir=tmp/program_output_pod +	./bin/spine-dmd -v --epub \ +	--output-dir=tmp/program_output_pod +  dmd_testrun_find_pod_all:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod +	./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod +  #+END_SRC  ******* path list @@ -700,25 +1140,30 @@ dmd_testrun_find_pod_all:  #+BEGIN_SRC makefile  dmd_testrun_paths_pod_source:  	./bin/spine-dmd -v --source \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  dmd_testrun_paths_pod_pod:  	./bin/spine-dmd -v --pod \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  dmd_testrun_paths_pod_html:  	./bin/spine-dmd -v --html \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  dmd_testrun_paths_pod_epub:  	./bin/spine-dmd -v --epub \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  dmd_testrun_paths_pod_all:  	./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  #+END_SRC  ****** gdc @@ -728,30 +1173,36 @@ $(SiSU_MARKUP_SAMPLES_POD)  #+BEGIN_SRC makefile  gdc_testrun_find:  	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -data/pod/sisu-manual +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	data/pod/sisu-manual +  gdc_testrun_find_pod_source:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/spine-gdc -v --source \ ---output-dir=tmp/program_output_pod +	./bin/spine-gdc -v --source \ +	--output-dir=tmp/program_output_pod +  gdc_testrun_find_pod_pod:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/spine-gdc -v --pod \ ---output-dir=tmp/program_output_pod +	./bin/spine-gdc -v --pod \ +	--output-dir=tmp/program_output_pod +  gdc_testrun_find_pod_html:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/spine-gdc -v --html \ ---output-dir=tmp/program_output_pod +	./bin/spine-gdc -v --html \ +	--output-dir=tmp/program_output_pod +  gdc_testrun_find_pod_epub:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/spine-gdc -v --epub \ ---output-dir=tmp/program_output_pod +	./bin/spine-gdc -v --epub \ +	--output-dir=tmp/program_output_pod +  gdc_testrun_find_pod_all:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod +	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod +  #+END_SRC  ******* path list @@ -760,30 +1211,36 @@ gdc_testrun_find_pod_all:  #+BEGIN_SRC makefile  gdc_testrun_paths:  	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -data/pod/sisu-manual +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	data/pod/sisu-manual +  gdc_testrun_paths_pod_source:  	./bin/spine-gdc -v --source \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  gdc_testrun_paths_pod_pod:  	./bin/spine-gdc -v --pod \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  gdc_testrun_paths_pod_html:  	./bin/spine-gdc -v --html \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  gdc_testrun_paths_pod_epub:  	./bin/spine-gdc -v --epub \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  gdc_testrun_paths_pod_all:  	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  #+END_SRC  ****** ldc @@ -793,30 +1250,36 @@ $(SiSU_MARKUP_SAMPLES_POD)  #+BEGIN_SRC makefile  ldc_testrun_find:  	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -data/pod/sisu-manual +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	data/pod/sisu-manual +  ldc_testrun_find_pod_source:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \  	./bin/spine-ldc -v --source \ ---output-dir=tmp/program_output_pod +	--output-dir=tmp/program_output_pod +  ldc_testrun_find_pod_pod:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \  	./bin/spine-ldc -v --pod \ ---output-dir=tmp/program_output_pod +	--output-dir=tmp/program_output_pod +  ldc_testrun_find_pod_html:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \  	./bin/spine-ldc -v --html \ ---output-dir=tmp/program_output_pod +	--output-dir=tmp/program_output_pod +  ldc_testrun_find_pod_epub:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \  	./bin/spine-ldc -v --epub \ ---output-dir=tmp/program_output_pod +	--output-dir=tmp/program_output_pod +  ldc_testrun_find_pod_all:  	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \  	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod +  #+END_SRC  ******* path list @@ -825,30 +1288,36 @@ ldc_testrun_find_pod_all:  #+BEGIN_SRC makefile  ldc_testrun_paths:  	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -data/pod/sisu-manual +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	data/pod/sisu-manual +  ldc_testrun_paths_pod_source:  	./bin/spine-ldc -v --source \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  ldc_testrun_paths_pod_pod:  	./bin/spine-ldc -v --pod \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  ldc_testrun_paths_pod_html:  	./bin/spine-ldc -v --html \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  ldc_testrun_paths_pod_epub:  	./bin/spine-ldc -v --epub \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  ldc_testrun_paths_pod_all:  	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_pod \ +	$(SiSU_MARKUP_SAMPLES_POD) +  #+END_SRC  ***** dir :dir: @@ -859,25 +1328,30 @@ $(SiSU_MARKUP_SAMPLES_POD)  #+BEGIN_SRC makefile  dmd_testrun_find_dir_source:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-dmd -v --source \ ---output-dir=tmp/program_output_dir +	./bin/spine-dmd -v --source \ +	--output-dir=tmp/program_output_dir +  dmd_testrun_find_dir_pod:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-dmd -v --pod \ ---output-dir=tmp/program_output_dir +	./bin/spine-dmd -v --pod \ +	--output-dir=tmp/program_output_dir +  dmd_testrun_find_dir_html:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-dmd -v --html \ ---output-dir=tmp/program_output_dir +	./bin/spine-dmd -v --html \ +	--output-dir=tmp/program_output_dir +  dmd_testrun_find_dir_epub:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-dmd -v --epub \ ---output-dir=tmp/program_output_dir +	./bin/spine-dmd -v --epub \ +	--output-dir=tmp/program_output_dir +  dmd_testrun_find_dir_all:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir +	./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir +  #+END_SRC  ******* file list @@ -886,25 +1360,30 @@ dmd_testrun_find_dir_all:  #+BEGIN_SRC makefile  dmd_testrun_filelist_dir_source:  	./bin/spine-dmd -v --source \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  dmd_testrun_filelist_dir_pod:  	./bin/spine-dmd -v --pod \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  dmd_testrun_filelist_dir_html:  	./bin/spine-dmd -v --html \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  dmd_testrun_filelist_dir_epub:  	./bin/spine-dmd -v --epub \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  dmd_testrun_filelist_dir_all:  	./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  #+END_SRC  ****** gdc @@ -914,25 +1393,30 @@ $(SiSU_MARKUP_SAMPLES_DIR)  #+BEGIN_SRC makefile  gdc_testrun_find_dir_source:  	./bin/spine-gdc -v --source \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  gdc_testrun_find_dir_pod:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-gdc -v --pod \ ---output-dir=tmp/program_output_dir +	./bin/spine-gdc -v --pod \ +	--output-dir=tmp/program_output_dir +  gdc_testrun_find_dir_html:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-gdc -v --html \ ---output-dir=tmp/program_output_dir +	./bin/spine-gdc -v --html \ +	--output-dir=tmp/program_output_dir +  gdc_testrun_find_dir_epub:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-gdc -v --epub \ ---output-dir=tmp/program_output_dir +	./bin/spine-gdc -v --epub \ +	--output-dir=tmp/program_output_dir +  gdc_testrun_find_dir_all:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir +	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir +  #+END_SRC  ******* file list @@ -941,25 +1425,30 @@ gdc_testrun_find_dir_all:  #+BEGIN_SRC makefile  gdc_testrun_filelist_dir_source:  	./bin/spine-gdc -v --source \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  gdc_testrun_filelist_dir_pod:  	./bin/spine-gdc -v --pod \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  gdc_testrun_filelist_dir_html:  	./bin/spine-gdc -v --html \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  gdc_testrun_filelist_dir_epub:  	./bin/spine-gdc -v --epub \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  gdc_testrun_filelist_dir_all:  	./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  #+END_SRC  ****** ldc @@ -969,25 +1458,30 @@ $(SiSU_MARKUP_SAMPLES_DIR)  #+BEGIN_SRC makefile  ldc_testrun_find_dir_source:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-ldc -v --source \ ---output-dir=tmp/program_output_dir +	./bin/spine-ldc -v --source \ +	--output-dir=tmp/program_output_dir +  ldc_testrun_find_dir_pod:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-ldc -v --pod \ ---output-dir=tmp/program_output_dir +	./bin/spine-ldc -v --pod \ +	--output-dir=tmp/program_output_dir +  ldc_testrun_find_dir_html:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-ldc -v --html \ ---output-dir=tmp/program_output_dir +	./bin/spine-ldc -v --html \ +	--output-dir=tmp/program_output_dir +  ldc_testrun_find_dir_epub:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-ldc -v --epub \ ---output-dir=tmp/program_output_dir +	./bin/spine-ldc -v --epub \ +	--output-dir=tmp/program_output_dir +  ldc_testrun_find_dir_all:  	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir +	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir +  #+END_SRC  ******* file list @@ -996,25 +1490,30 @@ ldc_testrun_find_dir_all:  #+BEGIN_SRC makefile  ldc_testrun_filelist_dir_source:  	./bin/spine-ldc -v --source \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  ldc_testrun_filelist_dir_pod:  	./bin/spine-ldc -v --pod \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  ldc_testrun_filelist_dir_html:  	./bin/spine-ldc -v --html \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  ldc_testrun_filelist_dir_epub:  	./bin/spine-ldc -v --epub \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  ldc_testrun_filelist_dir_all:  	./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) +	--sqlite-create --sqlite-update \ +	--output-dir=tmp/program_output_dir \ +	$(SiSU_MARKUP_SAMPLES_DIR) +  #+END_SRC  **** org babel tangle batch process command :tangle: @@ -1040,6 +1539,7 @@ tangle: skel  				(setq-local org-src-preserve-indentation t) \  			(org-babel-tangle) \  			(kill-buffer)) '($$ORGFILES)))" 2>&1 +  #+END_SRC  ***** tangle maker: org babel tangle makefile new @@ -1064,6 +1564,7 @@ tangle_maker:  				(setq-local org-src-preserve-indentation t) \  			(org-babel-tangle) \  			(kill-buffer)) '($$ORGFILES)))" 2>&1 +  #+END_SRC  ***** tangle nix project @@ -1072,16 +1573,94 @@ tangle_maker:  #+BEGIN_SRC makefile  lorri_shell:  	lorri shell -nix_shell: -	nix-shell -nix_build_default: -	nix build -f default.nix && ./result/bin/spine -v -nix_build_project: -	nix build -f project.nix && ./result/bin/spine -v -nix_build_spine: -	nix build -f spine.nix && ./result/bin/spine -v -nix-build_default: -	nix-build default.nix + +# nix-shell +nix-shell: +	nix-shell -I .envrc + +nix-shell-pure: +	nix-shell -I .envrc --pure + +# nix-shell (with local tools, presumably latest dlang compiler & build tools (ldc & dub)) +nix-shell-updated: +	nix-shell -I nixpkgs=/nixpkgs-ra/nixpkgs --pure + +# shell.nix (with shebang) +shell: +	shell.nix + +# nix-build spine +nix-build: +	nix-build default.nix && ./result/bin/spine -v + +# nix-build spine (with local tools, presumably latest dlang compiler & build tools (ldc & dub)) +nix-build-use-tools-new: +	nix-build -I .envrc + +# tangle-build +tangle-build: org-tangle nix-build + +# build-run +build-run: nix-build output-samples + +# tangle-build-run +tangle-build-run: org-tangle nix-build output-samples + +# nix-build spine search +nix-build-search: +	cd ./sundry/spine_search_cgi; \ +	nix-build \ +	cd - + +_flake-lock-reset: +	git reset HEAD flake.lock + +_flake-show-name: +	nix search --json 2>/dev/null |jq; + +_flake-show-package: +	nix flake show; + +_flake-show-derivation: +	nix show-derivation |jq; + +nix-develop: +	nix develop -f default.nix -I nixpkgs=/nixpkgs-ra/nixpkgs + +# nix flake show +flake-show: _flake-show-package _flake-show-name _flake-show-derivation + +# nix-build flake spine +flake-build: _flake-show-name +	nix build --print-build-logs + +# nix-build flake spine +flake-reset-build: _flake-lock-reset _flake-show-name +	nix build --print-build-logs + +# nix-build flake spine debug +flake-build-debug: +	nix build --debug + +# nix-build spine (with local tools, presumably latest dlang compiler & build tools (ldc & dub)) +flake-build-use-tools-new: +	nix build --print-build-logs -I nixpkgs=/nixpkgs-ra/nixpkgs + +# tangle-build-flake +flake-tangle-build: org-tangle flake-build + +# build-flake-run +flake-build-run: flake-build output-samples + +# tangle-build-run +flake-tangle-build-run: org-tangle flake-build output-samples + +# nix-build spine search +flake-build-search: +	cd ./sundry/spine_search_cgi; \ +	nix build --print-build-logs \ +	cd - +  #+END_SRC  **** git snapshot @@ -1090,6 +1669,7 @@ nix-build_default:  #+BEGIN_SRC makefile  gitsnapshot: distclean tangle  	git commit -a +  #+END_SRC  *** phony :phony: @@ -1099,17 +1679,70 @@ gitsnapshot: distclean tangle  .PHONY : all build rebuild debug release \  	distclean init \  	tangle gitsnapshot + +#+END_SRC + +** .env/local + +#+HEADER: :NO-tangle ../.env/local +#+BEGIN_SRC sh +export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos +#export NIX_PATH=nixpkgs=/nixpkgs-ra/nixpkgs +#export NIX_PATH=/nixpkgs-ra/nixpkgs +# reload when these files change +# watch_file flake.nix +# watch_file flake.lock +## load the flake devShell +# eval "$(nix print-dev-env)" +# echo $NIX_BUILD_TOP +export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') +export SpinePROJ=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform +export SpineSRC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/src +export SpineBIN=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/result/bin +export SpineDOC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples +export SpinePOD=$SpineDOC/markup/pod +export SpineOUTversioned=/srv/www/spine/$SpineVER +export SpineOUT=/srv/www/spine +export SpineDBpath=/var/www/sqlite +#use nix +if [ -e .env/echo-nixNote ]; then +   source .env/echo-nixNote +fi  #+END_SRC -** makefile :makefile: +* dr spine_search +** spine_search makefile :makefile  *** tangle -#+HEADER: :tangle ../sundry/spine_search_cgi/makefile_ +#+HEADER: :tangle ../sundry/spine_search_cgi/makefile  #+BEGIN_SRC makefile +<<make_cgi_search_makefile>>  <<make_get_project_cgi_search_dependencies_github>>  #+END_SRC -********* get project dependencies +*** make + +#+NAME: make_cgi_search_makefile +#+BEGIN_SRC makefile +SpineBIN          := "${SpineBIN}" # 'result/bin' +SpineOUT          := "${SpineOUT}" # '/srv/www/spine' +SpinePOD          := "${SpinePOD}" # '/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples/markup/pod' +SpineSearchAction := 'https://sisudoc.org/spine_search' +SpineCGIform      := 'spine_search' +SpineSQLdb        := 'spine.search.db' + +# nix build +build: +	nix-build + +# cp cgi search form +cp-cgi: +	sudo cp -vi /var/www/cgi/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search_old && \ +	sudo cp -vi result/share/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search + +#+END_SRC + +*** get project dependencies  #+NAME: make_get_project_cgi_search_dependencies_github  #+BEGIN_SRC makefile @@ -1120,10 +1753,10 @@ get_depends:  	license_bsl="Boost Software License 1.0 (BSL-1.0)" && \  	echo $${hwd} && \  	echo $${gwd} && \ -	echo $${dirs} && \ +	echo $${deps} && \  	dub upgrade; \  	cd $${gwd} && \ -	for dir in $${dirs}; do \ +	for dir in $${deps}; do \  	  if [ -d $${dir} ]; then \  	    echo $${dir} && \  	    if [[ "arsd" == $${dir} ]]; then \ @@ -1146,6 +1779,377 @@ get_depends:  	  fi; \  	done; \  	cd $${hwd} +  set_depends: get_depends  	dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g'  > dub_describe.json +  #+END_SRC + +** .env/local + +#+HEADER: :NO-tangle ../sundry/spine_search_cgi/.env/local +#+BEGIN_SRC nix +export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos +#+END_SRC + +* www dr spine latex + +- /srv/www/spine/latex + +** make + +#+HEADER: :tangle /srv/www/spine/latex/makefile +#+BEGIN_SRC makefile +# nix build +#build: +#  nix-build + +# clean, deletes latex processing workfiles +clean: +	for ext in "aux" "log" "toc"; do \ +	  rm *.$ext; \ +	done; + +# rm *.aux; +# rm *.log; +# rm *.toc; + +# clean, deletes latex processing workfiles for landscape documents +clean-landscape: +	for ext in "aux" "log" "toc"; do \ +	  rm *.landscape.$ext; \ +	done; + +# clean, deletes latex processing workfiles for portrait documents +clean-portrait: +	for ext in "aux" "log" "toc"; do \ +	  rm *.portrait.$ext; \ +	done; + +# clean, deletes latex processing workfiles for a4 documents +clean-size papersize: +	for ext in "aux" "log" "toc"; do \ +	  rm *.{{papersize}}.portrait.$ext; \ +	done; \ +	echo "removed latex {{papersize}} workfiles"; + +# wipe clean, deletes latex processing workfiles & pdfs +wipe: clean +	rm *.pdf; + +# wipe clean, deletes latex processing workfiles & pdfs for landscape documents +wipe-landscape: clean-landscape +	rm *.landscape.pdf; + +# wipe clean, deletes latex processing workfiles & pdfs for portrait documents +wipe-portrait: clean-portrait +	rm *.portrait.pdf; + +# wipe clean, deletes latex processing workfiles & pdfs for a4 documents +wipe-size papersize: (clean-size papersize) +	rm *.{{papersize}}.*.pdf; \ +	echo "removed {{papersize}} pdfs"; + +# xelatex pdf output +latex: wipe portrait landscape + +# xelatex pdf portrait output +portrait: +	for file in `ls *.portrait.tex`; do \ +	  for n in 1 2 3; do \ +	    xelatex -interaction=nonstopmode $file; \ +	  done; \ +	done; \ +	echo "portrait pdfs complete"; + +# xelatex pdf landscape output +landscape: +	for file in `ls *.landscape.tex`; do \ +	  for n in 1 2 3; do \ +	    xelatex -interaction=nonstopmode $file; \ +	  done; \ +	done; \ +	echo "landscape pdfs complete"; + +# xelatex pdf output +pdf: wipe +	for file in `ls *.tex`; do \ +	  for n in 1 2 3; do \ +	    xelatex -interaction=nonstopmode $file; \ +	  done; \ +	done; \ +	echo "pdfs complete"; + +# xelatex pdf a4 output of papersize given, provide papersize +pdf-size papersize: (pdf-portrait papersize) (pdf-landscape papersize) +	echo "{{papersize}} pdfs complete"; + +# xelatex pdf portrait output of papersize given, provide papersize +pdf-portrait papersize: +	echo "{{papersize}} portrait ->"; \ +	for file in `ls *.{{papersize}}.portrait.tex`; do \ +	  echo $file; \ +	  for n in 1 2 3; do \ +	    xelatex -interaction=nonstopmode $file; \ +	  done; \ +	done; \ +	echo "{{papersize}} portrait pdfs complete"; + +# xelatex pdf landscape output of papersize given, provide papersize +pdf-landscape papersize: +	echo "{{papersize}}landscape ->"; \ +	for file in `ls *.{{papersize}}.landscape.tex`; do \ +	  echo $file; \ +	  for n in 1 2 3; do \ +	    xelatex -interaction=nonstopmode $file; \ +	  done; \ +	done; \ +	echo "{{papersize}} landscape pdfs complete"; +#+END_SRC + +** README + +#+HEADER: :tangle /srv/www/spine/latex/README +#+BEGIN_SRC sh +-*- mode: org -*- +things nix to be placed in $SpineOUT/latex + +cp -vi nix.org $SpineOUT/latex/. + +$SpineBIN/spine --verbose --latex --output="$SpineOUT" $SpinePOD/* +$SpineBIN/spine --verbose --latex --set-papersize="a4,letter.portrait,b4.portrait" --output="$SpineOUT" $SpinePOD/* +#+END_SRC + +** shell.nix +*** shell hook +**** shell hook + +#+NAME: shell_hook_ +#+BEGIN_SRC sh +if [[ -e ".envrc" ]]; then +  source .envrc +fi +eval "$(starship init bash)" +for texfile in <<tex_files>>; do +  for run in {1..<<repeat_run>>}; do +    xelatex -interaction=nonstopmode $texfile +  done +done +rm *.{aux,log,out,toc} +ls *.tex; ls *.pdf; +#+END_SRC + +#+NAME: shell_hook +#+BEGIN_SRC sh +if [[ -e ".envrc" ]]; then +  source .envrc +fi +eval "$(starship init bash)" +for size in <<paper_sizes>>; do +  for orient in <<paper_orientations>>; do +    for texfile in *.$size.$orient.tex; do +      for run in {1..<<repeat_run>>}; do +        xelatex -interaction=nonstopmode $texfile +      done +    done +  done +done +rm *.{aux,log,out,toc} +ls *.tex; ls *.pdf; +#+END_SRC + +**** shell hook variables +***** tex files + +#+NAME: tex_files +#+BEGIN_SRC sh +{sisu_markup,the_wealth_of_networks.yochai_benkler,two_bits.christopher_kelty,viral_spiral.david_bollier}.en.*.tex +#+END_SRC + +***** paper sizes + +#+NAME: paper_sizes +#+BEGIN_SRC sh +"a4" "b4" "letter" +#+END_SRC + +***** paper orientations + +#+NAME: paper_orientations +#+BEGIN_SRC sh +"portrait" +#+END_SRC + +***** repeat xeletex run + +#+NAME: repeat_run +#+BEGIN_SRC sh +3 +#+END_SRC + +***** env paths init + +#+NAME: spine_proj +#+BEGIN_SRC sh +/grotto-ra/repo/git.repo/projects/project-spine/doc-reform +#+END_SRC + +#+NAME: spine_src +#+BEGIN_SRC sh +/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/src +#+END_SRC + +#+NAME: spine_bin +#+BEGIN_SRC sh +/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/result/bin +#+END_SRC + +#+NAME: spine_doc +#+BEGIN_SRC sh +/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples +#+END_SRC + +#+NAME: spine_pod +#+BEGIN_SRC sh +$SpineDOC/markup/pod +#+END_SRC + +#+NAME: spine_out +#+BEGIN_SRC sh +/srv/www/spine +#+END_SRC + +*** shell.nix + +#+HEADER: :tangle /srv/www/spine/latex/shell.nix +#+BEGIN_SRC nix +#!/usr/bin/env -S nix-shell --pure +{ pkgs ? import <nixpkgs> {} }: +with pkgs; +mkShell { +  buildInputs = [ +    <<package_list_latex>> +  ]; +  shellHook = '' +    # <<shell_hook>> +  ''; +} +#+END_SRC + +*** packages.nix + +#+NAME: package_list_latex +#+BEGIN_SRC nix +### nix_related +nixFlakes +nix-prefetch-git +validatePkgConfig +jq +git +### d_build_related +## package manager +dub +## compiler +ldc +rund +# ### pdf_latex_related +source-sans-pro +source-serif-pro +source-code-pro +texlive.combined.scheme-full +# texlive.combined.scheme-tetex +evince +zathura +apvlv +### candy +starship +#+END_SRC + +*** packages.nix + +#+NAME: package_list_inherit_latex +#+BEGIN_SRC nix +(import ./packages.nix { inherit pkgs; }) +#+END_SRC + +#+HEADER: :tangle /srv/www/spine/latex/packages.nix +#+BEGIN_SRC nix +### nix_related +{ pkgs ? import <nixpkgs> {} }: +with pkgs; [ +  <<package_list_latex>> +] +#+END_SRC + +** env +*** .envrc + +#+HEADER: :tangle /srv/www/spine/latex/.envrc +#+BEGIN_SRC sh +NIX_ENFORCE_PURITY=0 +if ! has nix_direnv_version || ! nix_direnv_version 1.4.0; then +# https://github.com/nix-community/nix-direnv +  source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.4.0/direnvrc" "sha256-4XfVDjv75eHMWN4G725VW7BoOV4Vl3vAabK4YXIfPyE=" +fi +if [ -e .env/local ]; then +  source_env_if_exists .env/local || source .env/local +fi +#+END_SRC + +*** .env/local + +#+HEADER: :tangle /srv/www/spine/latex/.env/local +#+BEGIN_SRC sh +export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos +#export NIX_PATH=nixpkgs=/nixpkgs-ra/nixpkgs +#export NIX_PATH=/nixpkgs-ra/nixpkgs +# reload when these files change +# watch_file flake.nix +# watch_file flake.lock +## load the flake devShell +# eval "$(nix print-dev-env)" +# echo $NIX_BUILD_TOP +export PROJ="/grotto-ra/repo/git.repo/projects/project-spine" +export SpinePROJ=<<spine_proj>> +export SpineSRC=<<spine_src>> +export SpineBIN=<<spine_bin>> +export SpineDOC=<<spine_doc>> +export SpinePOD=<<spine_pod>> +export SpineOUT=<<spine_out>> +#use nix +if [ -e .env/echo-nixNote ]; then +   source .env/echo-nixNote +fi +#+END_SRC + +** git +*** .gitignore + +#+HEADER: :tangle /srv/www/spine/latex/.gitignore +#+BEGIN_SRC sh +# git ls-files --others --exclude-from=.git/info/exclude +,* +!README +!nix.org +!shell.nix +!packages.nix +!.gitignore +!.envrc +!.env/ +!.env/local +!sty/ +!sty/*.sty +!sisu_markup.en.*.tex +!two_bits.christopher_kelty.en.*.tex +!the_wealth_of_networks.yochai_benkler.en.*.tex +!viral_spiral.david_bollier.en.*.tex +#+END_SRC + +** notes + +- vim {the_wealth_of_networks.yochai_benkler,two_bits.christopher_kelty,viral_spiral.david_bollier}.en.a4.portrait.tex +- emacs {the_wealth_of_networks.yochai_benkler,two_bits.christopher_kelty,viral_spiral.david_bollier}.en.a4.portrait.tex + +- evince the_wealth_of_networks.yochai_benkler.en.a4.portrait.pdf +- evince two_bits.christopher_kelty.en.a4.portrait.pdf +- evince viral_spiral.david_bollier.en.a4.portrait.pdf diff --git a/org/doc-reform.org b/org/doc-reform.org index d0b73eb..1b1edaa 100644 --- a/org/doc-reform.org +++ b/org/doc-reform.org @@ -209,6 +209,7 @@ config_meson.org  config_misc.org  config_nix.org  #+end_src +  *** utils  #+NAME: listdir_util diff --git a/sundry/spine_search_cgi/makefile b/sundry/spine_search_cgi/makefile new file mode 100644 index 0000000..4f2747d --- /dev/null +++ b/sundry/spine_search_cgi/makefile @@ -0,0 +1,52 @@ +SpineBIN          := "${SpineBIN}" # 'result/bin' +SpineOUT          := "${SpineOUT}" # '/srv/www/spine' +SpinePOD          := "${SpinePOD}" # '/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples/markup/pod' +SpineSearchAction := 'https://sisudoc.org/spine_search' +SpineCGIform      := 'spine_search' +SpineSQLdb        := 'spine.search.db' + +# nix build +build: +	nix-build + +# cp cgi search form +cp-cgi: +	sudo cp -vi /var/www/cgi/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search_old && \ +	sudo cp -vi result/share/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search + +get_depends: +	hwd=$$(echo `pwd`) && \ +	gwd="$${hwd}/src/ext_depends_cgi" && \ +	dirs=$$(echo `ls -gx $${gwd}`) && \ +	license_bsl="Boost Software License 1.0 (BSL-1.0)" && \ +	echo $${hwd} && \ +	echo $${gwd} && \ +	echo $${deps} && \ +	dub upgrade; \ +	cd $${gwd} && \ +	for dir in $${deps}; do \ +	  if [ -d $${dir} ]; then \ +	    echo $${dir} && \ +	    if [[ "arsd" == $${dir} ]]; then \ +	      echo $${dir} && \ +	      rm -rf $${dir} && \ +          mkdir $${dir} && \ +          aria2c -o "$${dir}/cgi.d" "https://raw.githubusercontent.com/adamdruppe/arsd/master/cgi.d" && \ +	      cd $${gwd}; \ +	    elif [[ "d2sqlite3" == $${dir} ]]; then \ +	      echo $${dir} && \ +	      rm -rf $${dir} && \ +	      git clone --depth=1 https://github.com/dlang-community/$${dir} && \ +	      cd $${dir} && \ +	      echo "$${dir} `git rev-parse HEAD | cut -c 1-8`"   > ../$${dir}.meta && \ +	      echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \ +	      echo "$${license_bsl}"                            >> ../$${dir}.meta && \ +	      cd $${gwd} && \ +	      rm -rf $${dir}/.git; \ +	    fi; \ +	  fi; \ +	done; \ +	cd $${hwd} + +set_depends: get_depends +	dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g'  > dub_describe.json | 
