aboutsummaryrefslogtreecommitdiffhomepage
path: root/maker.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-03-04 15:06:34 -0500
committerRalph Amissah <ralph@amissah.com>2016-03-04 15:06:34 -0500
commit41139a3438a6dfd3f52ed4cd3e0e7e70ffb01f96 (patch)
tree69928566afe2294edcbb115e809b3a1417bb4dbf /maker.org
parentsorting (diff)
track
Diffstat (limited to 'maker.org')
-rw-r--r--maker.org39
1 files changed, 29 insertions, 10 deletions
diff --git a/maker.org b/maker.org
index c718f84..144e04a 100644
--- a/maker.org
+++ b/maker.org
@@ -3,20 +3,20 @@
#+EMAIL: ralph.amissah@gmail.com
#+STARTUP: indent
#+LANGUAGE: en
-#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t
+#+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
-#+OPTIONS: ^:nil _:nil#+OPTIONS: ^:nil _:nil
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
-#+FILETAGS: :sdp_dev:makefile:
+#+FILETAGS: :sdp:rel:makefile:
#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
* sdp makefile
-[[./org/sdp.org][sdp.org]]
+[[./org/sdp.org][sdp.org]] [[./org/][org/]]
** settings [+2] :settings:
*** alternative D compilers [+1] :compiler:
**** dmd :dmd:
+
#+BEGIN_SRC makefile :padline no :tangle makefile
DMD=dmd
DMD_FLAGS=-de -w
@@ -25,6 +25,7 @@ DMD_FLAG_BINOF=-of
#+END_SRC
**** ldc2 :ldc:
+
#+BEGIN_SRC makefile :tangle makefile
LDC=ldc2
LDC_FLAGS=-w
@@ -33,6 +34,7 @@ LDC_FLAG_BINOF=-of=
#+END_SRC
**** gdc :gdc:
+
#+BEGIN_SRC makefile :tangle makefile
GDC=gdc
#GDC=gdc-5
@@ -41,13 +43,15 @@ GDC_FLAGS_RELEASE=-frelease
GDC_FLAG_BINOF=-o
#+END_SRC
-*** set/select: ~D compiler~ & ~debug flags~ [+1] [2/2] :select:
+*** TODO set/select: ~D compiler~ & ~debug flags~ [+1] [2/2] :select:
- [X] Set D_COMPILER (one of DMD LDC or GDC)
- [X] Set debug flags (using DMD standard flag -debug=)
+
**** SET compiler: "SET_D_COMPILER=": :compiler:select:
[[http://wiki.dlang.org/Compilers][D Compilers wiki]]
[[http://dlang.org/download.html][D Compilers download]]
Set D_COMPILER one of DMD LDC or GDC e.g.: SET_D_COMPILER=DMD
+
#+BEGIN_SRC makefile :tangle makefile
# SET_D_COMPILER=(one of: DMD LDC or GDC):
SET_D_COMPILER=LDC
@@ -56,12 +60,14 @@ SET_D_COMPILER=LDC
**** SET debug flags: "SET_DC_FLAGS_DEBUG_EXTRA=-debug=": :compiler:flags:debug:
Set debug flags using DMD standard flag -debug= e.g.:
SET_DC_FLAGS_DEBUG_EXTRA=-debug=headings -debug=bookindex
+
#+BEGIN_SRC makefile :tangle makefile
SET_DC_FLAGS_DEBUG_EXTRA=-debug=headings -debug=footnotes -debug=endnotes
#+END_SRC
*** D compiler settings [+1] :settings:compiler:
**** compiler settings
+
#+BEGIN_SRC makefile :tangle makefile
DC=$($(SET_D_COMPILER))
DC_FLAGS=$($(shell echo $(SET_D_COMPILER)_FLAGS))
@@ -73,6 +79,7 @@ DC_FLAGS_DEBUG_SET=\
#+END_SRC
**** compiler conditional settings (depending on selected D compiler)
+
#+BEGIN_SRC makefile :tangle makefile
ifeq ($(DC), $(DMD))
DC_FLAGS_DEBUG :=$(shell echo $(DC_FLAGS_DEBUG_SET))
@@ -86,6 +93,7 @@ endif
#+END_SRC
*** Project Details :project:sdp:
+
#+BEGIN_SRC makefile :tangle makefile
PRG_NAME=sdp
PRG_SRC=$(PRG_NAME).d
@@ -94,7 +102,8 @@ PRG_BIN=$(PRG_NAME)
PRG_BINDIR=bin
#+END_SRC
-*** Emacs Org settings :settings:emacs:org:
+*** Emacs Org settings :settings:emacs:org:tangle:
+
#+BEGIN_SRC makefile :tangle makefile
# ORG
EMACSLISP=/usr/share/emacs/site-lisp
@@ -121,8 +130,9 @@ ORGDIR=$(shell echo `pwd`)
- git snapshot
- gitsnapshot
-*** build commands [+1]
+*** build commands [+1] :build:compile:
**** build rebuild
+
#+BEGIN_SRC makefile :tangle makefile
all: build
@@ -135,6 +145,7 @@ rebuild: $(PRG_SRCDIR)/$(PRG_SRC) $(PRG_BINDIR)/$(PRG_BIN).o clean build
#+END_SRC
**** debug
+
#+BEGIN_SRC makefile :tangle makefile
debug: $(PRG_SRCDIR)/$(PRG_SRC)
$(DC) $(DC_FLAGS) $(DC_FLAGS_DEBUG) \
@@ -158,6 +169,7 @@ debug_gdc: $(PRG_SRCDIR)/$(PRG_SRC)
#+END_SRC
**** release
+
#+BEGIN_SRC makefile :tangle makefile
release: distclean_and_init tangle $(PRG_SRCDIR)/$(PRG_SRC)
$(DC) $(DC_FLAGS) $(DC_FLAGS_RELEASE) \
@@ -165,7 +177,8 @@ release: distclean_and_init tangle $(PRG_SRCDIR)/$(PRG_SRC)
$(PRG_SRCDIR)/$(PRG_SRC)
#+END_SRC
-*** init clean distclean etc.
+*** init clean distclean etc. :clean:
+
#+BEGIN_SRC makefile :tangle makefile
init:
mkdir -p $(PRG_SRCDIR); \
@@ -185,7 +198,8 @@ distclean_and_init: init $(PRG_BINDIR) expunge
mkdir -p $(PRG_BINDIR);
#+END_SRC
-*** Org Babel Tangle batch process command
+*** Org Babel Tangle batch process command :tangle:
+
#+BEGIN_SRC makefile :tangle makefile
tangle:
for f in $(ORGFILELIST); do \
@@ -208,12 +222,14 @@ tangle:
#+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 \
@@ -222,7 +238,10 @@ gitsnapshot: distclean_and_init tangle
* 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 ./lib/sdp/ (similar functionality is contained within the "makefile" created by this "maker.org" file make tangle)
+creates a shell batch script called "tangle", that will tangle (emacs org
+babel tangle) org files in ./org/ to create .d source files in ./lib/sdp/
+(similar functionality is contained within the "makefile" created by this
+"maker.org" file make tangle)
#+BEGIN_SRC sh :tangle tangle :padline no :tangle-mode (identity #o755) :shebang #!/bin/sh
# -*- mode: shell-script -*-