xref: /titanic_41/usr/src/lib/libcurses/Makefile (revision 70025d765b044c6d8594bb965a2247a61e991a99)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 1990-2002 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# lib/libcurses/Makefile
29#
30# The builds occur in isa subdirectories.
31#
32
33include	../Makefile.lib
34
35SUBDIRS = spec .WAIT $(MACH) $(BUILD64) $(MACH64)
36
37# conditional assignments
38all :=		TARGET= all
39install :=	TARGET= install
40clean :=	TARGET= clean
41clobber :=	TARGET= clobber
42lint :=		TARGET= lint
43test :=		TARGET= test
44
45SCRFILES = screen/keycaps \
46	screen/curses.h \
47	screen/keyname.c \
48	screen/termcap.c \
49	screen/tifget.c \
50	screen/tiget.c \
51	screen/tifnames.c \
52	screen/tnames.c \
53	screen/tinames.c \
54	screen/term.h
55
56# definitions for install_h target
57HDRS= 		curses.h term.h unctrl.h
58HDRDIR=		screen
59
60LIBRARY=	libcurses.a
61TEXT_DOMAIN=	SUNW_OST_OSLIB
62XGETFLAGS=	-a
63MSGDIRS=	screen
64POFILE=		$(LIBRARY:.a=.po)
65POFILES=	generic.po
66CLEANFILES +=	$(SCRFILES)
67
68# term.h doesn't pass cstyle due to numerous lines exceeding the 80 character
69# limit.  maketerm.ed can probably be fixed to prevent this, but it is arguable
70# if this work would ever be worth it.
71#
72screen/term.check      := CSTYLE_TAIL = | grep -v "line > 80 characters" | true
73
74.KEEP_STATE:
75
76all: $(SCRFILES) .WAIT $(SUBDIRS)
77
78install: all .WAIT $(SUBDIRS)
79
80clean clobber lint test: $(SUBDIRS)
81
82install_h: $(ROOTHDRS)
83
84check:	$(CHECKHDRS)
85
86scrfiles:	$(SCRFILES)
87
88$(MACH) $(MACH64) spec: FRC
89	@cd $@; pwd; $(MAKE) $(TARGET)
90
91ED = ed
92
93screen/curses.h:	screen/curses.ed screen/keycaps screen/tmp
94	(cd screen; $(ED) - < curses.ed)
95
96screen/keycaps:		screen/caps
97	grep "KEY_" screen/caps > screen/keycaps
98	@if tail -1 screen/keycaps | grep 'KEY_MOUSE' > /dev/null;then :; \
99		else echo new keys!! must change setkeymap.c; exit 1;fi
100
101screen/keyname.c:    screen/keyname.sh screen/keycaps
102	(cd screen; sh keyname.sh)
103
104screen/termcap.c:    screen/termcap.ed
105	(cd screen; $(ED) - < termcap.ed)
106	(cd screen; $(RM) bool num str)
107
108screen/tifget.c:     screen/tifget.ed
109	(cd screen; $(ED) - < tifget.ed)
110
111screen/tiget.c:      screen/tiget.ed
112	(cd screen; $(ED) - < tiget.ed)
113
114screen/tnames.c screen/tinames.c screen/tifnames.c \
115screen/term.h:   screen/maketerm.ed
116	(cd screen; $(ED) - < maketerm.ed)
117
118screen/tmp:
119	rm -rf $@
120	mkdir $@
121
122_msg:	$(MSGDOMAIN) $(POFILE)
123	$(RM) $(MSGDOMAIN)/$(POFILE)
124	$(CP) $(POFILE) $(MSGDOMAIN)
125
126$(POFILE): .WAIT $(POFILES)
127	$(RM) $@
128	$(CAT) $(POFILES) > $@
129
130generic.po:
131	$(RM) messages.po
132	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]* */*.[ch]*`
133	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
134	$(RM) messages.po
135
136FRC:
137
138include ../Makefile.targ
139