Udiff Makefile.sfw
--- /export/home/steve/work/usr/webrev/src/cmd/xcpustate/Makefile.sfw-  Tue Jul 22 00:41:21 2008
+++ Makefile.sfw        Mon Jul 21 04:44:34 2008
@@ -20,52 +20,34 @@
 #
 #
 
 
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
 # Use is subject to license terms.
 #
-#ident "@(#)Makefile.sfw       1.2     01/02/04 SMI"
+#
 
-MAN1FILES= xcpustate.1
+VER=xcpustate-2.9
 
-PROG=xcpustate
+all: $(VER)/configure
+       (cd $(VER); env \
+           PATH=/usr/perl5/bin:/usr/sfw/bin:$(PATH) \
+           "LD_OPTIONS=-L/usr/sfw/lib -L$(ROOT)/opt/sfw/lib -R/usr/sfw/lib:/opt/sfw/lib" \
+           MAKE=/usr/sfw/bin/gmake /usr/sfw/bin/gmake -f Makefile.noimake)
+       @find . -name core -exec rm -f {} \;
 
-all     :=      TARGET = all
-install :=      TARGET = install
-
-all: $(PROG)
-
-OBJS= xcpustate.o Bar.o s.o rstat.o rstat_clnt.o rstat_xdr.o
-
 include ../Makefile.cmd
 
-CFLAGS += -DRSTAT -DSUNOS5
+install: all
+       $(SH) ./install-sfw
 
-LDLIBS += -lXaw -lXmu -lXt -lXext -lX11 -lkstat -lelf -lsocket -lnsl -lgen
+$(VER)/configure: $(VER).tar.gz
+       gzip -dc $(VER).tar.gz | /usr/sfw/bin/gtar xpf -
+       gpatch -p0 < Makefile.noimake.patch
 
-.KEEP_STATE:
-
-.PARALLEL: $(OBJS)
-
-$(PROG): $(OBJS)
-       $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
-
-install: all .WAIT $(ROOTOPTSFWBINPROG) .WAIT install_man 
-
-install_man: $(ROOTMAN1FILES)
-
 clean:
-       rm -f $(OBJS) rstat_svc.c rstat_xdr.c rstat_clnt.c
+       -rm -rf $(VER)
 
-xcpustate.1: xcpustate.man
-       rm -f xcpustate.1; cp xcpustate.man xcpustate.1
+include ../Makefile.targ
 
-rstat.c: rstat.h
-
-rstat.h rstat_clnt.c rstat_xdr.c: rstat.x
-       rpcgen rstat.x
-
 FRC:
-
-include ../Makefile.targ