summaryrefslogtreecommitdiff
path: root/OMakefile
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2014-03-02 13:04:10 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2018-12-02 21:09:41 +0100
commitbac5f9243816fe47eee2bc6a3296d9b3d4e9fc1c (patch)
tree9dc582c95a8ffabe5742a616aab96f806f3c6cd0 /OMakefile
parent6f347f84dfcf6f2ea862426c242160ecece453c6 (diff)
downloadcontext-rst-bac5f9243816fe47eee2bc6a3296d9b3d4e9fc1c.tar.gz
add testenv rule to OMakefile
Diffstat (limited to 'OMakefile')
-rw-r--r--OMakefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/OMakefile b/OMakefile
index 45f3ad2..4749e59 100644
--- a/OMakefile
+++ b/OMakefile
@@ -1,4 +1,4 @@
-.PHONY: all install clean nuke buildenv ctan ctan-root tds tds-hier usage doc
+.PHONY: all install clean nuke buildenv ctan ctan-root tds tds-hier usage doc testenv
name = rst
@@ -38,6 +38,7 @@ doc_tmpdir = $(build_root)/doc-tmp
tds_hier[] = $(doc_tree) $(tex_tree) $(script_tree) $(ifc_tree) $(src_tree)
tds_dirnames[] = doc scripts tex
tds_dirs[] = $(addprefix $(build_root)/,$(tds_dirnames))
+test_dir = ./testing
dirs[] = $(build_root) $(ctan_root) $(tds_hier)
@@ -73,6 +74,8 @@ section
echo
echo " doc create module manual"
echo
+ echo " testenv create development environment in $(test_dir)"
+ echo
echo " clean remove temporary files"
echo " nuke remove all created files"
echo
@@ -86,9 +89,21 @@ tds-hier:
buildenv: ctan-root tds-hier
+testenv:
+ echo ":: creating test environment in $(test_dir)"
+ mkdir(-p $(test_dir))
+ ## beware the foreach() syntax trap:
+ ## http://lists.metaprl.org/pipermail/omake/2013-July/002253.html
+ foreach(file, $(glob $(src_dir)/*))
+ symlink($(file), $(test_dir)/$(basename $(file)))
+ foreach(file, $(filter-out %OMakefile %.omc, $(glob $(doc_dir)/*)))
+ symlink($(file), $(test_dir)/$(basename $(file)))
+ foreach(file, $(glob $(misc_dir)/*))
+ symlink($(file), $(test_dir)/$(basename $(file)))
+
## nuke -- remove the entire build directory and packaged files
nuke:
- $(rm -rf -- $(build_root) $(pkgs))
+ $(rm -rf -- $(build_root) $(pkgs) $(test_dir))
## clean -- leave the build directory, documentation and tarballs intact
clean: .PHONY/$(doc_tmpdir)/clean