summaryrefslogtreecommitdiff
path: root/OMakefile
diff options
context:
space:
mode:
Diffstat (limited to 'OMakefile')
-rw-r--r--OMakefile34
1 files changed, 27 insertions, 7 deletions
diff --git a/OMakefile b/OMakefile
index 00955a3..45f3ad2 100644
--- a/OMakefile
+++ b/OMakefile
@@ -14,8 +14,11 @@ misc_dir = ./misc
lua_src[] = $(glob $(src_dir)/rst_*.lua)
tex_src = $(src_dir)/t-rst.mkiv
script_src = $(src_dir)/mtx-t-rst.lua
+ifc_src = $(misc_dir)/t-rst.xml
-doc_src[] = $(glob $(doc_dir)/*)
+meta_files[] = README.rst COPYING
+build_files[] = OMakeroot OMakefile $(doc_dir)/OMakefile
+doc_src[] = $(filter-out OMakefile, $(glob $(doc_dir)/*))
###############################################################################
# DIRECTORIES
@@ -27,10 +30,12 @@ doc_src[] = $(glob $(doc_dir)/*)
build_root = ./build
doc_tree = $(build_root)/doc/context/third/$(name)
tex_tree = $(build_root)/tex/context/third/$(name)
+ifc_tree = $(build_root)/tex/context/interface/third
+src_tree = $(build_root)/source/context/$(name)/
script_tree = $(build_root)/scripts/context/lua/third/$(name)
ctan_root = $(build_root)/$(name)
doc_tmpdir = $(build_root)/doc-tmp
-tds_hier[] = $(doc_tree) $(tex_tree) $(script_tree)
+tds_hier[] = $(doc_tree) $(tex_tree) $(script_tree) $(ifc_tree) $(src_tree)
tds_dirnames[] = doc scripts tex
tds_dirs[] = $(addprefix $(build_root)/,$(tds_dirnames))
@@ -43,6 +48,9 @@ dirs[] = $(build_root) $(ctan_root) $(tds_hier)
ctan_zipfile = $(name).zip
tds_zipfile = $(name).tds.zip
+manual_name = manual
+manual_pdf = $(doc_tmpdir)/$(manual_name).pdf
+
ctan_zip = $(build_root)/$(ctan_zipfile)
tds_zip = $(build_root)/$(tds_zipfile)
pkgs = $(ctan_zip) $(tds_zip)
@@ -56,10 +64,15 @@ section
usage:
echo "****************************** $(name) ******************************"
echo
+ echo " $(name) is distributed under the 2-clause BSD license. See the file"
+ echo " COPYING in the root tree of this repository for details."
+ echo
echo "defined targets:"
echo " ctan package for CTAN"
echo " tds package as TDS directory hierarchy"
echo
+ echo " doc create module manual"
+ echo
echo " clean remove temporary files"
echo " nuke remove all created files"
echo
@@ -90,12 +103,16 @@ ctan: $(ctan_zip)
## PDF documentation
doc: .PHONY/$(doc_tmpdir)/manual
-$(tds_zip): tds-hier
+$(tds_zip): doc tds-hier
$(echo $(name)> packaging as $@ with TDS directories)
- cp($(lua_src) $(tex_tree))
- cp($(tex_src) $(tex_tree))
- cp($(script_src) $(script_tree))
- cp($(doc_src) $(doc_tree))
+ cp($(lua_src) $(tex_tree))
+ cp($(tex_src) $(tex_tree))
+ cp($(script_src) $(script_tree))
+ cp($(doc_src) $(doc_tree))
+ cp($(manual_pdf) $(doc_tree))
+ cp($(ifc_src) $(ifc_tree))
+ cp($(meta_files) $(src_tree))
+ cp($(build_files) $(src_tree))
cd $(build_root) && zip -9 -r ./$(tds_zipfile) $(tds_dirnames)
$(ctan_zip): ctan-root $(tds_zip)
@@ -104,6 +121,9 @@ $(ctan_zip): ctan-root $(tds_zip)
cp($(script_src) $(ctan_root))
cp($(tex_src) $(ctan_root))
cp($(doc_src) $(ctan_root))
+ cp($(manual_pdf) $(ctan_root))
+ cp($(ifc_src) $(ctan_root))
+ cp($(meta_files) $(ctan_root))
cd $(build_root) && zip -9 -r ./$(ctan_zipfile) $(name) $(tds_zipfile)
.DEFAULT: usage