#
# (C) Copyright IBM Corp. 1998  All rights reserved.
#
# US Government Users Restricted Rights Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
# The program is provided "as is" without any warranty express or
# implied, including the warranty of non-infringement and the implied
# warranties of merchantibility and fitness for a particular purpose.
# IBM will not be liable for any damages suffered by you as a result
# of using the Program. In no event will IBM be liable for any
# special, indirect or consequential damages or lost profits even if
# IBM has been advised of the possibility of their occurrence. IBM
# will not be liable for any third party claims against you.
#
#
# Revision: 32 1.1 samples/dom/makeit.ksh, build, xml4j2, xml4j2_0_15 
#

#
# Make script for ../samples/dom directory.
#


. setupEnvVars.ksh



THISDIR=samples/dom
THISCLASSDIR=$XML4JCLASSFILESDIR/$THISDIR
SRCDIR=.


SRCFILES="`ls -1 *.java`"

case $# in
    0)  target=all;;
    *)  target=$1;;
esac

case $target in 
    all)          echo "Compiling all files in $THISDIR directory...";
#                 Create the $XML4JCLASSFILESDIR, if necessary.
                  if test ! -d $XML4JCLASSFILESDIR
                  then
                      mkdir $XML4JCLASSFILESDIR;
                  fi
				  javac $JAVACFLAGS $SRCFILES;
                  mesg="Finished compiling all files in $THISDIR directory.";;
    veryclean)    echo "Cleaning up in $THISDIR directory...";
                  rm -f $XML4JCLASSFILESDIR/*.class;
                  mesg="Finished cleanup in $THISDIR directory.";;
    *)            echo "Target '$target' not recognized.";
                  mesg="Finished processing '$target' in $THISDIR directory.";;
esac


for i in wrappers
do
    if test $target != "veryclean"
	then
        if test -d $i
        then
            echo Building $target in directory $THISDIR/$i.
            $SH -c "cd $i; ./makeit.ksh $target"
        fi
    fi
done

echo $mesg
exit
