#!/bin/sh
#
# Makesrc - make Pyramid DC/OSx source files
#
# WARNING: This script assumes it is running from the main directory
#	   of the lsof, version 3 distribution.
#
# One environment variable applies:
#
# LSOF_MKC	is the method for creating the source files.
#		It defaults to "ln -s".  A common alternative is "cp".
#
#		Cp may be used when it is necessary to assemble a
#		source module from fragments.
#
# $Id: Mksrc,v 1.4 95/09/12 08:11:02 abe Exp $


D=dialects/dcosx
F=dialects/common
L="dlsof.h dnode.c dnode1.c dnode2.c dproc.c dproto.h dsock.c dstore.c machine.h"

for i in $L
do
  rm -f $i
  $LSOF_MKC $D/$i $i
  echo "$LSOF_MKC $D/$i $i"
done

# Assemble ddev.c.

NM=ddev.c
P="$D/$NM $F/fchi.frag $F/lkud.frag $F/pcdn.frag"
rm -f $NM
cat $P > $NM
echo "$NM assembled."

# Assemble dfile.c.

NM=dfile.c
P="$D/$NM $F/ckfa.frag $F/prtf.frag"
rm -f $NM
cat $P > $NM
echo "$NM assembled."

# Assemble dmnt.c.

NM=dmnt.c
P="$D/$NM $F/cvfs.frag"
rm -f $NM
cat $P > $NM
echo "$NM assembled."
