xref: /titanic_44/usr/src/cmd/diff/Makefile (revision ea8dc4b6d2251b437950c0056bc626b311c73c27)
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#ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28
29PROG= diff diffh
30SRCS=	$(PROG:%=%.c)
31DIFF= diff
32DIFFH= diffh
33
34include ../Makefile.cmd
35#
36# for messaging catalog
37#
38POFILE= diff.po
39DCFILE= diff.dc
40#XGETFLAGS += -a -x diff.xcl
41
42ROOTBINDIFF = $(DIFF:%=$(ROOTBIN)/%)
43ROOTLIBDIFFH = $(DIFFH:%=$(ROOTLIB)/%)
44
45.KEEP_STATE:
46
47all: $(PROG)
48
49#
50# Use private rule
51#
52$(POFILE):
53	$(RM) $@
54	$(COMPILE.cpp)   $(SRCS) > diff.po.i
55	$(XGETTEXT) $(XGETFLAGS) diff.po.i
56	sed "/^domain/d"        messages.po     > $@
57	$(RM)  diff.po.i messages.po
58
59$(DCFILE):
60	$(RM) $@
61	$(COMPILE.cpp)   $(SRCS) > diff.dc.i
62	$(XGETTEXT) -c TRANSLATION_NOTE_FOR_DC -t diff.dc.i
63	sed "/^domain/d"        messages.po     > $@
64	$(RM)  diff.dc.i messages.po
65
66install: all $(ROOTBINDIFF) $(ROOTLIBDIFFH)
67
68clean:
69
70lint:
71	$(LINT.c) diff.c $(LDLIBS)
72	$(LINT.c) diffh.c $(LDLIBS)
73
74include ../Makefile.targ
75