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 5f808c858Sraf# Common Development and Distribution License (the "License"). 6f808c858Sraf# 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# 22f808c858Sraf# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gateinclude ../Makefile.lib 277c478bd9Sstevel@tonic-gate 28f808c858SrafSUBDIRS = $(MACH) 29f808c858Sraf$(BUILD64)SUBDIRS += $(MACH64) 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate# conditional assignments 327c478bd9Sstevel@tonic-gateall := TARGET= all 337c478bd9Sstevel@tonic-gateinstall := TARGET= install 347c478bd9Sstevel@tonic-gateclean := TARGET= clean 357c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 367c478bd9Sstevel@tonic-gatelint := TARGET= lint 377c478bd9Sstevel@tonic-gatetest := TARGET= test 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gateSCRFILES = screen/keycaps \ 407c478bd9Sstevel@tonic-gate screen/curses.h \ 417c478bd9Sstevel@tonic-gate screen/keyname.c \ 427c478bd9Sstevel@tonic-gate screen/termcap.c \ 437c478bd9Sstevel@tonic-gate screen/tifget.c \ 447c478bd9Sstevel@tonic-gate screen/tiget.c \ 457c478bd9Sstevel@tonic-gate screen/tifnames.c \ 467c478bd9Sstevel@tonic-gate screen/tnames.c \ 477c478bd9Sstevel@tonic-gate screen/tinames.c \ 487c478bd9Sstevel@tonic-gate screen/term.h 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate# definitions for install_h target 517c478bd9Sstevel@tonic-gateHDRS= curses.h term.h unctrl.h 527c478bd9Sstevel@tonic-gateHDRDIR= screen 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gateLIBRARY= libcurses.a 557c478bd9Sstevel@tonic-gateTEXT_DOMAIN= SUNW_OST_OSLIB 567c478bd9Sstevel@tonic-gateXGETFLAGS= -a 577c478bd9Sstevel@tonic-gateMSGDIRS= screen 587c478bd9Sstevel@tonic-gatePOFILE= $(LIBRARY:.a=.po) 597c478bd9Sstevel@tonic-gatePOFILES= generic.po 607c478bd9Sstevel@tonic-gateCLEANFILES += $(SCRFILES) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate# term.h doesn't pass cstyle due to numerous lines exceeding the 80 character 637c478bd9Sstevel@tonic-gate# limit. maketerm.ed can probably be fixed to prevent this, but it is arguable 647c478bd9Sstevel@tonic-gate# if this work would ever be worth it. 657c478bd9Sstevel@tonic-gate# 667c478bd9Sstevel@tonic-gatescreen/term.check := CSTYLE_TAIL = | grep -v "line > 80 characters" | true 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate.KEEP_STATE: 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gateall: $(SCRFILES) .WAIT $(SUBDIRS) 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gateinstall: all .WAIT $(SUBDIRS) 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gateclean clobber lint test: $(SUBDIRS) 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gateinstall_h: $(ROOTHDRS) 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gatecheck: $(CHECKHDRS) 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gatescrfiles: $(SCRFILES) 817c478bd9Sstevel@tonic-gate 82f808c858Sraf$(SUBDIRS): FRC 837c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gateED = ed 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gatescreen/curses.h: screen/curses.ed screen/keycaps screen/tmp 887c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < curses.ed) 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gatescreen/keycaps: screen/caps 917c478bd9Sstevel@tonic-gate grep "KEY_" screen/caps > screen/keycaps 927c478bd9Sstevel@tonic-gate @if tail -1 screen/keycaps | grep 'KEY_MOUSE' > /dev/null;then :; \ 937c478bd9Sstevel@tonic-gate else echo new keys!! must change setkeymap.c; exit 1;fi 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gatescreen/keyname.c: screen/keyname.sh screen/keycaps 967c478bd9Sstevel@tonic-gate (cd screen; sh keyname.sh) 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gatescreen/termcap.c: screen/termcap.ed 997c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < termcap.ed) 1007c478bd9Sstevel@tonic-gate (cd screen; $(RM) bool num str) 1017c478bd9Sstevel@tonic-gate 1027c478bd9Sstevel@tonic-gatescreen/tifget.c: screen/tifget.ed 1037c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < tifget.ed) 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gatescreen/tiget.c: screen/tiget.ed 1067c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < tiget.ed) 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gatescreen/tnames.c screen/tinames.c screen/tifnames.c \ 1097c478bd9Sstevel@tonic-gatescreen/term.h: screen/maketerm.ed 1107c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < maketerm.ed) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gatescreen/tmp: 1137c478bd9Sstevel@tonic-gate rm -rf $@ 1147c478bd9Sstevel@tonic-gate mkdir $@ 1157c478bd9Sstevel@tonic-gate 116*b6805bf7SGordon RossCLEANFILES += \ 117*b6805bf7SGordon Ross screen/tmp/keycaps \ 118*b6805bf7SGordon Ross screen/tmp/term.h.new1 \ 119*b6805bf7SGordon Ross screen/tmp/term.h.new2 120*b6805bf7SGordon Ross 121f808c858Sraf_msg: $(MSGDOMAIN) .WAIT $(POFILE) 1227c478bd9Sstevel@tonic-gate $(RM) $(MSGDOMAIN)/$(POFILE) 1237c478bd9Sstevel@tonic-gate $(CP) $(POFILE) $(MSGDOMAIN) 1247c478bd9Sstevel@tonic-gate 125f808c858Sraf$(POFILE): $(POFILES) 1267c478bd9Sstevel@tonic-gate $(RM) $@ 1277c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gategeneric.po: 1307c478bd9Sstevel@tonic-gate $(RM) messages.po 1317c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]* */*.[ch]*` 1327c478bd9Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 1337c478bd9Sstevel@tonic-gate $(RM) messages.po 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gateFRC: 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 138