xref: /titanic_52/usr/src/cmd/ptools/Makefile (revision 0a44ef6d9afbfe052a7e975f55ea0d2954b62a82)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29
30include ../Makefile.cmd
31
32#
33# Don't add new ptools here; these are legacy ptools which must be symlinked
34# into /usr/proc/bin
35#
36LEGACY_SUBDIRS =\
37	pcred	\
38	pfiles	\
39	pflags	\
40	pldd	\
41	pmap	\
42	prun	\
43	psig	\
44	pstack	\
45	pstop	\
46	ptime	\
47	ptree	\
48	pwait	\
49	pwdx
50
51#
52# 'new' ptools are not symlinked into /usr/proc/bin
53#
54NEW_SUBDIRS =	\
55	pargs	\
56	plgrp	\
57	pmadvise \
58	ppriv	\
59	preap
60
61SUBDIRS = $(LEGACY_SUBDIRS) $(NEW_SUBDIRS)
62
63all	:=	TARGET = all
64install	:=	TARGET = install
65clean	:=	TARGET = clean
66clobber	:=	TARGET = clobber
67lint	:=	TARGET = lint
68_msg	:=	TARGET = _msg
69
70#
71# Commands with messages support
72#
73POFILES = plgrp/plgrp.po pmadvise/pmadvise.po
74POFILE = ptools.po
75
76.KEEP_STATE:
77
78.PARALLEL: $(SUBDIRS)
79
80all install clean clobber lint: $(SUBDIRS)
81
82$(NEW_SUBDIRS): FRC
83	@cd $@; pwd; $(MAKE) PTOOL_TYPE=NEW -f ../Makefile.ptool $(TARGET)
84
85$(LEGACY_SUBDIRS): FRC
86	@cd $@; pwd; $(MAKE) PTOOL_TYPE=LEGACY -f ../Makefile.ptool $(TARGET)
87
88#
89# Combine all messages files into a single file and copy it to
90# MSGDOMAIN directory
91#
92_msg: ${POFILES}
93	$(RM) $(POFILE)
94	$(CAT) $(POFILES) > $(POFILE)
95	$(RM)  $(MSGDOMAIN)/$(POFILE)
96	$(CP) $(POFILE) $(MSGDOMAIN)
97
98FRC:
99