--- a/usr/src/cmd/terminfo/Makefile Tue Aug 30 09:23:32 2011 -0700
+++ b/usr/src/cmd/terminfo/Makefile Tue Aug 30 15:16:15 2011 -0700
@@ -21,36 +21,24 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-
-PROG= terminfo
-
-TABSETSRC= \
- 3101 beehive hds hds3 std stdcrt teleray vt100 wyse-adds xerox1720
-
-TXTS= Doc.sed README ckout cvt.ex cvt.sed $(TABSETSRCS) termcap
+# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+#
-TISRC= adds.ti annarbor.ti ansi.ti att.ti beehive.ti \
- cdc.ti colorscan.ti datamedia.ti dec.ti diablo.ti \
- fortune.ti general.ti hardcopy.ti hazeltine.ti hds.ti \
- heath.ti homebrew.ti hp.ti lsi.ti microterm.ti \
- misc.ti pc.ti perkinelmer.ti print.ti screen.ti special.ti \
- sperry.ti tektronix.ti teleray.ti televideo.ti ti.ti \
- tymshare.ti visual.ti wyse.ti
+PROG= terminfo
+TABSETSRC= 3101 beehive hds hds3 std stdcrt teleray vt100 wyse-adds xerox1720
+TERMCAPSRC= termcap.src
+TERMINFOSRC= terminfo.src
-PARTS= header $(TISRC) trailer
-
-include ../Makefile.cmd
+include ../Makefile.cmd
-DIRMODE= 0755
FILEMODE= 0644
-TIC= tic
-CAT= /usr/bin/cat
-ECHO= echo
+
+TIC= /usr/bin/tic
ROOTSHARELIBDIR = $(ROOT)/usr/share/lib
ROOTTABDIR = $(ROOTSHARELIBDIR)/tabset
ROOTTERMDIR = $(ROOTSHARELIBDIR)/terminfo
-DIRS= $(ROOTTERMDIR) $(ROOTTABDIR)
+DIRS = $(ROOTTERMDIR) $(ROOTTABDIR)
ROOTSYMLINK = $(ROOTETC)/termcap
RELROOTETC = ../usr/share/lib
@@ -59,51 +47,34 @@
ROOTTABSET = $(TABSETSRC:%=$(ROOTTABDIR)/%)
-$(ROOTTABDIR)/% : tabset/%
- $(INS.file)
-
-$(ROOTSHARELIBDIR)/% : %
- $(INS.file)
+$(ROOTTABDIR)/%: tabset/%
+ $(INS.file)
.KEEP_STATE:
-all: $(PROG).src $(TXTS)
+all: $(TERMCAPSRC) $(TERMINFOSRC)
$(DIRS):
- $(INS.dir)
-
-$(PROG).src: $(PARTS)
- @$(CAT) $(PARTS) > $(PROG).src
+ $(INS.dir)
-$(ROOTTERMDIR)/s/sun: $(PROG).src
- TERMINFO=$(ROOTTERMDIR) 2>&1 $(TIC) -v $(PROG).src > errs
- @$(ECHO) "\n`2>/dev/null cat errs|wc -l` entries have been compiled\n"
- @-( 2>/dev/null cat errs|grep -iv "^mkdir"|grep -iv "^create"|grep -iv "^link"|grep -vi terminfo.src|grep -vi touch|grep -vi "working"; \
- if [ $$? -ne 0 ] ; \
- then \
- $(ECHO) "\tNo errors\n"; \
- else \
- $(ECHO) "\n\tErrors can be found in `pwd`/errs\n"; \
- fi \
- )
+$(ROOTTERMDIR)/s/sun: $(TERMINFOSRC)
+ TERMINFO=$(ROOTTERMDIR) $(TIC) $(TERMINFOSRC) 2>/dev/null
-#
-# Note that order is significant here. $(ROOTTERMDIR)/s/sun will set the
-# entire subtree to ownership root/bin.
-#
+$(ROOTSHARELIBDIR)/termcap:
+ $(EGREP) -v '^(#|$$)' $(TERMCAPSRC) > $@
+
install: all $(ROOTTERMDIR) $(ROOTTERMDIR)/s/sun $(ROOTTABDIR) \
$(ROOTTABSET) $(ROOTSHARELIBDIR)/termcap $(ROOTSYMLINK) \
$(ROOTLIBSYMLINK)
$(ROOTSYMLINK):
- -$(RM) $@; $(SYMLINK) $(RELROOTETC)/termcap $@
+ $(RM) $@; $(SYMLINK) $(RELROOTETC)/termcap $@
$(ROOTLIBSYMLINK):
- -$(RM) $@; $(SYMLINK) $(RELROOTLIB)/tabset $@
+ $(RM) $@; $(SYMLINK) $(RELROOTLIB)/tabset $@
lint:
clean:
- $(RM) $(PROG).src errs
-clobber: clean
+clobber: