xref: /titanic_41/usr/src/cmd/troff/troff.d/maketables (revision 843e19887f64dde75055cf8842fc4db2171eff45)
1#ident	"%Z%%M%	%I%	%E% SMI"
2
3#
4# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5# Use is subject to license terms.
6#
7# CDDL HEADER START
8#
9# The contents of this file are subject to the terms of the
10# Common Development and Distribution License, Version 1.0 only
11# (the "License").  You may not use this file except in compliance
12# with the License.
13#
14# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15# or http://www.opensolaris.org/os/licensing.
16# See the License for the specific language governing permissions
17# and limitations under the License.
18#
19# When distributing Covered Code, include this CDDL HEADER in each
20# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21# If applicable, add the following below this CDDL HEADER, with the
22# fields enclosed by brackets "[]" replaced with your own identifying
23# information: Portions Copyright [yyyy] [name of copyright owner]
24#
25# CDDL HEADER END
26#
27
28#
29# University Copyright- Copyright (c) 1982, 1986, 1988
30# The Regents of the University of California
31# All Rights Reserved
32#
33# University Acknowledgment- Portions of this document are derived from
34# software developed by the University of California, Berkeley, and its
35# contributors.
36#
37
38
39# For use in one of the dev* font-table directories
40#
41#    If you're not really comfortable with the 'makedev' program, you can
42# use this shell script to make the binary font and device tables for the
43# device independent troff. You can be sure that all the necessary
44# binary files will be properly updated. The command 'maketables *'
45# will make a complete new set of binary '.out' files.
46#
47#    If the makedev program isn't located in the parent of this directory,
48# just change the initialization of the shell variable MAKEDEV.
49#
50#
51# USAGE:  maketables files
52#         files - one or more files from this directory.
53#
54#
55
56
57MAKEDEV=../makedev                        # this program does the real work
58MAKEDESC=no                            # need to remake the DESC.out file
59
60FONTS=`grep "^fonts" DESC | sed s/"fonts[ \t][0-9][0-9]*"//gp`
61
62FONTS=`echo "$FONTS" | sed "s/	/ /gp"`     # get rid of any tabs
63FONTS="$FONTS "								# and add a blank to the end
64
65for i do
66    if echo "$FONTS" | grep " $i " > /dev/null; then
67        MAKEDESC=yes
68        continue
69    fi
70
71    case $i in
72             [A-Z]) $MAKEDEV $i;;
73
74        [A-Z][0-9]) $MAKEDEV $i;;
75
76        [A-Z][A-Z]) $MAKEDEV $i;;
77
78              DESC) MAKEDESC=yes;;
79    esac
80done
81
82if [ $MAKEDESC = yes ]; then
83    $MAKEDEV DESC
84fi
85
86if [ -r LINKFILE ]; then
87	. LINKFILE
88fi
89