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-gatetest := TARGET= test 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gateSCRFILES = screen/keycaps \ 397c478bd9Sstevel@tonic-gate screen/curses.h \ 407c478bd9Sstevel@tonic-gate screen/keyname.c \ 417c478bd9Sstevel@tonic-gate screen/termcap.c \ 427c478bd9Sstevel@tonic-gate screen/tifget.c \ 437c478bd9Sstevel@tonic-gate screen/tiget.c \ 447c478bd9Sstevel@tonic-gate screen/tifnames.c \ 457c478bd9Sstevel@tonic-gate screen/tnames.c \ 467c478bd9Sstevel@tonic-gate screen/tinames.c \ 477c478bd9Sstevel@tonic-gate screen/term.h 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gate# definitions for install_h target 50241c90a0SRichard LoweHDRS= curses.h term.h unctrl.h 517c478bd9Sstevel@tonic-gateHDRDIR= screen 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gateLIBRARY= libcurses.a 547c478bd9Sstevel@tonic-gateTEXT_DOMAIN= SUNW_OST_OSLIB 557c478bd9Sstevel@tonic-gateXGETFLAGS= -a 567c478bd9Sstevel@tonic-gateMSGDIRS= screen 577c478bd9Sstevel@tonic-gatePOFILE= $(LIBRARY:.a=.po) 587c478bd9Sstevel@tonic-gatePOFILES= generic.po 597c478bd9Sstevel@tonic-gateCLEANFILES += $(SCRFILES) 607c478bd9Sstevel@tonic-gate 617c478bd9Sstevel@tonic-gate# term.h doesn't pass cstyle due to numerous lines exceeding the 80 character 627c478bd9Sstevel@tonic-gate# limit. maketerm.ed can probably be fixed to prevent this, but it is arguable 637c478bd9Sstevel@tonic-gate# if this work would ever be worth it. 647c478bd9Sstevel@tonic-gate# 65*02b17e23SRichard Lowescreen/term.check := CSTYLE_TAIL = | $(GREP) -v "line > 80 characters" | \ 66*02b17e23SRichard Lowe $(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 74241c90a0SRichard Loweclean clobber 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-gatescreen/curses.h: screen/curses.ed screen/keycaps screen/tmp 867c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < curses.ed) 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gatescreen/keycaps: screen/caps 89*02b17e23SRichard Lowe $(GREP) "KEY_" screen/caps > screen/keycaps 90*02b17e23SRichard Lowe @if tail -1 screen/keycaps | $(GREP) 'KEY_MOUSE' > /dev/null;then :; \ 917c478bd9Sstevel@tonic-gate else echo new keys!! must change setkeymap.c; exit 1;fi 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gatescreen/keyname.c: screen/keyname.sh screen/keycaps 94*02b17e23SRichard Lowe (cd screen; $(SH) keyname.sh) 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gatescreen/termcap.c: screen/termcap.ed 977c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < termcap.ed) 987c478bd9Sstevel@tonic-gate (cd screen; $(RM) bool num str) 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gatescreen/tifget.c: screen/tifget.ed 1017c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < tifget.ed) 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gatescreen/tiget.c: screen/tiget.ed 1047c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < tiget.ed) 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gatescreen/tnames.c screen/tinames.c screen/tifnames.c \ 1077c478bd9Sstevel@tonic-gatescreen/term.h: screen/maketerm.ed 1087c478bd9Sstevel@tonic-gate (cd screen; $(ED) - < maketerm.ed) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gatescreen/tmp: 111*02b17e23SRichard Lowe $(RM) -r $@ 112*02b17e23SRichard Lowe $(MKDIR) $@ 1137c478bd9Sstevel@tonic-gate 114b6805bf7SGordon RossCLEANFILES += \ 115b6805bf7SGordon Ross screen/tmp/keycaps \ 116b6805bf7SGordon Ross screen/tmp/term.h.new1 \ 117b6805bf7SGordon Ross screen/tmp/term.h.new2 118b6805bf7SGordon Ross 119f808c858Sraf_msg: $(MSGDOMAIN) .WAIT $(POFILE) 1207c478bd9Sstevel@tonic-gate $(RM) $(MSGDOMAIN)/$(POFILE) 1217c478bd9Sstevel@tonic-gate $(CP) $(POFILE) $(MSGDOMAIN) 1227c478bd9Sstevel@tonic-gate 123f808c858Sraf$(POFILE): $(POFILES) 1247c478bd9Sstevel@tonic-gate $(RM) $@ 1257c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gategeneric.po: 1287c478bd9Sstevel@tonic-gate $(RM) messages.po 1297c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]* */*.[ch]*` 1307c478bd9Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 1317c478bd9Sstevel@tonic-gate $(RM) messages.po 1327c478bd9Sstevel@tonic-gate 1337c478bd9Sstevel@tonic-gateFRC: 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 1363a51e5c0SRichard Loweinclude $(SRC)/Makefile.msg.targ 137