aboutsummaryrefslogtreecommitdiffhomepage
path: root/maker.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2015-10-20 21:55:11 -0400
committerRalph Amissah <ralph@amissah.com>2015-10-20 23:10:37 -0400
commit4c6c9216390f7dee4552846ee17f2bcb3402b43c (patch)
tree15750b24ed5cda482908fad4cfad73f7477423a2 /maker.org
parentliterate programming introduced, tangle not yet run (diff)
.d files made, emacs org babel tangle run on .org files
Diffstat (limited to 'maker.org')
-rw-r--r--maker.org46
1 files changed, 45 insertions, 1 deletions
diff --git a/maker.org b/maker.org
index 7711605..dc42a45 100644
--- a/maker.org
+++ b/maker.org
@@ -12,6 +12,9 @@
#+TAGS: Amissah(A) Class(c) WEB(W) noexport(n)
* makefile :makefile:
+** settings
+*** alternative compilers
+**** dmd
#+BEGIN_SRC makefile :tangle makefile
#DMD=dmd
DMD=dmd
@@ -19,12 +22,20 @@ DMD_FLAGS=-de -w
DMD_FLAGS_DEBUG=-unittest -debug=checkdoc -debug=summary
DMD_FLAGS_RELEASE=-release
DMD_FLAG_BINOF=-of
+
+#+end_src
+**** ldc
+#+BEGIN_SRC makefile :tangle makefile
#LDC=ldc2
LDC=ldc2
LDC_FLAGS=-w
LDC_FLAGS_DEBUG=-unittest -d-debug=checkdoc -d-debug=summary
LDC_FLAGS_RELEASE=-release
LDC_FLAG_BINOF=-of=
+
+#+end_src
+**** gdc
+#+BEGIN_SRC makefile :tangle makefile
#GDC=gdc
GDC=gdc
#GDC=gdc-5
@@ -32,6 +43,14 @@ GDC_FLAGS=
GDC_FLAGS_DEBUG=-fdebug=checkdoc -fdebug=summary
GDC_FLAGS_RELEASE=-frelease
GDC_FLAG_BINOF=-o
+
+#+end_src
+*** set compiler
+one line to edit
+ D_COMPILER=DMD
+ D_COMPILER=LDC
+ D_COMPILER=GDC
+#+BEGIN_SRC makefile :tangle makefile
## D_COMPILER=DMD
## D_COMPILER=LDC
## D_COMPILER=GDC
@@ -41,11 +60,19 @@ DC_FLAGS=$($(shell echo $(D_COMPILER)_FLAGS))
DC_FLAGS_DEBUG=$($(shell echo $(D_COMPILER)_FLAGS_DEBUG))
DC_FLAGS_RELEASE=$($(shell echo $(D_COMPILER)_FLAGS_RELEASE))
DC_FLAG_BINOF=$($(shell echo $(D_COMPILER)_FLAG_BINOF))
+
+#+end_src
+*** program name
+#+BEGIN_SRC makefile :tangle makefile
PRG_NAME=sdp
PRG_SRC=$(PRG_NAME).d
PRG_SRCDIR=./lib/$(PRG_NAME)
PRG_BIN=$(PRG_NAME)
PRG_BINDIR=bin
+
+#+end_src
+*** emacs org settings
+#+BEGIN_SRC makefile :tangle makefile
# ORG
EMACSLISP=/usr/share/emacs/site-lisp
EMACSLISP_ORG=~/.emacs.d/elpa/org-20151005
@@ -54,6 +81,10 @@ ORGFILELIST=$(shell echo `ls -1 maker.org org/*.org`)
ORGFILES=""
ORGDIR=$(shell echo `pwd`)
+#+end_src
+** make commands
+*** build commands
+#+BEGIN_SRC makefile :tangle makefile
all: build
build: $(PRG_SRCDIR)/$(PRG_SRC)
@@ -88,6 +119,9 @@ release: distclean_and_init tangle $(PRG_SRCDIR)/$(PRG_SRC)
$(DC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \
$(PRG_SRCDIR)/$(PRG_SRC)
+#+end_src
+*** init clean distclean etc.
+#+BEGIN_SRC makefile :tangle makefile
init:
mkdir -p $(PRG_SRCDIR); \
mkdir -p $(PRG_BINDIR);
@@ -105,6 +139,9 @@ distclean_and_init: init $(PRG_BINDIR) expunge
mkdir -p $(PRG_SRCDIR); \
mkdir -p $(PRG_BINDIR);
+#+end_src
+*** org babel tangle batch process command
+#+BEGIN_SRC makefile :tangle makefile
tangle:
for f in $(ORGFILELIST); do \
ORGFILES="$$ORGFILES \"$$f\""; \
@@ -124,14 +161,21 @@ tangle:
(org-babel-tangle) \
(kill-buffer)) '($$ORGFILES)))" 2>&1
+#+end_src
+*** git snapshot
+#+BEGIN_SRC makefile :tangle makefile
gitsnapshot: distclean_and_init tangle
git commit -a
+#+end_src
+** phony
+#+BEGIN_SRC makefile :tangle makefile
.PHONY : all build rebuild debug release \
clean distclean init \
tangle
+
#+end_src
-* emacs org babel tangle :tangle:
+* sh script to batch process emacs org babel tangle :tangle:
[http://orgmode.org/manual/Batch-execution.html]
#+BEGIN_SRC sh :tangle tangle :tangle-mode (identity #o755) :shebang #!/bin/sh
# -*- mode: shell-script -*-