#+TITLE: sdp (project) makefile
#+AUTHOR: Ralph Amissah
#+EMAIL: ralph.amissah@gmail.com
#+STARTUP: indent content
#+LANGUAGE: en
#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+OPTIONS: author:nil email:nil creator:nil timestamp:nil
#+PROPERTY: header-args :padline no :exports code :noweb yes
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+FILETAGS: :sdp:rel:makefile:
#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)

[[./org/sdp.org][sdp.org]]  [[./org/][org/]]

* makefile                                                         :makefile:
** settings [+2]                                                  :settings:
*** git version stamp                                         :git:version:

#+BEGIN_SRC makefile :tangle makefile
PROJECT_VERSION :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`)
#+END_SRC

*** dub (build tool)                                                  :dub:

#+BEGIN_SRC makefile :tangle makefile
DUB=dub
DUB_FLAGS=-v --force --compiler=
#+END_SRC

*** Project Details                                           :project:sdp:

#+BEGIN_SRC makefile :tangle makefile
PRG_NAME=sdp
PRG_SRC=$(PRG_NAME).d
PRG_SRCDIR=./src
PRG_BIN=$(PRG_NAME)
PRG_BINDIR=./bin
PRG_DOCDIR=./docs
#+END_SRC

*** Emacs Org settings                          :settings:emacs:org:tangle:

#+BEGIN_SRC makefile :tangle makefile
EMACSLISP=/usr/share/emacs/site-lisp
ORG_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-???????? | cut -d '-' -f2`)
EMACSLISP_ORG=~/.emacs.d/elpa/org-$($(shell echo $(ORG_VER_AVAILABLE)))
ORG_CONTRIB_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-plus-???????? | cut -d '-' -f2`)
EMACSLISP_ORG_CONTRIB=~/.emacs.d/elpa/org-plus-contrib-$($(shell echo $(ORG_CONTRIB_VER_AVAILABLE)))
ORGFILELIST=$(shell echo `ls -1 maker.org org/*.org`)
ORGFILES=""
ORGDIR :=$(shell echo `pwd`)
#+END_SRC

*** Markup Samples
**** pods

#+BEGIN_SRC makefile :tangle makefile
SiSU_MARKUP_SAMPLES_FIND_PODS= \
find data/sisupod -maxdepth 2 -name sisupod.manifest | cut -f 1-3 -d / | sort

SiSU_MARKUP_SAMPLES_PODS_FOUND= \
$(SiSU_MARKUP_SAMPLES_FIND_PODS) | xargs

SiSU_MARKUP_SAMPLES_POD = \
data/sisupod/accelerando.charles_stross \
data/sisupod/alices_adventures_in_wonderland.lewis_carroll \
data/sisupod/content.cory_doctorow \
data/sisupod/democratizing_innovation.eric_von_hippel \
data/sisupod/down_and_out_in_the_magic_kingdom.cory_doctorow \
data/sisupod/for_the_win.cory_doctorow \
data/sisupod/free_as_in_freedom_2.richard_stallman_and_the_free_software_revolution.sam_williams.richard_stallman \
data/sisupod/free_culture.lawrence_lessig \
data/sisupod/free_for_all.peter_wayner \
data/sisupod/gpl2.fsf \
data/sisupod/gpl3.fsf \
data/sisupod/gullivers_travels.jonathan_swift \
data/sisupod/little_brother.cory_doctorow \
data/sisupod/live-manual \
data/sisupod/sisu-manual \
data/sisupod/the_autonomous_contract.ralph_amissah \
data/sisupod/the_cathedral_and_the_bazaar.eric_s_raymond \
data/sisupod/the_public_domain.james_boyle \
data/sisupod/the_wealth_of_networks.yochai_benkler \
data/sisupod/through_the_looking_glass.lewis_carroll \
data/sisupod/two_bits.christopher_kelty \
data/sisupod/un_contracts_international_sale_of_goods_convention_1980 \
data/sisupod/viral_spiral.david_bollier
#+END_SRC

**** dir

#+BEGIN_SRC makefile :tangle makefile
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
#+END_SRC

** _make_ commands [+2]                                        :make:commands:

- build commands
  - build
  - debug
  - release
- init, clean, distclean etc.
  - init
  - clean
  - expunge
  - distclean
  - distclean_and_init
- org babel tangle
  - tangle
- git snapshot
  - gitsnapshot

*** build commands [+1]                                     :build:compile:
**** _dub_ build rebuild                                               :dub:
***** all compiler builds                               :all:dmd:gdc:ldc:
****** all builds
******* default

#+BEGIN_SRC makefile :tangle makefile
default: ldc
#+END_SRC

******* sample markup file list

#+BEGIN_SRC makefile :tangle makefile
markup_samples:
	find data/sisupod -name sisupod.manifest | cut -f 1-3 -d / | sort; \
find data/sisudir/media/text -name *.ss[tm] | sort
#+END_SRC

#+BEGIN_SRC makefile :tangle makefile
markup_pod_samples:
	find data/sisupod -name sisupod.manifest | cut -f 1-3 -d / | sort
#+END_SRC

#+BEGIN_SRC makefile :tangle makefile
markup_dir_samples:
	find data/sisudir/media/text -name *.ss[tm] | sort
#+END_SRC

******* quick                                                   :quick:
******** default                                             :default:
#+BEGIN_SRC makefile :tangle makefile
all: dmd ldc gdc
#+END_SRC

******** version                                             :version:

#+BEGIN_SRC makefile :tangle makefile
all_ver: dmd_ver ldc_ver gdc_ver
#+END_SRC

******** debug                                                 :debug:

#+BEGIN_SRC makefile :tangle makefile
all_debug: dmd_debug gdc_debug ldc_debug
#+END_SRC

******* clean & tangle                                   :clean:tangle:
******** default                                             :default:

#+BEGIN_SRC makefile :tangle makefile
all_clean: clean tangle dmd ldc gdc
#+END_SRC

******** version                                             :version:

#+BEGIN_SRC makefile :tangle makefile
all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver
#+END_SRC

******** debug                                                 :debug:

#+BEGIN_SRC makefile :tangle 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:

#+BEGIN_SRC makefile :tangle makefile
dmd:
	$(DUB) --compiler=dmd --config=sdp-dmd
#+END_SRC

******** version                                             :version:

#+BEGIN_SRC makefile :tangle makefile
dmd_ver:
	$(DUB) --compiler=dmd --config=sdp-dmd-version
	mv bin/sdp-dmd-ver bin/sdp-dmd-$(PROJECT_VERSION)
	notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-dmd-$(PROJECT_VERSION)'
dmd_clean_ver: clean tangle dmd_ver
#+END_SRC

******** debug                                                 :debug:

#+BEGIN_SRC makefile :tangle makefile
dmd_debug:
	$(DUB) --compiler=dmd --config=sdp-dmd-debug
#+END_SRC

******* clean & tangle                                   :clean:tangle:

#+BEGIN_SRC makefile :tangle makefile
dmd_rel: expunge skel tangle
	$(DUB) --compiler=dmd --config=sdp-release
dmd_rel_tangle: tangle
	$(DUB) --compiler=dmd --config=sdp-dmd
dmd_rel_expunge_tangle: expunge skel tangle dmd_rel_tangle
dmd_debug_tangle: tangle
	$(DUB) --compiler=dmd --config=sdp-dmd-debug
#+END_SRC

****** gdc                                                         :gdc:
******* quick                                                   :quick:
******** default                                             :default:

#+BEGIN_SRC makefile :tangle makefile
gdc:
	$(DUB) --compiler=gdc --config=sdp-gdc
#+END_SRC

******** version                                             :version:

#+BEGIN_SRC makefile :tangle makefile
gdc_ver:
	$(DUB) --compiler=gdc --config=sdp-gdc-version
	mv bin/sdp-gdc-ver bin/sdp-gdc-$(PROJECT_VERSION)
	notify-send -t 0 'D gdc compiled test release executable ready' 'sdp-gdc-$(PROJECT_VERSION)'
gdc_clean_ver: clean tangle gdc_ver
#+END_SRC

******** debug                                                 :debug:

#+BEGIN_SRC makefile :tangle makefile
gdc_debug:
	$(DUB) --compiler=gdc --config=sdp-gdc-debug
#+END_SRC

******* clean & tangle                                   :clean:tangle:

#+BEGIN_SRC makefile :tangle makefile
gdc_rel: expunge skel tangle
	$(DUB) --compiler=gdc --config=sdp-release
gdc_rel_tangle: tangle
	$(DUB) --compiler=gdc --config=sdp-gdc
gdc_rel_expunge_tangle: expunge skel tangle gdc_rel_tangle
gdc_debug_tangle: tangle
	$(DUB) --compiler=gdc --config=sdp-gdc-debug
#+END_SRC

****** ldc                                                         :ldc:
******* quick                                                   :quick:
******** default                                             :default:

#+BEGIN_SRC makefile :tangle makefile
ldc:
	$(DUB) --compiler=ldc2 --config=sdp-ldc
#+END_SRC

******** version                                             :version:

#+BEGIN_SRC makefile :tangle makefile
ldc_ver:
	$(DUB) --compiler=ldc2 --config=sdp-ldc-version
	mv bin/sdp-ldc-ver bin/sdp-ldc-$(PROJECT_VERSION)
	notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-ldc-$(PROJECT_VERSION)'
ldc_clean_ver: clean tangle ldc_ver
#+END_SRC

******** debug                                                 :debug:

#+BEGIN_SRC makefile :tangle makefile
ldc_debug:
	$(DUB) --compiler=ldc2 --config=sdp-ldc-debug
#+END_SRC

******* clean & tangle                                   :clean:tangle:

#+BEGIN_SRC makefile :tangle makefile
ldc_rel: expunge skel tangle
	$(DUB) --compiler=ldc2 --config=sdp-release
ldc_rel_tangle: tangle
	$(DUB) --compiler=ldc2 --config=sdp-ldc
ldc_rel_expunge_tangle: expunge skel tangle ldc_rel_tangle
ldc_debug_tangle: tangle
	$(DUB) --compiler=ldc2 --config=sdp-ldc-debug
#+END_SRC

***** generic
****** init clean distclean etc.                                 :clean:

#+BEGIN_SRC makefile :tangle makefile
skel:
	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/meta; \
	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/conf; \
	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME)/output; \
	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME); \
	mkdir -p $(PRG_BINDIR);
init: skel
clean:
	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 $(PRG_SRCDIR); \
	rm -rf $(PRG_BINDIR); \
	rm -rf $(PRG_DOCDIR);
distclean: expunge
distclean_and_init: expunge
	mkdir -p $(PRG_SRCDIR)/$(PRG_NAME); \
	mkdir -p $(PRG_BINDIR);
#+END_SRC

****** version                                                 :version:

#+BEGIN_SRC makefile :tangle makefile
ver:
	echo sdp-$(PROJECT_VERSION)
#+END_SRC

****** tangle build rebuild                         :clean:tangle:build:

#+BEGIN_SRC makefile :tangle 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

**** _reggae_ build                                                 :reggae:

#+BEGIN_SRC makefile :tangle makefile
ragga:
	reggae -b binary
	reggae -b ninja
	build
#+END_SRC

#+BEGIN_SRC makefile
ragga:
	reggae -b binary && reggae -b ninja && build
#+END_SRC

*** testrun (program against document markup)
**** pods
****** find files

#+BEGIN_SRC makefile :tangle makefile
find_pods:
	$(SiSU_MARKUP_SAMPLES_FIND_PODS)
#+END_SRC

***** dmd
****** find files

#+BEGIN_SRC makefile :tangle makefile
dmd_testrun_find:
	./bin/sdp-dmd -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod \
data/sisupod/sisu-manual
dmd_testrun_find_pod_source:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
./bin/sdp-ldc -v --source --html --epub \
--output-dir=tmp/program_output_pod
dmd_testrun_find_pod_sisupod:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
./bin/sdp-dmd -v --sisupod \
--output-dir=tmp/program_output_pod
dmd_testrun_find_pod_html:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
./bin/sdp-dmd -v --html \
--output-dir=tmp/program_output_pod
dmd_testrun_find_pod_epub:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
./bin/sdp-dmd -v --epub \
--output-dir=tmp/program_output_pod
dmd_testrun_find_pod_all:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
./bin/sdp-dmd -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod
#+END_SRC

****** path list

#+BEGIN_SRC makefile :tangle makefile
dmd_testrun_paths_pod_source:
	./bin/sdp-dmd -v --source \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
dmd_testrun_paths_pod_sisupod:
	./bin/sdp-dmd -v --sisupod \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
dmd_testrun_paths_pod_html:
	./bin/sdp-dmd -v --html \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
dmd_testrun_paths_pod_epub:
	./bin/sdp-dmd -v --epub \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
dmd_testrun_paths_pod_all:
	./bin/sdp-dmd -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
#+END_SRC

***** gdc
****** find files

#+BEGIN_SRC makefile :tangle makefile
gdc_testrun_find:
	./bin/sdp-gdc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod \
data/sisupod/sisu-manual
gdc_testrun_find_pod_source:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
./bin/sdp-gdc -v --source \
--output-dir=tmp/program_output_pod
gdc_testrun_find_pod_sisupod:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
./bin/sdp-gdc -v --sisupod \
--output-dir=tmp/program_output_pod
gdc_testrun_find_pod_html:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
./bin/sdp-gdc -v --html \
--output-dir=tmp/program_output_pod
gdc_testrun_find_pod_epub:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
./bin/sdp-gdc -v --epub \
--output-dir=tmp/program_output_pod
gdc_testrun_find_pod_all:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
./bin/sdp-gdc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod
#+END_SRC

****** path list

#+BEGIN_SRC makefile :tangle makefile
gdc_testrun_paths:
	./bin/sdp-gdc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod \
data/sisupod/sisu-manual
gdc_testrun_paths_pod_source:
	./bin/sdp-gdc -v --source \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
gdc_testrun_paths_pod_sisupod:
	./bin/sdp-gdc -v --sisupod \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
gdc_testrun_paths_pod_html:
	./bin/sdp-gdc -v --html \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
gdc_testrun_paths_pod_epub:
	./bin/sdp-gdc -v --epub \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
gdc_testrun_paths_pod_all:
	./bin/sdp-gdc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
#+END_SRC

***** ldc
****** find files

#+BEGIN_SRC makefile :tangle makefile
ldc_testrun_find:
	./bin/sdp-ldc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod \
data/sisupod/sisu-manual
ldc_testrun_find_pod_source:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
	./bin/sdp-ldc -v --source \
--output-dir=tmp/program_output_pod
ldc_testrun_find_pod_sisupod:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
	./bin/sdp-ldc -v --sisupod \
--output-dir=tmp/program_output_pod
ldc_testrun_find_pod_html:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
	./bin/sdp-ldc -v --html \
--output-dir=tmp/program_output_pod
ldc_testrun_find_pod_epub:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
	./bin/sdp-ldc -v --epub \
--output-dir=tmp/program_output_pod
ldc_testrun_find_pod_all:
	$(SiSU_MARKUP_SAMPLES_PODS_FOUND) \
	./bin/sdp-ldc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod
#+END_SRC

****** path list

#+BEGIN_SRC makefile :tangle makefile
ldc_testrun_paths:
	./bin/sdp-ldc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod \
data/sisupod/sisu-manual
ldc_testrun_paths_pod_source:
	./bin/sdp-ldc -v --source \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
ldc_testrun_paths_pod_sisupod:
	./bin/sdp-ldc -v --sisupod \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
ldc_testrun_paths_pod_html:
	./bin/sdp-ldc -v --html \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
ldc_testrun_paths_pod_epub:
	./bin/sdp-ldc -v --epub \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
ldc_testrun_paths_pod_all:
	./bin/sdp-ldc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_pod \
$(SiSU_MARKUP_SAMPLES_POD)
#+END_SRC

**** dir
***** dmd
****** find files

#+BEGIN_SRC makefile :tangle makefile
dmd_testrun_find_dir_source:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-dmd -v --source \
--output-dir=tmp/program_output_dir
dmd_testrun_find_dir_sisupod:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-dmd -v --sisupod \
--output-dir=tmp/program_output_dir
dmd_testrun_find_dir_html:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-dmd -v --html \
--output-dir=tmp/program_output_dir
dmd_testrun_find_dir_epub:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-dmd -v --epub \
--output-dir=tmp/program_output_dir
dmd_testrun_find_dir_all:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-dmd -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_dir
#+END_SRC

****** file list

#+BEGIN_SRC makefile :tangle makefile
dmd_testrun_filelist_dir_source:
	./bin/sdp-dmd -v --source \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
dmd_testrun_filelist_dir_sisupod:
	./bin/sdp-dmd -v --sisupod \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
dmd_testrun_filelist_dir_html:
	./bin/sdp-dmd -v --html \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
dmd_testrun_filelist_dir_epub:
	./bin/sdp-dmd -v --epub \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
dmd_testrun_filelist_dir_all:
	./bin/sdp-dmd -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
#+END_SRC

***** gdc
****** find files

#+BEGIN_SRC makefile :tangle makefile
gdc_testrun_find_dir_source:
	./bin/sdp-gdc -v --source \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
gdc_testrun_find_dir_sisupod:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-gdc -v --sisupod \
--output-dir=tmp/program_output_dir
gdc_testrun_find_dir_html:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-gdc -v --html \
--output-dir=tmp/program_output_dir
gdc_testrun_find_dir_epub:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-gdc -v --epub \
--output-dir=tmp/program_output_dir
gdc_testrun_find_dir_all:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-gdc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_dir
#+END_SRC

****** file list

#+BEGIN_SRC makefile :tangle makefile
gdc_testrun_filelist_dir_source:
	./bin/sdp-gdc -v --source \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
gdc_testrun_filelist_dir_sisupod:
	./bin/sdp-gdc -v --sisupod \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
gdc_testrun_filelist_dir_html:
	./bin/sdp-gdc -v --html \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
gdc_testrun_filelist_dir_epub:
	./bin/sdp-gdc -v --epub \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
gdc_testrun_filelist_dir_all:
	./bin/sdp-gdc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
#+END_SRC

***** ldc
****** find files

#+BEGIN_SRC makefile :tangle makefile
ldc_testrun_find_dir_source:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-ldc -v --source \
--output-dir=tmp/program_output_dir
ldc_testrun_find_dir_sisupod:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-ldc -v --sisupod \
--output-dir=tmp/program_output_dir
ldc_testrun_find_dir_html:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-ldc -v --html \
--output-dir=tmp/program_output_dir
ldc_testrun_find_dir_epub:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-ldc -v --epub \
--output-dir=tmp/program_output_dir
ldc_testrun_find_dir_all:
	$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/sdp-ldc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_dir
#+END_SRC

****** file list

#+BEGIN_SRC makefile :tangle makefile
ldc_testrun_filelist_dir_source:
	./bin/sdp-ldc -v --source \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
ldc_testrun_filelist_dir_sisupod:
	./bin/sdp-ldc -v --sisupod \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
ldc_testrun_filelist_dir_html:
	./bin/sdp-ldc -v --html \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
ldc_testrun_filelist_dir_epub:
	./bin/sdp-ldc -v --epub \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
ldc_testrun_filelist_dir_all:
	./bin/sdp-ldc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
--output-dir=tmp/program_output_dir \
$(SiSU_MARKUP_SAMPLES_DIR)
#+END_SRC

*** org babel tangle batch process command                         :tangle:
**** tangle: org babel tangle *.org

#+BEGIN_SRC makefile :tangle makefile
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
#+END_SRC

**** tangle maker: org babel tangle maker.org, makefile new

#+BEGIN_SRC makefile :tangle makefile
tangle_maker:
	for f in $(ORGFILELIST); do \
		ORGFILES="\"maker.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
#+END_SRC

*** git snapshot

#+BEGIN_SRC makefile :tangle makefile
gitsnapshot: distclean tangle
	git commit -a
#+END_SRC

** phony                                                             :phony:

#+BEGIN_SRC makefile :tangle makefile
.PHONY : all build rebuild debug release \
	distclean init \
	tangle gitsnapshot
#+END_SRC

* dub.sdl                                                    :dub:sdl:config:
Every DUB package should contain a [[http://code.dlang.org/package-format?lang=json][dub.json]] (or [[http://code.dlang.org/package-format?lang=sdl][dub.sdl]])
** header (including dependencies)                                  :header:

#+BEGIN_SRC sh  :tangle dub.sdl
name                "sdp"
description         "sisu document parser"
homepage            "http://sisudoc.org"
authors             "Ralph Amissah"
copyright           "Copyright © 2016 Ralph Amissah"
license             "AGPL-3+"
targetPath          "./bin"
#sourcePath          "./src/sdp"
stringImportPaths   "./views"
buildRequirements   "allowWarnings"
dependency          "toml"         version="~>0.4.0-rc.2" # https://code.dlang.org/packages/toml          https://github.com/toml-lang/toml/wiki
dependency          "toml:json"    version="~>0.4.0-rc.2"
dependency          "d2sqlite3"    version="~>0.16.1"     # https://code.dlang.org/packages/d2sqlite3     http://biozic.github.io/d2sqlite3/d2sqlite3.html
  subconfiguration  "d2sqlite3"   "all-included"
dependency          "archive"      version="~>0.6.0"      # http://code.dlang.org/packages/archive        https://github.com/rcythr/archive
dependency          "imageformats" version="~>7.0.0"      # https://code.dlang.org/packages/imageformats  https://github.com/lgvz/imageformats
#+END_SRC

** generic                                                         :generic:
*** build (sdp)                                                   :release:

#+BEGIN_SRC sh
configuration "build" {
  name                 "build"
  targetType           "executable"
  platforms            "posix"
  targetName           "bin/sdp"
  dflags               "-J=views" "-I=src/sdp"
  buildOptions         "verbose" "releaseMode" "optimize" "inline"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D release executable ready' 'sdp'"
}
#+END_SRC

*** reggae build (sdp)                                            :release:

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "reggae" {
  name                 "build"
  targetType           "executable"
  platforms            "posix"
  targetName           "bin/sdp-rg"
  dflags               "-J=views" "-I=src/sdp"
  buildOptions         "verbose" "releaseMode" "optimize" "inline"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D release executable ready' 'sdp-rg'"
}
#+END_SRC

*** sdp-release (sdp)                                             :release:

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-release" {
  name                 "release"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp"
  dflags               "-J=views" "-I=src/sdp"
  buildOptions         "verbose" "releaseMode" "optimize" "inline"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D release executable ready' 'sdp'"
}
#+END_SRC

** dmd                                                                 :dmd:
*** sdp-dmd                                                       :default:
**** sdp-dmd

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-dmd" {
  name                 "dmd"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-dmd"
  dflags               "-J=views" "-I=src/sdp"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "inline" # "optimize" # "releaseMode"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-dmd'"
}
#+END_SRC

**** sdp-dmd-version

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-dmd-version" {
  name                 "dmd"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-dmd-ver"
  dflags               "-J=views" "-I=src/sdp"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "optimize" "inline" # "releaseMode"
}
#+END_SRC

**** sdp-dmd-release

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-dmd-release" {
  name                 "dmd"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-dmd"
  dflags               "-J=views" "-I=src/sdp"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "optimize" "inline" "releaseMode"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-dmd'"
}
#+END_SRC

*** sdp-dmd-debug                                                   :debug:
**** sdp-dmd-debug

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-dmd-debug" {
  name                 "debuging"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-dmd-debug"
  dflags               "-g" "-J=views" "-I=src/sdp"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "debugMode" "debugInfo" "optimize"
  debugVersions        "checkdoc" "summary"
  debugVersions        "dumpdoc"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-dmd-debug'"
}
#+END_SRC


** ldc                                                                 :ldc:
*** sdp-ldc                                                       :default:
**** sdp-ldc

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-ldc" {
  name                 "ldc"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-ldc"
  dflags               "-O2" "-J=views" "-I=src/sdp"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "optimize" "inline" # "releaseMode"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-ldc'"
}
#+END_SRC

**** sdp-ldc-version

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-ldc-version" {
  name                 "ldc"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-ldc-ver"
  dflags               "-O2" "-J=views" "-I=src/sdp"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "optimize" "inline" # "releaseMode"
}
#+END_SRC

**** sdp-ldc-release

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-ldc-release" {
  name                 "ldc"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-ldc"
  dflags               "-O2" "-J=views" "-I=src/sdp"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "optimize" "inline" "releaseMode"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-ldc'"
}
#+END_SRC

*** sdp-ldc-debug                                                   :debug:
**** sdp-ldc-debug

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-ldc-debug" {
  name                 "debuging"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-ldc-debug"
  dflags               "-g" "-J=views" "-I=src/sdp"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "debugMode" "debugInfo" "optimize"
  debugVersions        "checkdoc" "summary"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-ldc-debug'"
}
#+END_SRC

** gdc                                                                 :gdc:
*** sdp-gdc                                                       :default:
**** sdp-gdc

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-gdc" {
  name                 "gdc"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-gdc"
  dflags               "-O2" "-J=views" "-I=src/sdp"
  lflags               "-lz"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "optimize" "inline" # "releaseMode"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D gdc compiled test release executable ready' 'sdp-gdc'"
}
#+END_SRC

**** sdp-gdc-version

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-gdc-version" {
  name                 "gdc"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-gdc-ver"
  dflags               "-O2" "-J=views" "-I=src/sdp"
  lflags               "-lz"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "optimize" "inline" # "releaseMode"
}
#+END_SRC

**** sdp-gdc-release

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-gdc-release" {
  name                 "gdc"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-gdc"
  dflags               "-O2" "-J=views" "-I=src/sdp"
  lflags               "-lz"
  buildRequirements    "allowWarnings"
  buildOptions         "verbose" "optimize" "inline" "releaseMode"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D gdc compiled test release executable ready' 'sdp-gdc'"
}
#+END_SRC

*** sdp-gdc-debug                                                   :debug:
**** sdp-gdc-debug

#+BEGIN_SRC sh  :tangle dub.sdl
configuration "sdp-gdc-debug" {
  name                 "debuging"
  targetType           "executable"
  platforms            "posix"
  targetName           "sdp-gdc-debug"
  dflags               "-O2" "-fbuiltin" "-Wall" "-Werror" "-Wformat=2" "-g" "-J=views" "-I=src/sdp"
  lflags               "-lz"
  buildOptions         "verbose" "debugMode" "debugInfo" "optimize"
  debugVersions        "checkdoc" "summary"
  postGenerateCommands "/usr/bin/notify-send -t 0 'D gdc compiled (debug with -g) executable ready' 'sdp-gdc-debug'"
}
#+END_SRC

* reggaefile.d                                                       :reggae:

#+BEGIN_SRC d  :tangle reggaefile.d
import reggae;
alias _compile = dubDefaultTarget!(CompilerFlags("-g -O"));
alias _dub_conf = dubConfigurationTarget!(Configuration("reggae"));
mixin build!(_compile, _dub_conf);
#+END_SRC

* .gitignore                                                      :gitignore:

#+BEGIN_SRC sh :tangle .gitignore
# git ls-files --others --exclude-from=.git/info/exclude
#./.dub/**
*
!.gitignore
!makefile
!version.txt
!dub*.json
!dub.sdl
!tangle
!*.org
!*.d
!*.txt
!conf.sdl
!org
!src
!src/*
!data
!data/*
!data/sisupod/**
!data/sisudir/**
!*.sst
!*.ssm
!**/*.sst
!**/*.ssm
!sisupod.manifest
!sisu_document_make
!config_local_site
!sisu_document_make.toml
!config_local_site.toml
!sisudoc
!views
!docs/*.html
.dub/**
.reggae/**
tmp/**
*_.org
*_.d
*_.txt
*_
*~
\#*
*.\#*
#!*/
#*~
#\#*
#*.\#*
#+END_SRC

* sh script to batch process _emacs org babel tangle_     :shell_script:tangle:
  [[http://orgmode.org/manual/Batch-execution.html]]
creates a shell batch script called "tangle", that will tangle (emacs org
babel tangle) org files in ./org/ to create .d source files in ./src/sdp/
(similar functionality is contained within the "makefile" created by this
"maker.org" file make tangle)

#+BEGIN_SRC sh :tangle tangle :tangle-mode (identity #o755) :shebang #!/bin/sh
# -*- mode: shell-script -*-
# tangle files with org-mode
DIR=`pwd`
ORGFILES=""
EMACSLISP=/usr/share/emacs/site-lisp
ORG_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-???????? | cut -d '-' -f2`)
EMACSLISP_ORG=~/.emacs.d/elpa/org-$($(shell echo $(ORG_VER_AVAILABLE)))
ORG_CONTRIB_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-plus-???????? | cut -d '-' -f2`)
EMACSLISP_ORG_CONTRIB=~/.emacs.d/elpa/org-plus-contrib-$($(shell echo $(ORG_CONTRIB_VER_AVAILABLE)))
# wrap each argument in the code required to call tangle on it
for i in $@; do
  ORGFILES="$ORGFILES \"$i\""
done
emacs --batch -Q -q \
--eval "(progn
(add-to-list 'load-path (expand-file-name \"$EMACSLISP\"))
(add-to-list 'load-path (expand-file-name \"$EMACSLISP_ORG\" t))
(add-to-list 'load-path (expand-file-name \"$EMACSLISP_ORG_CONTRIB\" t))
(require 'org)(require 'ob)(require 'ob-tangle)
(mapc (lambda (file)
  (find-file (expand-file-name file \"$DIR\"))
  (setq-local org-src-preserve-indentation t)
  (org-babel-tangle)
  (kill-buffer)) '($ORGFILES)))" 2>&1 #|grep tangled
#+END_SRC

* __END__
** build
*** dub

#+BEGIN_SRC sh  :tangle no
dub build -h
#+END_SRC

#+BEGIN_SRC sh
time (dub --compiler=dmd --config=sdp-dmd --debug=steps)
time (dub --compiler=ldc2 --config=sdp-ldc --debug=steps)
time (dub --compiler=gdc --config=sdp-gdc --debug=steps)

time (dub --compiler=ldc2 --config=sdp-ldc --debug=checkdoc --debug=summary --debug=dumpdoc)
time (dub --compiler=ldc2 --config=sdp-ldc --debug=io)
time (dub --compiler=ldc2 --config=sdp-ldc --debug=checkdoc --debug=summary --debug=dumpdoc --debug=io)
time (dub --compiler=ldc2 --config=sdp-ldc-debug --debug=io)
time (dub --compiler=gdc --config=sdp-gdc-debug --debug=io)
time (dub --compiler=dmd --config=sdp-dmd-debug --debug=io)
#+END_SRC

*** make

#+BEGIN_SRC sh
time make dmd
time make gdc
time make ldc
time make gdc ldc
time make all
time make all_ver
time make dmd_ver ldc_ver gdc_ver

time make ragga

time make restart
time make restart ldc
time make tangle ldc

time make ldc_testrun_find_pod_epub
#+END_SRC

*** reggae

touch src/sdp/sdp.d

#+BEGIN_SRC sh
reggae -b binary && reggae -b ninja && build
#+END_SRC

#+BEGIN_SRC sh
reggae -b binary && build
reggae -b ninja && build
# reggae -b ninja --dc=dmd && build
reggae -b binary --dc=ldmd2 && build
reggae -b ninja --dc=ldmd2 && build
# reggae -b ninja --dc=gdc && build
reggae -b binary --dc=gdmd && build
reggae -b ninja --dc=gdmd && build
#+END_SRC

see/try: dub describe

**** issues
issue with ldc2
reggae -b ninja --dc ldc2 && build
https://github.com/atilaneves/reggae/issues/29
use ldmd2
reggae -b ninja --dc ldmd2 && build
https://stackoverflow.com/questions/35515138/ldc2-vs-ldmd2-whats-the-difference

issue with gdc
reggae -b ninja --dc gdc && build

** dub zfunc                                                         :zfunc:
*** ,dubdmd                                                           :dmd:

#+BEGIN_SRC sh  :tangle no
time dub --compiler=dmd -v --force
#+END_SRC

*** ,dubldc                                                           :ldc:

#+BEGIN_SRC sh  :tangle no
time dub --compiler=ldc2 -v --force
#+END_SRC

*** ,dubgdc                                                           :gdc:

#+BEGIN_SRC sh  :tangle no
time dub --compiler=gdc -v --force
#+END_SRC

** git
*** project version

echo $(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g')

*** what files changed
git whatchanged --since="1 day ago" --oneline --name-only --pretty=format: | sort -u
git log --since="1 day ago" --name-only --pretty=format: | sort -u

** test run
*** e.g.
time (./bin/sdp-ldc --source --html -v --output-dir=tmp/program-output data/sisupod/sisu-manual/media/text/en/sisu_markup.sst )

time (./bin/sdp-ldc --source --html -v --output-dir=tmp/program-output data/sisupod/sisu-manual )
time (./bin/sdp-ldc --source --html -v --output-dir=tmp/program-output data/sisupod/the_wealth_of_networks.yochai_benkler )
time (./bin/sdp-ldc --source --html -v --output-dir=tmp/program-output data/sisupod/live-manual )

time (~sdp2/bin/sdp-ldc --sisupod --source --html --epub --sqlite-create --sqlite-update -v sisudoc/media/text/en/sisu_markup_stress_test.sst sisudoc/media/text/en/the_wealth_of_networks.yochai_benkler.sst )

can point to directory containing sisudoc.txt file (listing which files to process)

time (~sdp2/bin/sdp-ldc --html -v sisudoc)
# will process source files listed in sisudoc.txt for appropriate files and dir structure

e.g. live-manual a multilingual document (with source file inserts .ssi)

time (~sdp2/bin/sdp-ldc --html --lang=en,es -v sisudoc)

time ( find data/sisupod -name sisupod.manifest | sort | xargs ./bin/sdp-ldc --source --html --epub -v --output-dir=tmp/program-output )

time ( find data/sisupod -maxdepth 2 -name sisupod.manifest | sort | xargs ./bin/sdp-ldc --source --html --epub -v --output-dir=tmp/program-output )
time ( find data/sisudir/media/text -name *.ss[tm] | sort | xargs ./bin/sdp-ldc --source --html --epub -v --output-dir=tmp/program-output )

find data/sisupod -maxdepth 2 -name sisupod.manifest | sort | xargs

find data/sisudir/media/text -name *.ss[tm] | sort | xargs

*** list markup files
find data/sisupod -name sisupod.manifest | sort
find data/sisudir/media/text -name *.ss[tm] | sort

time make ldc_testrun_paths_pod_sisupod
time make ldc_testrun_paths_pod_sisupod | ag "^\".+\"|NOT found"
time make ldc_testrun_find_pod_sisupod
time make ldc_testrun_find_dir_sisupod
time make ldc_testrun_filelist_dir_sisupod
** misc
*** compilers

- [X] Set D_COMPILER (one of DMD LDC or GDC)
- [X] Set debug flags (using DMD standard flag -deb

[[http://wiki.dlang.org/Compilers][D Compilers wiki https://wiki.dlang.org/Compilers]]
[[http://dlang.org/download.html][D Compilers download http://dlang.org/download.html]]

*** dub                                                               :dub:

https://github.com/dlang/dub/
http://code.dlang.org/getting_started
http://code.dlang.org/docs/commandline

**** setup
***** dub json or sdlang

Every DUB package should contain a [[http://code.dlang.org/package-format?lang=json][dub.json]] or [[http://code.dlang.org/package-format?lang=sdl][dub.sdl]]
https://code.dlang.org/package-format?lang=sdl
https://code.dlang.org/packages/sdlang-d
https://github.com/Abscissa/SDLang-D/blob/master/HOWTO.md

https://code.dlang.org/docs/commandline

***** dub dependencies

dub list
dub upgrade
dub fetch sdlang-d
dub fetch taggedalgebraic
dub fetch libinputvisitor
dub fetch unit-threaded ?
dub fetch reggae

sdp ~master: /home/ralph/grotto/repo/git.repo/utils/sdp-x/
/home/ralph/.dub/packages/*

**** build
***** debug flags

#+BEGIN_SRC sh
biblio
biblio_sorted
bibliosorted
block
bookindex
bookindexmatch
bookindexraw
check
checkdoc
code
comment
dumpdoc                    write out document contents, with object type and ocn
endnotes
endnotes_build
footnotes
footnotesdone
group
header
header_and_content
header1
headerjson
headermakejson
headermetadatajson
heading
headings
headingsfound
insert
io
munge
node
objectrelated1
objectrelated2
objects
ocnoff
para
parabullet
parabulletindent
paraindent
paraindenthang
parent
poem
quote
raw
sdlang
source
srclines
structattrib
summary
table
toc
#+END_SRC