xref: /titanic_50/usr/src/cmd/abi/appcert/scripts/Makefile (revision 2fcbc377041d659446ded306a92901b4b0753b68)
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 (c) 1999-2001 by Sun Microsystems, Inc.
24# All rights reserved.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/abi/appcert/scripts/Makefile
29#
30
31SUFFIXES += .pl .pm
32
33PROG= appcert
34APPCERT_SUBCMDS= symcheck symprof symreport abi_index
35MODULES= AppcertUtil.pm
36
37SCRIPTS= 	$(PROG) $(APPCERT_SUBCMDS)
38MESSAGES=	$(SCRIPTS:%=%.po) $(MODULES:%.pm=%.po)
39
40
41CLEANFILES=	$(SCRIPTS) $(MESSAGES)
42CLOBBERFILES=	$(SCRIPTS) $(MESSAGES)
43
44include $(SRC)/cmd/Makefile.cmd
45
46ROOTLIBABIDIR   = $(ROOTLIB)/abi/appcert
47ROOTLIBABIFILES = $(APPCERT_SUBCMDS:%=$(ROOTLIBABIDIR)/%)	\
48		  $(MODULES:%=$(ROOTLIBABIDIR)/%)
49
50.KEEP_STATE:
51
52all: $(SCRIPTS) $(MODULES)
53
54#
55# install targets
56#	Note: Makefile.cmd has a rule to cover $(ROOTSHFILES), but
57# 	$(ROOTLIBABIFILES) are special install targets (go into
58#	dirs not covered by Makefile.cmd), so we provide an explicit
59#	rule for that.
60#
61
62install: all .WAIT $(ROOTPROG) $(ROOTLIBABIDIR) .WAIT $(ROOTLIBABIFILES)
63
64_msg: $(MSGDOMAIN) $(MESSAGES)
65	$(CP) $(MESSAGES) $(MSGDOMAIN)
66
67$(MSGDOMAIN):
68	$(INS.dir)
69
70.pl:
71	$(RM) $@
72	$(SED) -e "s@TEXT_DOMAIN@\"$(TEXT_DOMAIN)\"@" $< > $@
73	$(CHMOD) +x $@
74
75.pm:
76
77
78clean:
79	-$(RM) $(CLEANFILES)
80
81$(ROOTBINPROG): $(PROG)
82	$(INS.file)
83
84$(ROOTLIBABIDIR):
85	$(INS.dir)
86
87$(ROOTLIBABIDIR)/%: %
88	$(INS.file)
89
90%.po: %.pl
91	$(XGETTEXT) $(XGETFLAGS) $<
92	$(RM) $@
93	$(SED) "/^domain/d" messages.po > $@
94	$(RM) messages.po
95
96%.po: %.pm
97	$(XGETTEXT) $(XGETFLAGS) $<
98	$(RM) $@
99	$(SED) "/^domain/d" messages.po > $@
100	$(RM) messages.po
101
102lint:
103
104clobber:	clean
105	-$(RM) $(CLOBBERFILES)
106
107