xref: /titanic_44/usr/src/cmd/terminfo/Makefile (revision f05d7fc81533be643136e12ce92516d1d4292921)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25#
26
27PROG=		terminfo
28TABSETSRC=	3101 beehive hds hds3 std stdcrt teleray vt100 wyse-adds xerox1720
29TERMCAPSRC=	termcap.src
30TERMINFOSRC=	terminfo.src
31
32include		../Makefile.cmd
33
34FILEMODE=	0644
35
36TIC=		/usr/bin/tic
37
38ROOTSHARELIBDIR	= $(ROOT)/usr/share/lib
39ROOTTABDIR	= $(ROOTSHARELIBDIR)/tabset
40ROOTTERMDIR	= $(ROOTSHARELIBDIR)/terminfo
41DIRS		= $(ROOTTERMDIR) $(ROOTTABDIR)
42
43ROOTSYMLINK	= $(ROOTETC)/termcap
44RELROOTETC	= ../usr/share/lib
45ROOTLIBSYMLINK	= $(ROOTLIB)/tabset
46RELROOTLIB	= ../share/lib
47
48ROOTTABSET	= $(TABSETSRC:%=$(ROOTTABDIR)/%)
49
50$(ROOTTABDIR)/%:	tabset/%
51		$(INS.file)
52
53.KEEP_STATE:
54
55all:		$(TERMCAPSRC) $(TERMINFOSRC)
56
57$(DIRS):
58		$(INS.dir)
59
60$(ROOTTERMDIR)/s/sun: $(TERMINFOSRC)
61		TERMINFO=$(ROOTTERMDIR) $(TIC) $(TERMINFOSRC) 2>/dev/null
62
63$(ROOTSHARELIBDIR)/termcap:
64		$(EGREP) -v '^(#|$$)' $(TERMCAPSRC) > $@
65
66install:	all $(ROOTTERMDIR) $(ROOTTERMDIR)/s/sun $(ROOTTABDIR) \
67		$(ROOTTABSET) $(ROOTSHARELIBDIR)/termcap  $(ROOTSYMLINK) \
68		$(ROOTLIBSYMLINK)
69
70$(ROOTSYMLINK):
71		$(RM) $@; $(SYMLINK) $(RELROOTETC)/termcap $@
72
73$(ROOTLIBSYMLINK):
74		$(RM) $@; $(SYMLINK) $(RELROOTLIB)/tabset $@
75
76lint:
77
78clean:
79
80clobber:
81