#! /bin/sh

# This script is called by the Makefile before building and/or
# installing the Perl modules.
# The purpose of this script is to create *.c files as links in the
# Perl module directories.



I="dkapp dkstt dkstream dksto dkenc dkcp dkstr dkma dksf dkmem dklic"
for i in $I
do
  cp $i.c perlxs/DKrause-Application
  cp $i.ctr perlxs/DKrause-Application
done

J="dkbf dkmem"
for i in $J
do
  cp $i.c perlxs/DKrause-BitMatrix
  cp $i.ctr perlxs/DKrause-BitMatrix
done

# K="dkof dkstream dksf dkstr dkenc dkma dkmem"
# for i in $K
# do
#   cp $i.c perlxs/DKrause-BitStream
# done

L="dkfigw dksto dkof dkstream dksf dkstr dkenc dkma dkmem"
for i in $L
do
  cp $i.c perlxs/DKrause-FigWriter
  cp $i.ctr perlxs/DKrause-FigWriter
done

M="dksto dkle dkl2l dkof dkstream dksf dkstr dkenc dkma dkmem"
for i in $M
do
  cp $i.c perlxs/DKrause-LaTeXEncoder
  cp $i.ctr perlxs/DKrause-LaTeXEncoder
done

N="dkof dkstream dksto dksf dkstr dkenc dkma dkmem"
for i in $N
do
  cp $i.c perlxs/DKrause-Stream
  cp $i.ctr perlxs/DKrause-Stream
done

O="dkenc dkmem dkma dkstr dksf"
for i in $O
do
  cp $i.c perlxs/DKrause-DecodeUTF8
  cp $i.ctr perlxs/DKrause-DecodeUTF8
done

./dkconfig > perlxs/DKrause-Application/dkconfig.h
# ./dkconfig > perlxs/DKrause-BitStream/dkconfig.h
./dkconfig > perlxs/DKrause-LaTeXEncoder/dkconfig.h
./dkconfig > perlxs/DKrause-BitMatrix/dkconfig.h
./dkconfig > perlxs/DKrause-FigWriter/dkconfig.h
./dkconfig > perlxs/DKrause-Stream/dkconfig.h
./dkconfig > perlxs/DKrause-DecodeUTF8/dkconfig.h

