From bac5f9243816fe47eee2bc6a3296d9b3d4e9fc1c Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 2 Mar 2014 13:04:10 +0100 Subject: add testenv rule to OMakefile --- OMakefile | 19 +++++++++++++++++-- 1 file 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 -- cgit v1.2.3