blob: a441ef900f0f1b6742b73f5c15c402b098ea7c91 [file] [log] [blame]
swissChili35558852022-07-02 18:15:45 -07001#!/bin/sh
2
3# Jay MaKe
4
5dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
6root="$(dirname $dir)"
7jmkscript="$root/share/jmk/jmk.tcl"
8options=""
9
10disable_gtags=false
11
12while getopts "hD:" arg; do
13 case $arg in
14 h) echo "Please read the JMK manual for more information." ;;
15 D) options="$options $(echo $OPTARG | sed 's/=/ /')" ;;
16 ?) echo "Invalid argument"
17 exit 1 ;;
18 esac
19done
20
21echo "$options"
22
23for file in $(find -name Jmk2); do
24 echo "$file" > /dev/stderr
25 outdir="$(dirname $file)"
26 cat - $file << EOF | tclsh - $options > "$outdir/Makefile"
27source {$root/share/jmk/jmk.tcl}
28set root {$root}
29set jmk_build_cmd {$0}
30set jmk_build_dir {$(pwd)}
31cd {$outdir}
32array set options {$options}
33EOF
34done