aboutsummaryrefslogtreecommitdiffhomepage
path: root/maker.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2015-10-21 22:31:29 -0400
committerRalph Amissah <ralph@amissah.com>2015-10-21 22:31:29 -0400
commit0b29a38b468d644b4945ac680d7858073aadc9f5 (patch)
treebc9ab78222fa15a52269db2518db107368defc0f /maker.org
parentmaker.org touch (diff)
maker.org tangle
Diffstat (limited to 'maker.org')
-rw-r--r--maker.org55
1 files changed, 39 insertions, 16 deletions
diff --git a/maker.org b/maker.org
index 519ddea..2da61e5 100644
--- a/maker.org
+++ b/maker.org
@@ -15,7 +15,8 @@
** settings [+2]
*** alternative compilers [+1]
**** dmd
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
DMD=dmd
DMD_FLAGS=-de -w
DMD_FLAGS_RELEASE=-release
@@ -23,7 +24,8 @@ DMD_FLAG_BINOF=-of
#+end_src
**** ldc2
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
LDC=ldc2
LDC_FLAGS=-w
LDC_FLAGS_RELEASE=-release
@@ -31,7 +33,8 @@ LDC_FLAG_BINOF=-of=
#+end_src
**** gdc
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
GDC=gdc
#GDC=gdc-5
GDC_FLAGS=
@@ -46,7 +49,8 @@ Set flags:
**** SET compiler: "SET_D_COMPILER=":
Set D_COMPILER one of DMD LDC or GDC e.g.:
SET_D_COMPILER=DMD
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
# set D_COMPILER one of DMD LDC or GDC:
SET_D_COMPILER=LDC
@@ -54,13 +58,15 @@ SET_D_COMPILER=LDC
**** SET debug flags: "SET_DC_FLAGS_DEBUG_EXTRA=-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
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
SET_DC_FLAGS_DEBUG_EXTRA=-debug=headings -debug=bookindex
#+end_src
*** compiler settings [+1]
**** compiler settings
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
DC=$($(SET_D_COMPILER))
DC_FLAGS=$($(shell echo $(SET_D_COMPILER)_FLAGS))
DC_FLAGS_RELEASE=$($(shell echo $(SET_D_COMPILER)_FLAGS_RELEASE))
@@ -71,7 +77,8 @@ DC_FLAGS_DEBUG_SET=\
#+end_src
**** compiler conditional settings
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
ifeq ($(DC), $(DMD))
DC_FLAGS_DEBUG :=$(shell echo $(DC_FLAGS_DEBUG_SET))
endif
@@ -84,7 +91,8 @@ endif
#+end_src
*** program name
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
PRG_NAME=sdp
PRG_SRC=$(PRG_NAME).d
PRG_SRCDIR=./lib/$(PRG_NAME)
@@ -93,7 +101,8 @@ PRG_BINDIR=bin
#+end_src
*** emacs org settings
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
# ORG
EMACSLISP=/usr/share/emacs/site-lisp
EMACSLISP_ORG=~/.emacs.d/elpa/org-20151005
@@ -106,7 +115,8 @@ ORGDIR=$(shell echo `pwd`)
** make commands [+2]
*** build commands [+1]
**** build rebuild
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
all: build
build: $(PRG_SRCDIR)/$(PRG_SRC)
@@ -117,7 +127,8 @@ build: $(PRG_SRCDIR)/$(PRG_SRC)
rebuild: $(PRG_SRCDIR)/$(PRG_SRC) $(PRG_BINDIR)/$(PRG_BIN).o clean build
#+end_src
**** debug
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
debug: $(PRG_SRCDIR)/$(PRG_SRC)
$(DC) $(DC_FLAGS) $(DC_FLAGS_DEBUG) \
@@ -140,7 +151,8 @@ debug_gdc: $(PRG_SRCDIR)/$(PRG_SRC)
$(PRG_SRCDIR)/$(PRG_SRC)
#+end_src
**** release
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
release: distclean_and_init tangle $(PRG_SRCDIR)/$(PRG_SRC)
$(DC) $(DC_FLAGS) $(DC_FLAGS_RELEASE) \
@@ -149,7 +161,8 @@ release: distclean_and_init tangle $(PRG_SRCDIR)/$(PRG_SRC)
#+end_src
*** init clean distclean etc.
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
init:
mkdir -p $(PRG_SRCDIR); \
mkdir -p $(PRG_BINDIR);
@@ -169,7 +182,8 @@ distclean_and_init: init $(PRG_BINDIR) expunge
#+end_src
*** org babel tangle batch process command
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
tangle:
for f in $(ORGFILELIST); do \
ORGFILES="$$ORGFILES \"$$f\""; \
@@ -191,13 +205,15 @@ tangle:
#+end_src
*** git snapshot
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
gitsnapshot: distclean_and_init tangle
git commit -a
#+end_src
** phony
-#+BEGIN_SRC makefile :tangle makefile
+#+name: makefile
+#+BEGIN_SRC makefile :exports none
.PHONY : all build rebuild debug release \
clean distclean init \
tangle
@@ -229,3 +245,10 @@ emacs --batch -Q -q \
(org-babel-tangle)
(kill-buffer)) '($ORGFILES)))" 2>&1 #|grep tangled
#+end_src
+
+* tangle
+** makefile: :makefile:
+#+name: tangle_ao_rgx
+#+BEGIN_SRC makefile :tangle makefile :exports none :noweb yes
+<<makefile>>
+#+end_src