diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2023-04-29 19:08:52 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2023-04-29 23:31:27 -0400 |
commit | d7930ad07cb9e511928b13e8d37015a56b6341b4 (patch) | |
tree | 41a19297c5d2b099f3378af7ef65cfdf66c194eb /makefile | |
parent | html search form action (for index & text results) (diff) |
nix dev + update direnv 2.2.1 => 2.3.0
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 128 |
1 files changed, 78 insertions, 50 deletions
@@ -1,3 +1,4 @@ +include .envrc-local 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 @@ -49,13 +50,15 @@ data/pod/two_bits.christopher_kelty \ data/pod/un_contracts_international_sale_of_goods_convention_1980 \ data/pod/viral_spiral.david_bollier Date := `date "+%Y%m%d"` -SpineBIN := "$${SpineBIN}" # './result/bin' -SpineOUT := "$${SpineOUT}" # '/srv/www/spine' -SpinePOD := "$${SpinePOD}" # '~/grotto/repo/git.repo/projects/doc-reform/data/markup/spine-samples/markup/pod' -SpineSearchActionLocal := 'http://localhost/spine_search' -SpineSearchActionRemote := 'https://sisudoc.org/spine_search' -SpineCGIform := 'spine_search' -SpineSQLdb := 'spine.search.db' +#SpineBIN := $(SpineBIN) # './result/bin' +#SpineOUT := $(SpineOUT) # '/srv/www/spine' +#SpinePOD := $(SpinePOD) # '~/grotto/repo/git.repo/projects/doc-reform/data/markup/spine-samples/markup/pod' +#SpineSearchActionLocal := $(SpineSearchActionLocal) # 'http://localhost/spine_search' +#SpineSearchActionRemote := $(SpineSearchActionRemote) # 'https://sisudoc.org/spine_search' +#SpineCGIform := $(SpineCGIform) # 'spine_search' +#SpineSQLdb := $(SpineSQLdb) # 'spine.search.db' +#SpineCGIbin := $(SpineCGIbin) # '/var/www/cgi/cgi-bin' +#SpineDBpath := "$(SpineDBpath)" # '/var/www/sqlite' hwd := `pwd` gwd := `pwd` + "/src/ext_depends" deps := "`ls -gx './src/ext_depends'`" @@ -80,6 +83,9 @@ nix-devshell: echo -ne '\n❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell"\n\n❯❯ nix build ".#default" --print-build-logs\n❯❯ nix build ".#spine-dmd" --print-build-logs\n❯❯ nix build ".#spine-ldc" --print-build-logs\n❯❯ nix build ".#spine-gdc" --print-build-logs\n\n'; \ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" +# nix build +build: nix-build-default + nix-build-default: nix build ".#default" --print-build-logs @@ -139,58 +145,80 @@ org-tangle: org-tangle *.org; \ cd - +# output local +out-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) \ + --sqlite-update --sqlite-db-filename=$(SpineSQLdb) \ + --curate \ + --output=$(SpineOUT) $(SpinePOD)/* + +# output remote +out-remote: + $(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=$(SpineSearchActionRemote) \ + --sqlite-update --sqlite-db-filename="$(SpineSQLdb)" \ + --curate \ + --output=$(SpineOUT) $(SpinePOD)/* + # epub output out-epub: - $${SpineBIN}/spine -v \ - --epub --output=$${SpineOUT} $${SpinePOD}/* + $(SpineBIN)/spine -v \ + --epub --output=$(SpineOUT) $(SpinePOD)/* # html output with local search links out-html: - $${SpineBIN}/spine -v --generated-by \ + $(SpineBIN)/spine -v --generated-by \ --curate \ - --html --html-link-search --html-link-curate --cgi-url-action="$${SpineSearchActionLocal}" \ - --output=$${SpineOUT} $${SpinePOD}/* + --html --html-link-search --html-link-curate --cgi-url-action=$(SpineSearchActionLocal) \ + --output=$(SpineOUT) $(SpinePOD)/* # latex output out-latex: - $${SpineBIN}/spine -v \ + $(SpineBIN)/spine -v \ --latex \ - --output=$${SpineOUT} $${SpinePOD}/* + --output=$(SpineOUT) $(SpinePOD)/* # odf output out-odf: - $${SpineBIN}/spine -v \ + $(SpineBIN)/spine -v \ --odf \ - --output=$${SpineOUT} $${SpinePOD}/* + --output=$(SpineOUT) $(SpinePOD)/* # sqlite output out-sqlite: - $${SpineBIN}/spine -v \ - --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \ - --output=$${SpineOUT} $${SpinePOD}/* + $(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 \ + $(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}" \ + --cgi-sqlite-search-filename=$(SpineCGIform) --cgi-url-action=$(SpineSearchActionLocal) \ --curate \ - --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \ - --output=$${SpineOUT} $${SpinePOD}/* + --sqlite-update --sqlite-db-filename="$(SpineSQLdb)" \ + --output=$(SpineOUT) $(SpinePOD)/* # generate markup sample output with remote search links output-samples-remote: - $${SpineBIN}/spine -v \ + $(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}" \ + --cgi-sqlite-search-filename=$(SpineCGIform) --cgi-url-action=$(SpineSearchActionRemote) \ --curate \ - --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \ - --output=$${SpineOUT} $${SpinePOD}/* + --sqlite-update --sqlite-db-filename=$(SpineSQLdb) \ + --output=$(SpineOUT) $(SpinePOD)/* # generate markup sample output with local search links output-samples: output-samples-local @@ -321,36 +349,36 @@ org-e: # show markup pod source selections markup: - ls -1 --color=always $${SpinePOD} - ls -1 -d --color=always $${SpinePOD}/*/ + 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 + 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 + 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 +# 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 + exa -alT --git -I'*_' --color=always -L5 $(SpineSearchCGI)/src $(SpineSearchCGI)/views | less -R # show markup files markup-files: - cd $${SpinePOD}; \ + cd $(SpinePOD); \ find . -type f -iname "*sst"; \ cd -; \ - echo $${SpinePOD} -# find $${SpinePOD}/. -type f -iname "*sst" + echo $(SpinePOD) +# find $(SpinePOD)/. -type f -iname "*sst" # preview markup files vim markup-files-vi: - cd $${SpinePOD}; \ + cd $(SpinePOD); \ fd --max-depth 5 --type file -g "*.ss?" | sort \ | fzf \ --preview='bat --color "always" {}' \ @@ -360,7 +388,7 @@ markup-files-vi: # preview markup files emacs markup-files-e: - cd $${SpinePOD}; \ + cd $(SpinePOD); \ fd --max-depth 5 --type file -g "*.ss?" | sort \ | fzf \ --preview='bat --color "always" {}' \ @@ -380,21 +408,21 @@ markup-samples: markup-pod-samples markup-file-samples # markup samples pod manifests markup-pod-samples: - echo "$${SpinePOD}"; \ - find $${SpinePOD} -name pod.manifest | sort + echo $(SpinePOD); \ + find $(SpinePOD) -name pod.manifest | sort -#find $${SpinePOD} -name pod.manifest | sed -E 's:.+?(([/][^/]+){2})$:\1:' +#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 + echo $(SpinePOD); \ + find $(SpinePOD) -name *.ss[tm] | sort # 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 ; \ + 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 @@ -700,12 +728,12 @@ 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) +build-dc: $${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 +rebuild: $${PRG_SRCDIR}/$${PRG_SRC} $${PRG_BINDIR}/$${PRG_BIN}.o clean build makefile_new: make -k tangle_maker |