usr/src/tools/onbld/Makefile
changeset 12216 5167f302c8cf
parent 11838 32bb5d254240
child 12998 c0270875939a
--- a/usr/src/tools/onbld/Makefile	Thu Apr 22 13:45:43 2010 +0100
+++ b/usr/src/tools/onbld/Makefile	Thu Apr 22 10:13:38 2010 -0700
@@ -20,8 +20,7 @@
 #
 
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
 include $(SRC)/Makefile.master
@@ -32,41 +31,37 @@
 	hgext	\
 	Scm
 
-PYSRCS= \
+PYSRCS = \
 	__init__.py
 
-PYOBJS= $(PYSRCS:%.py=%.pyc)
+PYOBJS =	$(PYSRCS:%.py=%.pyc)
+PYTOPDIR = 	$(ROOTONBLDLIB)
+PYMODDIR =	onbld
 
-PYFILES= $(PYSRCS) $(PYOBJS)
-
-all := TARGET = all
+all	:= TARGET = all
 install := TARGET = install
-clean := TARGET = clean
+clean	:= TARGET = clean
 clobber := TARGET = clobber
 
-ROOTONBLDBASEFILES=	$(PYFILES:%=$(ROOTONBLDLIBPY)/onbld/%)
-$(ROOTONBLDBASEFILES) := FILEMODE = 0444
-
 CLOBBERFILES += THIRDPARTYLICENSE
 
+include ../Makefile.python
+
 .KEEP_STATE:
 
-all: $(PYOBJS) $(SUBDIRS) THIRDPARTYLICENSE
+all: $(PYVERSOBJS) $(SUBDIRS) THIRDPARTYLICENSE
+
+install: all $(ROOTPYFILES) $(SUBDIRS)
 
-install: all $(ROOTONBLDBASEFILES) $(SUBDIRS)
+clean: $(SUBDIRS)
 
-clean clobber: $(SUBDIRS)
+clobber: clean pyclobber $(SUBDIRS)
 
 THIRDPARTYLICENSE: $(SRC)/pkg/license_files/lic_GPLv2
 	$(RM) $@
 	$(CAT) $? > $@
 
-$(ROOTONBLDLIBPY)/onbld/%: %
-	$(INS.pyfile)
-
 $(SUBDIRS): FRC
 	@cd $@; pwd; $(MAKE) $(TARGET)
 
 FRC:
-
-include ../Makefile.targ