From: Fredrik Tolf Date: Tue, 20 Apr 2010 02:08:54 +0000 (+0200) Subject: sztest: Added local headers option. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=c5f010d44d71cb874e5aaf80c51c6cadaf9cfe98;p=utils.git sztest: Added local headers option. --- diff --git a/sztest b/sztest index fd7505c..2393971 100755 --- a/sztest +++ b/sztest @@ -1,17 +1,22 @@ #!/bin/sh if [ $# -lt 1 ]; then - echo "usage: sztest [-H HEADER] TYPE [CCFLAGS...]" >&2 + echo "usage: sztest [-H SYS-HEADER] [-L LOCAL-HEADER] TYPE [CCFLAGS...]" >&2 exit 1 fi -headers= +sheaders= +lheaders= while [ "${1:0:1}" = "-" ]; do opt="$1" shift case "$opt" in "-H") - headers="$headers $1" + sheaders="$sheaders $1" + shift + ;; + "-L") + lheaders="$lheaders $1" shift ;; esac @@ -26,9 +31,12 @@ cat >"$file.c" < #include EOF -for header in $headers; do +for header in $sheaders; do echo "#include <$header>" >>"$file.c" done +for header in $lheaders; do + echo "#include \"$header\"" >>"$file.c" +done cat >>"$file.c" <