#!/bin/sh
#
# Makesrc - make AIX 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.7 96/03/08 14:02:17 abe Exp $


D=dialects/aix
F=dialects/common
L="dlsof.h dmnt.c dnode.c dnode1.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/dvch.frag $F/fchi.frag $F/lkud.frag"
rm -f $NM
cat $P > $NM
echo "$NM assembled."

# Assemble dfile.c.

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