blob: ef6d05702a879beef77bc781a7a69f8803e2e957 [file] [log] [blame]
swissChili2b5acc82021-03-13 17:06:42 -08001#!/bin/sh
2
3# Jay MaKe
4
swissChili4418ca52021-06-14 17:36:00 -07005dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
6root="$(dirname $dir)"
swissChili2b5acc82021-03-13 17:06:42 -08007jmkscript="$root/share/jmk/jmk.m4"
8
swissChilid98781b2021-07-25 21:04:17 -07009disable_gtags=false
10
11while getopts "Gh" arg; do
12 case $arg in
13 G) gen_gtags=false ;;
14 h) echo "Please read the JMK manual for more information." ;;
15 ?) echo "Invalid argument"
16 exit 1 ;;
17 esac
18done
19
swissChili2b5acc82021-03-13 17:06:42 -080020for file in $(find -name Jmk); do
21 echo "Processing $file" > /dev/stderr
22 outdir="$(dirname $file)"
swissChilid98781b2021-07-25 21:04:17 -070023 m4 -D jmk_root="$root" -D jmk_build_cmd="$0" -D jmk_build_dir="$(pwd)" \
24 -D disable_gtags="$disable_gtags" "$jmkscript" "$file" > "$outdir/Makefile" \
25 || exit 2
swissChili2b5acc82021-03-13 17:06:42 -080026done