xref: /illumos-gate/usr/src/data/terminfo/Makefile (revision 51396a8ee7fb52fe0ab33bfe7b4f495ad431904a)
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
22#
23# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25# Copyright 2017 Nexenta Systems, Inc.
26#
27
28TABSETSRC=	3101 \
29		beehive \
30		hds \
31		hds3 \
32		std \
33		stdcrt \
34		teleray \
35		vt100 \
36		wyse-adds \
37		xerox1720
38TERMCAPSRC=	termcap.src
39TERMINFOSRC=	terminfo.src
40
41#
42# These represent the target termcap entries that we build from extra
43# termcap and terminfo data. See extras/README.
44#
45EXTRATERM=	rxvt-unicode
46EXTRATC=	$(EXTRATERM:%=extras/%.termcap)
47EXTRATI=	r/rxvt-unicode
48
49include		$(SRC)/data/Makefile.data
50
51FILEMODE=	0644
52
53ROOTTABDIR=	$(ROOTSHLIB)/tabset
54ROOTTERMDIR=	$(ROOTSHLIB)/terminfo
55DIRS=		$(ROOTTERMDIR) $(ROOTTABDIR)
56
57ROOTSYMLINK=	$(ROOTETC)/termcap
58RELROOTETC=	../usr/share/lib
59ROOTLIBSYMLINK=	$(ROOTLIB)/tabset
60RELROOTLIB=	../share/lib
61
62ROOTSHSYMLINK=  $(ROOTSH)/terminfo
63
64ROOTTABSET=	$(TABSETSRC:%=$(ROOTTABDIR)/%)
65
66ROOTEXTRATI=	$(EXTRATI:%=$(ROOTTERMDIR)/%)
67
68$(ROOTTABDIR)/%: tabset/%
69		$(INS.file)
70
71.KEEP_STATE:
72
73all:		$(TERMCAPSRC) $(TERMINFOSRC)
74
75$(DIRS):
76		$(INS.dir)
77
78$(ROOTTERMDIR)/s/sun: $(TERMINFOSRC)
79		TERMINFO=$(ROOTTERMDIR) $(TIC) $(TERMINFOSRC) 2>/dev/null
80
81$(ROOTSHLIB)/termcap: $(TERMCAPSRC) $(EXTRATC)
82		echo $(EXTRATERM) $(EXTRATC)
83		$(EGREP) -hv '^(#|$$)' $(TERMCAPSRC) $(EXTRATC) > $@
84
85install:	all $(ROOTTERMDIR) $(ROOTTERMDIR)/s/sun $(ROOTTABDIR) \
86		$(ROOTTABSET) $(ROOTSHLIB)/termcap  $(ROOTSYMLINK) \
87		$(ROOTLIBSYMLINK) $(ROOTEXTRATI) $(ROOTSHSYMLINK)
88
89$(ROOTSYMLINK):
90		$(RM) $@; $(SYMLINK) $(RELROOTETC)/termcap $@
91
92$(ROOTLIBSYMLINK):
93		$(RM) $@; $(SYMLINK) $(RELROOTLIB)/tabset $@
94
95$(ROOTSHSYMLINK):
96		$(RM) $@; $(SYMLINK) $(RELROOTLIB)/terminfo $@
97
98$(ROOTTERMDIR)/r/%: extras/%.terminfo
99		TERMINFO=$(ROOTTERMDIR) $(TIC) $< 2>/dev/null
100
101clean clobber:
102