17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*f808c858Sraf# Common Development and Distribution License (the "License"). 6*f808c858Sraf# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 22*f808c858Sraf# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateinclude ../Makefile.lib 297c478bd9Sstevel@tonic-gate 30*f808c858SrafSUBDIRS = $(MACH) 31*f808c858Sraf$(BUILD64)SUBDIRS += $(MACH64) 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate# conditional assignments 347c478bd9Sstevel@tonic-gateall := TARGET= all 357c478bd9Sstevel@tonic-gateinstall := TARGET= install 367c478bd9Sstevel@tonic-gateclean := TARGET= clean 377c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 387c478bd9Sstevel@tonic-gatelint := TARGET= lint 397c478bd9Sstevel@tonic-gatetest := TARGET= test 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateSCRFILES = screen/keycaps \ 427c478bd9Sstevel@tonic-gate screen/curses.h \ 437c478bd9Sstevel@tonic-gate screen/keyname.c \ 447c478bd9Sstevel@tonic-gate screen/termcap.c \ 457c478bd9Sstevel@tonic-gate screen/tifget.c \ 467c478bd9Sstevel@tonic-gate screen/tiget.c \ 477c478bd9Sstevel@tonic-gate screen/tifnames.c \ 487c478bd9Sstevel@tonic-gate screen/tnames.c \ 497c478bd9Sstevel@tonic-gate screen/tinames.c \ 507c478bd9Sstevel@tonic-gate screen/term.h 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gate# definitions for install_h target 537c478bd9Sstevel@tonic-gateHDRS= curses.h term.h unctrl.h 547c478bd9Sstevel@tonic-gateHDRDIR= screen 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gateLIBRARY= libcurses.a 577c478bd9Sstevel@tonic-gateTEXT_DOMAIN= SUNW_OST_OSLIB 587c478bd9Sstevel@tonic-gateXGETFLAGS= -a 597c478bd9Sstevel@tonic-gateMSGDIRS= screen 607c478bd9Sstevel@tonic-gatePOFILE= $(LIBRARY:.a=.po) 617c478bd9Sstevel@tonic-gatePOFILES= generic.po 627c478bd9Sstevel@tonic-gateCLEANFILES += $(SCRFILES) 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gate# term.h doesn't pass cstyle due to numerous lines exceeding the 80 character 657c478bd9Sstevel@tonic-gate# limit. maketerm.ed can probably be fixed to prevent this, but it is arguable 667c478bd9Sstevel@tonic-gate# if this work would ever be worth it. 677c478bd9Sstevel@tonic-gate# 687c478bd9Sstevel@tonic-gatescreen/term.check := CSTYLE_TAIL = | grep -v "line > 80 characters" | true 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate.KEEP_STATE: 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gateall: $(SCRFILES) .WAIT $(SUBDIRS) 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gateinstall: all .WAIT $(SUBDIRS) 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gateclean clobber lint test: $(SUBDIRS) 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gateinstall_h: $(ROOTHDRS) 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gatecheck: $(CHECKHDRS) 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gatescrfiles: $(SCRFILES) 837c478bd9Sstevel@tonic-gate 84*f808c858Sraf$(SUBDIRS): FRC 857c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gateED = ed 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gatescreen/curses.h: screen/curses.ed screen/keycaps screen/tmp 907c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < curses.ed) 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gatescreen/keycaps: screen/caps 937c478bd9Sstevel@tonic-gate grep "KEY_" screen/caps > screen/keycaps 947c478bd9Sstevel@tonic-gate @if tail -1 screen/keycaps | grep 'KEY_MOUSE' > /dev/null;then :; \ 957c478bd9Sstevel@tonic-gate else echo new keys!! must change setkeymap.c; exit 1;fi 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gatescreen/keyname.c: screen/keyname.sh screen/keycaps 987c478bd9Sstevel@tonic-gate (cd screen; sh keyname.sh) 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gatescreen/termcap.c: screen/termcap.ed 1017c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < termcap.ed) 1027c478bd9Sstevel@tonic-gate (cd screen; $(RM) bool num str) 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gatescreen/tifget.c: screen/tifget.ed 1057c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < tifget.ed) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gatescreen/tiget.c: screen/tiget.ed 1087c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < tiget.ed) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gatescreen/tnames.c screen/tinames.c screen/tifnames.c \ 1117c478bd9Sstevel@tonic-gatescreen/term.h: screen/maketerm.ed 1127c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < maketerm.ed) 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gatescreen/tmp: 1157c478bd9Sstevel@tonic-gate rm -rf $@ 1167c478bd9Sstevel@tonic-gate mkdir $@ 1177c478bd9Sstevel@tonic-gate 118*f808c858Sraf_msg: $(MSGDOMAIN) .WAIT $(POFILE) 1197c478bd9Sstevel@tonic-gate $(RM) $(MSGDOMAIN)/$(POFILE) 1207c478bd9Sstevel@tonic-gate $(CP) $(POFILE) $(MSGDOMAIN) 1217c478bd9Sstevel@tonic-gate 122*f808c858Sraf$(POFILE): $(POFILES) 1237c478bd9Sstevel@tonic-gate $(RM) $@ 1247c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gategeneric.po: 1277c478bd9Sstevel@tonic-gate $(RM) messages.po 1287c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]* */*.[ch]*` 1297c478bd9Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 1307c478bd9Sstevel@tonic-gate $(RM) messages.po 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gateFRC: 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 135