aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/spine_build_scaffold.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/spine_build_scaffold.org')
-rw-r--r--org/spine_build_scaffold.org242
1 files changed, 175 insertions, 67 deletions
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org
index c18b599..542e8e3 100644
--- a/org/spine_build_scaffold.org
+++ b/org/spine_build_scaffold.org
@@ -7,6 +7,7 @@
#+COPYRIGHT: Copyright (C) 2015 - 2020 Ralph Amissah
#+LANGUAGE: en
#+STARTUP: content hideblocks hidestars noindent entitiespretty
+#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t
#+PROPERTY: header-args :exports code
#+PROPERTY: header-args+ :noweb yes
#+PROPERTY: header-args+ :eval no
@@ -14,27 +15,86 @@
#+PROPERTY: header-args+ :cache no
#+PROPERTY: header-args+ :padline no
-[[./org/spine.org][spine.org]] [[./org/][org/]]
+[[./spine.org][spine.org]] [[../org/][org/]]
+[[./spine_info.org][spine_info.org]]
* makefile :makefile:
+** tangle
+
+#+BEGIN_SRC makefile :tangle ../makefile
+<<makefile_var_0>>
+<<makefile_var_1>>
+<<makefile_var_2>>
+<<makefile_var_3>>
+<<makefile_var_4>>
+<<makefile_var_5>>
+<<makefile_a_0>>
+<<makefile_a_1>>
+<<makefile_a_2>>
+<<makefile_b_0>>
+<<makefile_b_1>>
+<<makefile_b_2>>
+<<makefile_b_3>>
+<<makefile_b_4>>
+<<makefile_meson>>
+<<makefile_c_0>>
+<<makefile_c_1>>
+<<makefile_c_2>>
+<<makefile_dmd_0>>
+<<makefile_dmd_1>>
+<<makefile_dmd_2>>
+<<makefile_dmd_3>>
+<<makefile_gdc_0>>
+<<makefile_gdc_1>>
+<<makefile_gdc_2>>
+<<makefile_gdc_3>>
+<<makefile_ldc_0>>
+<<makefile_ldc_1>>
+<<makefile_ldc_2>>
+<<makefile_ldc_3>>
+<<makefile_d_0>>
+<<makefile_d_1>>
+<<makefile_d_2>>
+<<makefile_testrun_0>>
+<<makefile_testrun_1>>
+<<makefile_testrun_2>>
+<<makefile_testrun_3>>
+<<makefile_testrun_4>>
+<<makefile_testrun_5>>
+<<makefile_testrun_6>>
+<<makefile_testrun_7>>
+<<makefile_testrun_8>>
+<<makefile_testrun_9>>
+<<makefile_testrun_10>>
+<<makefile_testrun_11>>
+<<makefile_testrun_12>>
+<<makefile_tangle_0>>
+<<makefile_tangle_1>>
+<<makefile_git_snapshot>>
+<<makefile_phony>>
+#+END_SRC
+
** settings [+2] :settings:
*** git version stamp :git:version:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_var_0
+#+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'`)
#+END_SRC
*** dub (build tool) :dub:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_var_1
+#+BEGIN_SRC makefile
DUB=dub
DUB_FLAGS=-v --force --compiler=
#+END_SRC
*** Project Details :project:spine:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_var_2
+#+BEGIN_SRC makefile
PRG_NAME=doc-reform
PRG_NICKAME=spine
PRG_NAME_DIR=$(shell echo `echo $(PRG_NAME) | sed -e "s/-/_/g"`)
@@ -47,7 +107,8 @@ PRG_DOCDIR=./docs
*** Emacs Org settings :settings:emacs:org:tangle:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_var_3
+#+BEGIN_SRC 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)))
@@ -61,7 +122,8 @@ ORGDIR :=$(shell echo `pwd`)
*** Markup Samples
**** pods
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_var_4
+#+BEGIN_SRC makefile
SiSU_MARKUP_SAMPLES_FIND_PODS= \
find data/pod -maxdepth 2 -name pod.manifest | cut -f 1-3 -d / | sort
@@ -96,7 +158,8 @@ data/pod/viral_spiral.david_bollier
**** dir
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_var_5
+#+BEGIN_SRC makefile
SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND = \
find data/sisudir/media/text -name *.ss[tm] | sort | xargs
@@ -129,6 +192,27 @@ data/sisudir/media/text/un_contracts_international_sale_of_goods_convention_1980
data/sisudir/media/text/viral_spiral.david_bollier.sst
#+END_SRC
+******* sample markup file list
+
+#+NAME: makefile_a_0
+#+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
+#+END_SRC
+
+#+NAME: makefile_a_1
+#+BEGIN_SRC makefile
+markup_pod_samples:
+ find data/pod -name pod.manifest | cut -f 1-3 -d / | sort
+#+END_SRC
+
+#+NAME: makefile_a_2
+#+BEGIN_SRC makefile
+markup_dir_samples:
+ find data/sisudir/media/text -name *.ss[tm] | sort
+#+END_SRC
+
** _make_ commands [+2] :make:commands:
- build commands
@@ -152,49 +236,36 @@ data/sisudir/media/text/viral_spiral.david_bollier.sst
****** all builds
******* default
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_b_0
+#+BEGIN_SRC makefile
dub_upgrade:
$(DUB) upgrade
#+END_SRC
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_b_1
+#+BEGIN_SRC makefile
default: ldc
#+END_SRC
-******* sample markup file list
-
-#+BEGIN_SRC makefile :tangle ../makefile
-markup_samples:
- find data/pod -name pod.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/pod -name pod.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
+#+NAME: makefile_b_2
+#+BEGIN_SRC makefile
all: dmd ldc gdc
#+END_SRC
******** version :version:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_b_3
+#+BEGIN_SRC makefile
all_ver: dmd_ver ldc_ver gdc_ver
#+END_SRC
******** debug :debug:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_b_4
+#+BEGIN_SRC makefile
all_debug: dmd_debug gdc_debug ldc_debug
#+END_SRC
@@ -204,7 +275,8 @@ meson using dub
- works & looks pretty clean
- but subprojects built externally & not suitable for debian packaging
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_meson
+#+BEGIN_SRC makefile
meson_clean_build_dir:
rm -r build; mkdir build
meson_build: meson_clean_build_dir
@@ -219,19 +291,22 @@ meson: meson_clean_build_dir dub_upgrade meson_build
******* clean & tangle :clean:tangle:
******** default :default:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_c_0
+#+BEGIN_SRC makefile
all_clean: clean tangle dmd ldc gdc
#+END_SRC
******** version :version:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_c_1
+#+BEGIN_SRC makefile
all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver
#+END_SRC
******** debug :debug:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_c_2
+#+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
@@ -241,7 +316,8 @@ all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver
******* quick :quick:
******** default :default:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_dmd_0
+#+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'
@@ -249,7 +325,8 @@ dmd: dub_upgrade
******** debug :debug:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_dmd_1
+#+BEGIN_SRC makefile
dmd_debug:
$(DUB) --compiler=dmd --config=dmd --build=debug
#+END_SRC
@@ -258,7 +335,8 @@ dmd_debug:
- assumes git tags with program version
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_dmd_2
+#+BEGIN_SRC makefile
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
@@ -268,7 +346,8 @@ dmd_clean_ver: clean tangle dmd_ver
******* clean & tangle :clean:tangle:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_dmd_3
+#+BEGIN_SRC makefile
dmd_rel: expunge skel tangle
$(DUB) --compiler=dmd --config=spine-release
dmd_rel_tangle: tangle
@@ -282,7 +361,8 @@ dmd_debug_tangle: tangle
******* quick :quick:
******** default :default:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_gdc_0
+#+BEGIN_SRC makefile
gdc: dub_upgrade
$(DUB) --compiler=gdc --config=gdc
notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc'
@@ -290,7 +370,8 @@ gdc: dub_upgrade
******** debug :debug:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_gdc_1
+#+BEGIN_SRC makefile
gdc_debug:
$(DUB) --compiler=gdc --config=gdc --build=debug
#+END_SRC
@@ -299,7 +380,8 @@ gdc_debug:
- assumes git tags with program version
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_gdc_2
+#+BEGIN_SRC makefile
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
@@ -309,7 +391,8 @@ gdc_clean_ver: clean tangle gdc_ver
******* clean & tangle :clean:tangle:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_gdc_3
+#+BEGIN_SRC makefile
gdc_rel: expunge skel tangle
$(DUB) --compiler=gdc --config=spine-release
gdc_rel_tangle: tangle
@@ -323,7 +406,8 @@ gdc_debug_tangle: tangle
******* quick :quick:
******** default :default:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_ldc_0
+#+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'
@@ -331,7 +415,8 @@ ldc: dub_upgrade
******** debug :debug:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_ldc_1
+#+BEGIN_SRC makefile
ldc_debug:
$(DUB) --compiler=ldc2 --config=ldc --build=debug
#+END_SRC
@@ -340,7 +425,8 @@ ldc_debug:
- assumes git tags with program version
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_ldc_2
+#+BEGIN_SRC makefile
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
@@ -350,7 +436,8 @@ ldc_clean_ver: clean tangle ldc_ver
******* clean & tangle :clean:tangle:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_ldc_3
+#+BEGIN_SRC makefile
ldc_rel: expunge skel tangle
$(DUB) --compiler=ldc2 --config=spine-release
ldc_rel_tangle: tangle
@@ -363,7 +450,8 @@ ldc_debug_tangle: tangle
***** generic
****** init clean distclean etc. :clean:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_d_0
+#+BEGIN_SRC makefile
reinit: clean skel tangle
skel:
mkdir -p $(PRG_BINDIR); \
@@ -420,14 +508,16 @@ distclean_and_init: expunge
****** version :version:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_d_1
+#+BEGIN_SRC makefile
ver:
echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)
#+END_SRC
****** tangle build rebuild :clean:tangle:build:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_d_2
+#+BEGIN_SRC makefile
clean_tangle_build: clean tangle build
tangle_build: tangle build
build: $(PRG_SRCDIR)/$(PRG_SRC)
@@ -444,7 +534,8 @@ restart: clean tangle
**** pods
****** find files
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_0
+#+BEGIN_SRC makefile
find_pods:
$(SiSU_MARKUP_SAMPLES_FIND_PODS)
#+END_SRC
@@ -452,7 +543,8 @@ find_pods:
***** dmd
****** find files
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_1
+#+BEGIN_SRC makefile
dmd_testrun_find:
./bin/spine-dmd -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -483,7 +575,8 @@ dmd_testrun_find_pod_all:
****** path list
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_2
+#+BEGIN_SRC makefile
dmd_testrun_paths_pod_source:
./bin/spine-dmd -v --source \
--output-dir=tmp/program_output_pod \
@@ -510,7 +603,8 @@ $(SiSU_MARKUP_SAMPLES_POD)
***** gdc
****** find files
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_3
+#+BEGIN_SRC makefile
gdc_testrun_find:
./bin/spine-gdc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -541,7 +635,8 @@ gdc_testrun_find_pod_all:
****** path list
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_4
+#+BEGIN_SRC makefile
gdc_testrun_paths:
./bin/spine-gdc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -573,7 +668,8 @@ $(SiSU_MARKUP_SAMPLES_POD)
***** ldc
****** find files
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_5
+#+BEGIN_SRC makefile
ldc_testrun_find:
./bin/spine-ldc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -604,7 +700,8 @@ ldc_testrun_find_pod_all:
****** path list
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_6
+#+BEGIN_SRC makefile
ldc_testrun_paths:
./bin/spine-ldc -v --source --html --epub --sqlite-discrete \
--sqlite-create --sqlite-update \
@@ -637,7 +734,8 @@ $(SiSU_MARKUP_SAMPLES_POD)
***** dmd
****** find files
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_7
+#+BEGIN_SRC makefile
dmd_testrun_find_dir_source:
$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/spine-dmd -v --source \
@@ -663,7 +761,8 @@ dmd_testrun_find_dir_all:
****** file list
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_8
+#+BEGIN_SRC makefile
dmd_testrun_filelist_dir_source:
./bin/spine-dmd -v --source \
--output-dir=tmp/program_output_dir \
@@ -690,7 +789,8 @@ $(SiSU_MARKUP_SAMPLES_DIR)
***** gdc
****** find files
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_9
+#+BEGIN_SRC makefile
gdc_testrun_find_dir_source:
./bin/spine-gdc -v --source \
--output-dir=tmp/program_output_dir \
@@ -716,7 +816,8 @@ gdc_testrun_find_dir_all:
****** file list
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_10
+#+BEGIN_SRC makefile
gdc_testrun_filelist_dir_source:
./bin/spine-gdc -v --source \
--output-dir=tmp/program_output_dir \
@@ -743,7 +844,8 @@ $(SiSU_MARKUP_SAMPLES_DIR)
***** ldc
****** find files
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_11
+#+BEGIN_SRC makefile
ldc_testrun_find_dir_source:
$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
./bin/spine-ldc -v --source \
@@ -769,7 +871,8 @@ ldc_testrun_find_dir_all:
****** file list
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_testrun_12
+#+BEGIN_SRC makefile
ldc_testrun_filelist_dir_source:
./bin/spine-ldc -v --source \
--output-dir=tmp/program_output_dir \
@@ -796,7 +899,8 @@ $(SiSU_MARKUP_SAMPLES_DIR)
*** org babel tangle batch process command :tangle:
**** tangle: org babel tangle *.org
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_tangle_0
+#+BEGIN_SRC makefile
tangle: skel
for f in $(ORGFILELIST); do \
ORGFILES="$$ORGFILES \"$$f\""; \
@@ -819,7 +923,8 @@ tangle: skel
**** tangle maker: org babel tangle maker.org, makefile new
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_tangle_1
+#+BEGIN_SRC makefile
tangle_maker:
for f in $(ORGFILELIST); do \
ORGFILES="\"org/dr_build_scaffold.org\""; \
@@ -842,14 +947,16 @@ tangle_maker:
*** git snapshot
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_git_snapshot
+#+BEGIN_SRC makefile
gitsnapshot: distclean tangle
git commit -a
#+END_SRC
** phony :phony:
-#+BEGIN_SRC makefile :tangle ../makefile
+#+NAME: makefile_phony
+#+BEGIN_SRC makefile
.PHONY : all build rebuild debug release \
distclean init \
tangle gitsnapshot
@@ -1406,8 +1513,9 @@ tinyendian_dep = declare_dependency(
#./.dub/**
*
!.gitignore
+!README.md
!COPYRIGHT
-!README
+!CHANGELOG
!makefile
!version.txt
!dub.json