Merge commit 'b1e7e97d3b60469b243b3b2e22c7d8cbd11c7c90'
[unleashed.git] / usr / src / cmd / who / Makefile
bloba5e87969ddac05824821191297f92fe2a7e44099
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
21 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
22 # Use is subject to license terms.
25 PROG= who
26 DCFILE=$(PROG).dc
27 UTMPS= utmpx
28 ROOTADM= $(ROOT)/var/adm
29 ROOTUTMPS= $(UTMPS:%=$(ROOTADM)/%)
30 SYMSETC= $(UTMPS:%=$(ROOTETC)/%)
31 CLOBBERFILES += $(UTMPS)
33 include ../Makefile.cmd
35 SED= sed
37 $(ROOTUTMPS):= FILEMODE= 644
39 $(ROOTADM)/%: %
40 $(INS.file)
42 .KEEP_STATE:
44 CPPFLAGS += -DXPG4
46 all: $(PROG) $(UTMPS)
48 $(UTMPS):
49 touch $@
51 install: all $(ROOTPROG) $(ROOTUTMPS) $(SYMSETC)
53 $(SYMSETC):
54 -$(RM) $@; $(SYMLINK) ../var/adm/$(@F) $@
56 clean:
59 $(DCFILE): $(PROG).c
60 $(RM) $(DCFILE)
61 $(COMPILE.cpp) $(PROG).c | \
62 $(XGETTEXT) $(XGETFLAGS) -t -
63 $(SED) -e '/^domain/d' messages.po > $@
64 $(RM) messages.po
66 include ../Makefile.targ