5767 fix several problems with zfs test suite
[unleashed.git] / usr / src / cmd / msgfmt / Makefile
blob63b22a8d507d4195d382754b5f33a1b71fc3daf4
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
26 # All Rights Reserved
29 # cmd/msgfmt/Makefile
31 include ../Makefile.cmd
33 XOBJS= xgettext.o
35 LXOBJS= xgettext.lx.o
37 GOBJS= gnu_msgfmt.o gnu_handle.o gnu_lex.o gnu_hash.o gnu_check.o
39 YOBJS= gnu_po.o
41 BOBJS= gnu_msgs.o
43 LOBJS= gnu_msgs_rev.o
45 SOBJS= msgfmt.o check_header.o
47 COBJS= option.o util.o
49 BINPROG= msgfmt xgettext
50 LIBPROG= gmsgfmt
51 PROG= $(BINPROG) $(LIBPROG)
53 YFLAGS += -d
54 LINTFLAGS += -um
56 POFILE= msgfmt_all.po
57 POFILES= $(SOBJS:%.o=%.po) $(GOBJS:%.o=%.po) $(COBJS:%.o=%.po) \
58 $(BOBJS:%.o=%.po) $(YOBJS:%.o=%.po)
60 CLOBBERFILES += gmsgfmt_rev
62 ROOTBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
63 ROOTLIBPROG= $(LIBPROG:%=$(ROOTLIB)/%)
65 CERRWARN += -_gcc=-Wno-parentheses
66 CERRWARN += -_gcc=-Wno-unused-label
67 CERRWARN += -_gcc=-Wno-uninitialized
68 CERRWARN += -_gcc=-Wno-unused-variable
70 .KEEP_STATE:
72 .PARALLEL: $(SOBJS) $(GOBJS) $(YOBJS) $(COBJS) $(BOBJS) $(LOBJS) \
73 $(XOBJS) $(LXOBJS)
75 all: $(PROG) gmsgfmt_rev
77 msgfmt: $(SOBJS) $(COBJS)
78 $(LINK.c) $(SOBJS) $(COBJS) -o $@ $(LDLIBS)
79 $(POST_PROCESS)
81 gmsgfmt: $(GOBJS) $(YOBJS) $(BOBJS) $(COBJS)
82 $(LINK.c) $(GOBJS) $(YOBJS) $(BOBJS) $(COBJS) -o $@ $(LDLIBS)
83 $(POST_PROCESS)
85 gmsgfmt_rev: $(GOBJS) $(YOBJS) $(LOBJS) $(COBJS)
86 $(LINK.c) $(GOBJS) $(YOBJS) $(LOBJS) $(COBJS) -o $@ $(LDLIBS)
87 $(POST_PROCESS)
89 xgettext: $(XOBJS) $(LXOBJS)
90 $(LINK.c) $(XOBJS) $(LXOBJS) -o $@ $(LDLIBS)
91 $(POST_PROCESS)
93 $(POFILE): $(POFILES)
94 $(RM) $@
95 cat $(POFILES) > $@
97 install: all $(ROOTBINPROG) $(ROOTLIBPROG)
99 clean:
100 $(RM) $(SOBJS) $(GOBJS) $(YOBJS) $(COBJS) \
101 $(XOBJS) $(LXOBJS) $(BOBJS) $(LOBJS) \
102 $(POFILE) $(POFILES) gnu_po.c y.tab.h xgettext.lx.c
104 lint: gnu_po.c y.tab.h
105 $(LINT.c) $(SOBJS:%.o=%.c) $(COBJS:%.o=%.c) $(LDLIBS)
106 $(LINT.c) $(GOBJS:%.o=%.c) $(BOBJS:%.o=%.c) $(COBJS:%.o=%.c) $(LDLIBS)
107 $(LINT.c) $(GOBJS:%.o=%.c) $(LOBJS:%.o=%.c) $(COBJS:%.o=%.c) $(LDLIBS)
108 $(LINT.c) $(XOBJS:%.o=%.c) $(LDLIBS)
110 gnu_po.c + y.tab.h: gnu_po.y
111 $(RM) gnu_po.c y.tab.h
112 $(YACC.y) gnu_po.y
113 mv y.tab.c gnu_po.c
115 gnu_lex.o: y.tab.h
117 include ../Makefile.targ