xref: /onnv-gate/usr/src/lib/libcurses/Makefile (revision 2522:79989c8fe091)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*2522Sraf# Common Development and Distribution License (the "License").
6*2522Sraf# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
22*2522Sraf# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate# Use is subject to license terms.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
260Sstevel@tonic-gate#
270Sstevel@tonic-gate
280Sstevel@tonic-gateinclude	../Makefile.lib
290Sstevel@tonic-gate
30*2522SrafSUBDIRS =	$(MACH)
31*2522Sraf$(BUILD64)SUBDIRS += $(MACH64)
320Sstevel@tonic-gate
330Sstevel@tonic-gate# conditional assignments
340Sstevel@tonic-gateall :=		TARGET= all
350Sstevel@tonic-gateinstall :=	TARGET= install
360Sstevel@tonic-gateclean :=	TARGET= clean
370Sstevel@tonic-gateclobber :=	TARGET= clobber
380Sstevel@tonic-gatelint :=		TARGET= lint
390Sstevel@tonic-gatetest :=		TARGET= test
400Sstevel@tonic-gate
410Sstevel@tonic-gateSCRFILES = screen/keycaps \
420Sstevel@tonic-gate	screen/curses.h \
430Sstevel@tonic-gate	screen/keyname.c \
440Sstevel@tonic-gate	screen/termcap.c \
450Sstevel@tonic-gate	screen/tifget.c \
460Sstevel@tonic-gate	screen/tiget.c \
470Sstevel@tonic-gate	screen/tifnames.c \
480Sstevel@tonic-gate	screen/tnames.c \
490Sstevel@tonic-gate	screen/tinames.c \
500Sstevel@tonic-gate	screen/term.h
510Sstevel@tonic-gate
520Sstevel@tonic-gate# definitions for install_h target
530Sstevel@tonic-gateHDRS= 		curses.h term.h unctrl.h
540Sstevel@tonic-gateHDRDIR=		screen
550Sstevel@tonic-gate
560Sstevel@tonic-gateLIBRARY=	libcurses.a
570Sstevel@tonic-gateTEXT_DOMAIN=	SUNW_OST_OSLIB
580Sstevel@tonic-gateXGETFLAGS=	-a
590Sstevel@tonic-gateMSGDIRS=	screen
600Sstevel@tonic-gatePOFILE=		$(LIBRARY:.a=.po)
610Sstevel@tonic-gatePOFILES=	generic.po
620Sstevel@tonic-gateCLEANFILES +=	$(SCRFILES)
630Sstevel@tonic-gate
640Sstevel@tonic-gate# term.h doesn't pass cstyle due to numerous lines exceeding the 80 character
650Sstevel@tonic-gate# limit.  maketerm.ed can probably be fixed to prevent this, but it is arguable
660Sstevel@tonic-gate# if this work would ever be worth it.
670Sstevel@tonic-gate#
680Sstevel@tonic-gatescreen/term.check      := CSTYLE_TAIL = | grep -v "line > 80 characters" | true
690Sstevel@tonic-gate
700Sstevel@tonic-gate.KEEP_STATE:
710Sstevel@tonic-gate
720Sstevel@tonic-gateall: $(SCRFILES) .WAIT $(SUBDIRS)
730Sstevel@tonic-gate
740Sstevel@tonic-gateinstall: all .WAIT $(SUBDIRS)
750Sstevel@tonic-gate
760Sstevel@tonic-gateclean clobber lint test: $(SUBDIRS)
770Sstevel@tonic-gate
780Sstevel@tonic-gateinstall_h: $(ROOTHDRS)
790Sstevel@tonic-gate
800Sstevel@tonic-gatecheck:	$(CHECKHDRS)
810Sstevel@tonic-gate
820Sstevel@tonic-gatescrfiles:	$(SCRFILES)
830Sstevel@tonic-gate
84*2522Sraf$(SUBDIRS):	FRC
850Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
860Sstevel@tonic-gate
870Sstevel@tonic-gateED = ed
880Sstevel@tonic-gate
890Sstevel@tonic-gatescreen/curses.h:	screen/curses.ed screen/keycaps screen/tmp
900Sstevel@tonic-gate	(cd screen; $(ED) - < curses.ed)
910Sstevel@tonic-gate
920Sstevel@tonic-gatescreen/keycaps:		screen/caps
930Sstevel@tonic-gate	grep "KEY_" screen/caps > screen/keycaps
940Sstevel@tonic-gate	@if tail -1 screen/keycaps | grep 'KEY_MOUSE' > /dev/null;then :; \
950Sstevel@tonic-gate		else echo new keys!! must change setkeymap.c; exit 1;fi
960Sstevel@tonic-gate
970Sstevel@tonic-gatescreen/keyname.c:    screen/keyname.sh screen/keycaps
980Sstevel@tonic-gate	(cd screen; sh keyname.sh)
990Sstevel@tonic-gate
1000Sstevel@tonic-gatescreen/termcap.c:    screen/termcap.ed
1010Sstevel@tonic-gate	(cd screen; $(ED) - < termcap.ed)
1020Sstevel@tonic-gate	(cd screen; $(RM) bool num str)
1030Sstevel@tonic-gate
1040Sstevel@tonic-gatescreen/tifget.c:     screen/tifget.ed
1050Sstevel@tonic-gate	(cd screen; $(ED) - < tifget.ed)
1060Sstevel@tonic-gate
1070Sstevel@tonic-gatescreen/tiget.c:      screen/tiget.ed
1080Sstevel@tonic-gate	(cd screen; $(ED) - < tiget.ed)
1090Sstevel@tonic-gate
1100Sstevel@tonic-gatescreen/tnames.c screen/tinames.c screen/tifnames.c \
1110Sstevel@tonic-gatescreen/term.h:   screen/maketerm.ed
1120Sstevel@tonic-gate	(cd screen; $(ED) - < maketerm.ed)
1130Sstevel@tonic-gate
1140Sstevel@tonic-gatescreen/tmp:
1150Sstevel@tonic-gate	rm -rf $@
1160Sstevel@tonic-gate	mkdir $@
1170Sstevel@tonic-gate
118*2522Sraf_msg:	$(MSGDOMAIN) .WAIT $(POFILE)
1190Sstevel@tonic-gate	$(RM) $(MSGDOMAIN)/$(POFILE)
1200Sstevel@tonic-gate	$(CP) $(POFILE) $(MSGDOMAIN)
1210Sstevel@tonic-gate
122*2522Sraf$(POFILE):	$(POFILES)
1230Sstevel@tonic-gate	$(RM) $@
1240Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
1250Sstevel@tonic-gate
1260Sstevel@tonic-gategeneric.po:
1270Sstevel@tonic-gate	$(RM) messages.po
1280Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]* */*.[ch]*`
1290Sstevel@tonic-gate	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
1300Sstevel@tonic-gate	$(RM) messages.po
1310Sstevel@tonic-gate
1320Sstevel@tonic-gateFRC:
1330Sstevel@tonic-gate
1340Sstevel@tonic-gateinclude ../Makefile.targ
135