xref: /titanic_50/usr/src/cmd/terminfo/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23#ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright (c) 1989,1998 by Sun Microsystems, Inc.
26# All rights reserved.
27#
28
29PROG=	terminfo
30
31TABSETSRC= \
32	3101 beehive hds hds3 std stdcrt teleray vt100 wyse-adds xerox1720
33
34TXTS=	Doc.sed README ckout cvt.ex cvt.sed $(TABSETSRCS) termcap
35
36TISRC=	adds.ti annarbor.ti ansi.ti att.ti beehive.ti \
37	cdc.ti colorscan.ti datamedia.ti dec.ti diablo.ti \
38	fortune.ti general.ti hardcopy.ti hazeltine.ti hds.ti \
39	heath.ti homebrew.ti hp.ti lsi.ti microterm.ti \
40	misc.ti pc.ti perkinelmer.ti print.ti special.ti \
41	sperry.ti tektronix.ti teleray.ti televideo.ti ti.ti \
42	tymshare.ti visual.ti wyse.ti
43
44PARTS=	header $(TISRC) trailer
45
46include ../Makefile.cmd
47
48DIRMODE=	0755
49FILEMODE=	0644
50TIC=		tic
51CAT=		/usr/bin/cat
52ECHO=		echo
53
54ROOTSHARELIBDIR	= $(ROOT)/usr/share/lib
55ROOTTABDIR	= $(ROOTSHARELIBDIR)/tabset
56ROOTTERMDIR	= $(ROOTSHARELIBDIR)/terminfo
57OWNER		= root
58GROUP		= bin
59DIRS=		$(ROOTTERMDIR) $(ROOTTABDIR)
60
61ROOTSYMLINK	= $(ROOTETC)/termcap
62RELROOTETC	= ../usr/share/lib
63ROOTLIBSYMLINK	= $(ROOTLIB)/tabset
64RELROOTLIB	= ../share/lib
65
66ROOTTABSET	= $(TABSETSRC:%=$(ROOTTABDIR)/%)
67
68$(ROOTTABDIR)/% :	tabset/%
69	$(INS.file)
70
71$(ROOTSHARELIBDIR)/% :	%
72	$(INS.file)
73
74.KEEP_STATE:
75
76all:		$(PROG).src $(TXTS)
77
78$(DIRS):
79	$(INS.dir)
80
81$(PROG).src:	$(PARTS)
82		@$(CAT) $(PARTS) > $(PROG).src
83
84$(ROOTTERMDIR)/s/sun: $(PROG).src
85	TERMINFO=$(ROOTTERMDIR) 2>&1 $(TIC) -v $(PROG).src > errs
86	$(CHOWN) -R $(OWNER) $(ROOTTERMDIR)
87	$(CHGRP) -R $(GROUP) $(ROOTTERMDIR)
88	@$(ECHO) "\n`2>/dev/null cat errs|wc -l` entries have been compiled\n"
89	@-(	2>/dev/null cat errs|grep -iv "^mkdir"|grep -iv "^create"|grep -iv "^link"|grep -vi terminfo.src|grep -vi touch|grep -vi "working"; \
90	 	if [ $$? -ne 0 ] ; \
91		then \
92			$(ECHO) "\tNo errors\n"; \
93		else \
94			$(ECHO) "\n\tErrors can be found in `pwd`/errs\n"; \
95		fi \
96	)
97
98#
99#	Note that order is significant here. $(ROOTTERMDIR)/s/sun will set the
100#	entire subtree to ownership root/bin.
101#
102install:	all $(ROOTTERMDIR) $(ROOTTERMDIR)/s/sun $(ROOTTABDIR) \
103		$(ROOTTABSET) $(ROOTSHARELIBDIR)/termcap  $(ROOTSYMLINK) \
104		$(ROOTLIBSYMLINK)
105
106$(ROOTSYMLINK):
107	-$(RM) $@; $(SYMLINK) $(RELROOTETC)/termcap $@
108
109$(ROOTLIBSYMLINK):
110	-$(RM) $@; $(SYMLINK) $(RELROOTLIB)/tabset $@
111
112lint:
113
114clean:
115		$(RM) $(PROG).src errs
116
117clobber: 	clean
118