# $Copyright:	$
# Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
# Sequent Computer Systems, Inc.   All rights reserved.
#  
# This software is furnished under a license and may be used
# only in accordance with the terms of that license and with the
# inclusion of the above copyright notice.   This software may not
# be provided or otherwise made available to, or used by, any
# other person.  No title to or ownership of the software is
# hereby transferred.
#ident	"$Header: maketables 1.2 89/10/10 $@(#)roff:troff.d/maketables	2.3"
#		Copyright (c) 1984 AT&T
#		  All Rights Reserved
#     THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
#   The copyright notice above does not evidence any actual
#   or intended publication of such source code.
#
# For use in one of the dev* font-table directories
#
#    If you're not really comfortable with the 'makedev' program, you can
# use this shell script to make the binary font and device tables for the
# device independent troff. You can be sure that all the necessary
# binary files will be properly updated. The command 'maketables *'
# will make a complete new set of binary '.out' files.
#
#    If the makedev program isn't located in the parent of this directory,
# just change the initialization of the shell variable MAKEDEV.
#
#
# USAGE:  maketables files
#         files - one or more files from this directory.
#
#


MAKEDEV=../makedev                        # this program does the real work
MAKEDESC=no                            # need to remake the DESC.out file

FONTS=`grep "^fonts" DESC | sed s/"fonts[ \t][0-9][0-9]*"//gp`

FONTS=`echo "$FONTS" | sed "s/	/ /gp"`     # get rid of any tabs
FONTS="$FONTS "								# and add a blank to the end

for i do
    if echo "$FONTS" | grep " $i " > /dev/null; then
        MAKEDESC=yes
        continue
    fi

    case $i in
             [A-Z]) $MAKEDEV $i;;

        [A-Z][0-9]) $MAKEDEV $i;;

        [A-Z][A-Z]) $MAKEDEV $i;;

              DESC) MAKEDESC=yes;;
    esac
done

if [ $MAKEDESC = yes ]; then
    $MAKEDEV DESC
fi

if [ -r LINKFILE ]; then
	. LINKFILE
fi
