xref: /onnv-gate/usr/src/cmd/msgfmt/Makefile (revision 2686:1b8b650ffc38)
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*2686Sna195498# Common Development and Distribution License (the "License").
6*2686Sna195498# 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*2686Sna195498# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate# Use is subject to license terms.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate#       Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
260Sstevel@tonic-gate#         All Rights Reserved
270Sstevel@tonic-gate#
280Sstevel@tonic-gate
290Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
300Sstevel@tonic-gate
310Sstevel@tonic-gate# cmd/msgfmt/Makefile
320Sstevel@tonic-gate
330Sstevel@tonic-gateinclude ../Makefile.cmd
340Sstevel@tonic-gate
350Sstevel@tonic-gateXOBJS=	xgettext.o
360Sstevel@tonic-gate
370Sstevel@tonic-gateLXOBJS=	xgettext.lx.o
380Sstevel@tonic-gate
390Sstevel@tonic-gateGOBJS=	gnu_msgfmt.o gnu_handle.o gnu_lex.o gnu_hash.o gnu_check.o
400Sstevel@tonic-gate
410Sstevel@tonic-gateYOBJS=	gnu_po.o
420Sstevel@tonic-gate
430Sstevel@tonic-gateBOBJS=	gnu_msgs.o
440Sstevel@tonic-gate
450Sstevel@tonic-gateLOBJS=	gnu_msgs_rev.o
460Sstevel@tonic-gate
470Sstevel@tonic-gateSOBJS=	msgfmt.o check_header.o
480Sstevel@tonic-gate
490Sstevel@tonic-gateCOBJS=	option.o util.o
500Sstevel@tonic-gate
510Sstevel@tonic-gateBINPROG= msgfmt xgettext
520Sstevel@tonic-gateLIBPROG= gmsgfmt
530Sstevel@tonic-gatePROG=  $(BINPROG) $(LIBPROG)
540Sstevel@tonic-gate
550Sstevel@tonic-gateYFLAGS += -d
560Sstevel@tonic-gateLINTFLAGS +=	-um
570Sstevel@tonic-gate
580Sstevel@tonic-gatePOFILE= msgfmt_all.po
590Sstevel@tonic-gatePOFILES= $(SOBJS:%.o=%.po) $(GOBJS:%.o=%.po) $(COBJS:%.o=%.po) \
600Sstevel@tonic-gate	$(BOBJS:%.o=%.po) $(YOBJS:%.o=%.po)
610Sstevel@tonic-gate
620Sstevel@tonic-gateCLOBBERFILES += gmsgfmt_rev
630Sstevel@tonic-gate
640Sstevel@tonic-gateROOTBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
650Sstevel@tonic-gateROOTLIBPROG= $(LIBPROG:%=$(ROOTLIB)/%)
660Sstevel@tonic-gate
670Sstevel@tonic-gate.KEEP_STATE:
680Sstevel@tonic-gate
690Sstevel@tonic-gate.PARALLEL:	$(SOBJS) $(GOBJS) $(YOBJS) $(COBJS) $(BOBJS) $(LOBJS) \
700Sstevel@tonic-gate		$(XOBJS) $(LXOBJS)
710Sstevel@tonic-gate
720Sstevel@tonic-gateall: $(PROG) gmsgfmt_rev
730Sstevel@tonic-gate
740Sstevel@tonic-gatemsgfmt:	$(SOBJS) $(COBJS)
750Sstevel@tonic-gate	$(LINK.c) $(SOBJS) $(COBJS) -o $@ $(LDLIBS)
760Sstevel@tonic-gate	$(POST_PROCESS)
770Sstevel@tonic-gate
780Sstevel@tonic-gategmsgfmt:	$(GOBJS) $(YOBJS) $(BOBJS) $(COBJS)
790Sstevel@tonic-gate	$(LINK.c) $(GOBJS) $(YOBJS) $(BOBJS) $(COBJS) -o $@ $(LDLIBS)
800Sstevel@tonic-gate	$(POST_PROCESS)
810Sstevel@tonic-gate
820Sstevel@tonic-gategmsgfmt_rev:	$(GOBJS) $(YOBJS) $(LOBJS) $(COBJS)
830Sstevel@tonic-gate	$(LINK.c) $(GOBJS) $(YOBJS) $(LOBJS) $(COBJS) -o $@ $(LDLIBS)
840Sstevel@tonic-gate	$(POST_PROCESS)
850Sstevel@tonic-gate
860Sstevel@tonic-gatexgettext: $(XOBJS) $(LXOBJS)
870Sstevel@tonic-gate	$(LINK.c) $(XOBJS) $(LXOBJS) -o $@ $(LDLIBS)
880Sstevel@tonic-gate	$(POST_PROCESS)
890Sstevel@tonic-gate
900Sstevel@tonic-gate$(POFILE):	$(POFILES)
910Sstevel@tonic-gate	$(RM) $@
920Sstevel@tonic-gate	cat $(POFILES) > $@
930Sstevel@tonic-gate
940Sstevel@tonic-gateinstall: all $(ROOTBINPROG) $(ROOTLIBPROG)
950Sstevel@tonic-gate
960Sstevel@tonic-gateclean:
970Sstevel@tonic-gate	$(RM) $(SOBJS) $(GOBJS) $(YOBJS) $(COBJS) \
980Sstevel@tonic-gate		$(XOBJS) $(LXOBJS) $(BOBJS) $(LOBJS) \
99*2686Sna195498		$(POFILE) $(POFILES) gnu_po.c y.tab.h xgettext.lx.c
1000Sstevel@tonic-gate
1010Sstevel@tonic-gatelint:	gnu_po.c y.tab.h
1020Sstevel@tonic-gate	$(LINT.c) $(SOBJS:%.o=%.c) $(COBJS:%.o=%.c) $(LDLIBS)
1030Sstevel@tonic-gate	$(LINT.c) $(GOBJS:%.o=%.c) $(BOBJS:%.o=%.c) $(COBJS:%.o=%.c) $(LDLIBS)
1040Sstevel@tonic-gate	$(LINT.c) $(GOBJS:%.o=%.c) $(LOBJS:%.o=%.c) $(COBJS:%.o=%.c) $(LDLIBS)
1050Sstevel@tonic-gate	$(LINT.c) $(XOBJS:%.o=%.c) $(LDLIBS)
1060Sstevel@tonic-gate
1070Sstevel@tonic-gategnu_po.c + y.tab.h:	gnu_po.y
1080Sstevel@tonic-gate	$(RM) gnu_po.c y.tab.h
1090Sstevel@tonic-gate	$(YACC.y) gnu_po.y
1100Sstevel@tonic-gate	mv y.tab.c gnu_po.c
1110Sstevel@tonic-gate
1120Sstevel@tonic-gategnu_lex.o:	y.tab.h
1130Sstevel@tonic-gate
1140Sstevel@tonic-gateinclude ../Makefile.targ
115