diff --git a/hsc2hs.wrapper b/hsc2hs.wrapper index e4479ddef462d2d4396410c870cf33651db33a26..ee1ad9d98a98af49ba6c1777346a14bdfb03f3ec 100644 --- a/hsc2hs.wrapper +++ b/hsc2hs.wrapper @@ -2,10 +2,26 @@ tflag="--template=$topdir/template-hsc.h" Iflag="-I$topdir/include/" + +read_response() { + response_file=$1 + if [ -f "$response_file" ]; then + while read -r arg; do + case "$arg" in + -t*) tflag=;; + --template=*) tflag=;; + @*) read_response "${arg#"@"}" ;; + --) break;; + esac + done < "$response_file" + fi +} + for arg do case "$arg" in -t*) tflag=;; --template=*) tflag=;; + @*) read_response "${arg#"@"}" ;; --) break;; esac done