blob: c22e9cf1aa22132f658f4206211c30e5def93c81 [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
swissChili9b46c902022-07-10 15:48:46 -070021echo "Options: {$options }"
swissChili35558852022-07-02 18:15:45 -070022
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}
swissChili9b46c902022-07-10 15:48:46 -070033source {$root/share/jmk/multiplat.jmk}
swissChili35558852022-07-02 18:15:45 -070034EOF
35done