Project

General

Profile

1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/util.run
3
.rel ../sh/local.sh
4
.rel ../sh/datasrc.sh
5

    
6
if self_not_included; then
7

    
8
: "${schema="$(log+ 2 cd "$top_dir"/..; basename "$PWD")"}"
9
: "${subdir="$(log+ 2 cd "$top_dir"   ; basename "$PWD")"}"
10
export schema subdir
11
dir2schema
12

    
13
subdir_make()
14
# requires Makefile in datasrc dir with `include ../input.Makefile`
15
# target names are relative to the subdir itself, not the datasrc dir
16
{
17
	echo_func
18
	set -- "${@/#/$subdir/}" # replace empty str at start (/#) with $subdir/
19
	set -- "${@/%/${remake:+-remake}}" # replace empty str at end (/%)
20
	make --directory="$(canon_rel_path "$top_dir"/..)" "$@"
21
}
22

    
23
fi
(14-14/18)