changeset 9919:939a08fcdd44

6849573 usr/src/tools license files should live under usr/src/tools
author Mark J. Nelson <Mark.J.Nelson@Sun.COM>
date Sat, 20 Jun 2009 12:08:08 -0600
parents dd75fc2aa755
children 9a117fecafb3
files usr/src/tools/Makefile.tools usr/src/tools/SUNWonbld/Makefile usr/src/tools/onbld/Checks/Makefile usr/src/tools/onbld/Makefile usr/src/tools/onbld/Scm/Makefile usr/src/tools/onbld/THIRDPARTYLICENSE.descrip usr/src/tools/onbld/hgext/Makefile usr/src/tools/opensolaris/license-list usr/src/tools/scripts/onblddrop.sh
diffstat 9 files changed, 52 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/tools/Makefile.tools	Sat Jun 20 16:53:58 2009 +0800
+++ b/usr/src/tools/Makefile.tools	Sat Jun 20 12:08:08 2009 -0600
@@ -31,6 +31,8 @@
 
 FILEMODE=	0555
 
+CLOBBERFILES += $(PYOBJS)
+
 TOOLS=			$(SRC)/tools
 TOOLS_PROTO=		$(TOOLS)/proto
 ROOTOPT=		$(TOOLS_PROTO)/opt
--- a/usr/src/tools/SUNWonbld/Makefile	Sat Jun 20 16:53:58 2009 +0800
+++ b/usr/src/tools/SUNWonbld/Makefile	Sat Jun 20 12:08:08 2009 -0600
@@ -18,17 +18,41 @@
 #
 # CDDL HEADER END
 #
+
 #
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
+
 include ../../Makefile.master
 include $(PKGDEFS)/Makefile.com
 include ../Makefile.tools
 
-LICENSEFILES += ../ctf/dwarf/THIRDPARTYLICENSE $(GPLV2)
+#
+# Warning: do not use the common license files here.  Instead, make sure
+# that all files listed in LICENSEFILES come from somewhere under the
+# usr/src/tools directory, have a corresponding .descrip file, and have a
+# corresponding entry in usr/src/tools/opensolaris/license-list.
+#
+# If they only apply to source under usr/src/tools, simply integrate
+# the licenses as source-code-managed text files, as with the dwarf
+# license referenced below.
+#
+# If the licenses are duplicated in other parts of the source tree,
+# create a Makefile target to copy them into place, as is done in
+# usr/src/tools/onbld/Makefile for the onbld license referenced below.
+#
+# This dance ensures that the appropriate licenses are incorporated into
+# both the package copyright file and the tools tarball license file.
+# See usr/src/tools/scripts/mktpl.pl for details.
+#
+LICENSEFILES += \
+	../ctf/dwarf/THIRDPARTYLICENSE \
+	../onbld/THIRDPARTYLICENSE
+
+CLEANFILES += bld_awk_pkginfo
+
+CLOBBERFILES += awk_pkginfo
 
 .KEEP_STATE:
 
@@ -60,9 +84,11 @@
 $(MACHDATAFILES): $(PKGDEFS)/common_files/$$@_$(MACH)
 	$(RM) $@; cp $(PKGDEFS)/common_files/$@_$(MACH) $@
 
-clobber clean:
-	-$(RM) $(CLOBBERFILES) $(CLEANFILES)
-	-$(RM) awk_pkginfo bld_awk_pkginfo
+clean:
+	-$(RM) $(CLEANFILES)
+
+clobber: clean
+	-$(RM) $(CLOBBERFILES)
 
 copyright: $(BUILDPKGCR) $(LICENSEFILES)
 	@$(DO_BUILDPKGCR)
--- a/usr/src/tools/onbld/Checks/Makefile	Sat Jun 20 16:53:58 2009 +0800
+++ b/usr/src/tools/onbld/Checks/Makefile	Sat Jun 20 12:08:08 2009 -0600
@@ -56,7 +56,6 @@
 install: $(ROOTONBLDCHECKSFILES)
 
 clean:
-	$(RM) $(PYOBJS)
 
 $(ROOTONBLDLIBPY)/onbld/Checks/%: %
 	$(INS.pyfile)
--- a/usr/src/tools/onbld/Makefile	Sat Jun 20 16:53:58 2009 +0800
+++ b/usr/src/tools/onbld/Makefile	Sat Jun 20 12:08:08 2009 -0600
@@ -20,11 +20,9 @@
 #
 
 #
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 include $(SRC)/Makefile.master
 include ../Makefile.tools
@@ -44,18 +42,24 @@
 all := TARGET = all
 install := TARGET = install
 clean := TARGET = clean
+clobber := TARGET = clobber
 
 ROOTONBLDBASEFILES=	$(PYFILES:%=$(ROOTONBLDLIBPY)/onbld/%)
 $(ROOTONBLDBASEFILES) := FILEMODE = 0444
 
+CLOBBERFILES += THIRDPARTYLICENSE
+
 .KEEP_STATE:
 
-all: $(PYOBJS) $(SUBDIRS)
+all: $(PYOBJS) $(SUBDIRS) THIRDPARTYLICENSE
+
+install: all $(ROOTONBLDBASEFILES) $(SUBDIRS)
 
-install: $(ROOTONBLDBASEFILES) $(SUBDIRS)
+clean clobber: $(SUBDIRS)
 
-clean: $(SUBDIRS)
-	$(RM) $(PYOBJS)
+THIRDPARTYLICENSE: $(SRC)/pkgdefs/license_files/lic_GPLv2
+	$(RM) $@
+	$(CAT) $? > $@
 
 $(ROOTONBLDLIBPY)/onbld/%: %
 	$(INS.pyfile)
--- a/usr/src/tools/onbld/Scm/Makefile	Sat Jun 20 16:53:58 2009 +0800
+++ b/usr/src/tools/onbld/Scm/Makefile	Sat Jun 20 12:08:08 2009 -0600
@@ -20,11 +20,9 @@
 #
 
 #
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 include $(SRC)/Makefile.master
 include ../../Makefile.tools
@@ -50,7 +48,6 @@
 install: all .WAIT $(ROOTONBLDSCMFILES)
 
 clean:
-	$(RM) $(PYOBJS)
 
 $(ROOTONBLDLIBPY)/onbld/Scm/%: %
 	$(INS.pyfile)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/tools/onbld/THIRDPARTYLICENSE.descrip	Sat Jun 20 12:08:08 2009 -0600
@@ -0,0 +1,1 @@
+SUNWonbld tools requiring use of Mercurial internals
--- a/usr/src/tools/onbld/hgext/Makefile	Sat Jun 20 16:53:58 2009 +0800
+++ b/usr/src/tools/onbld/hgext/Makefile	Sat Jun 20 12:08:08 2009 -0600
@@ -20,18 +20,16 @@
 #
 
 #
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 include $(SRC)/Makefile.master
 include ../../Makefile.tools
 
 PYSRCS= \
 	__init__.py	\
-	cdm.py		\
+	cdm.py
 
 PYOBJS = $(PYSRCS:%.py=%.pyc)
 
@@ -48,7 +46,6 @@
 install: all .WAIT $(ROOTONBLDHGEXTFILES)
 
 clean:
-	$(RM) $(PYOBJS)
 
 $(ROOTONBLDLIBPY)/onbld/hgext/%: %
 	$(INS.pyfile)
--- a/usr/src/tools/opensolaris/license-list	Sat Jun 20 16:53:58 2009 +0800
+++ b/usr/src/tools/opensolaris/license-list	Sat Jun 20 12:08:08 2009 -0600
@@ -116,6 +116,7 @@
 usr/src/lib/print/libhttp-core/common/LICENSE.txt
 usr/src/stand/lib/tcp/THIRDPARTYLICENSE
 usr/src/tools/ctf/dwarf/THIRDPARTYLICENSE
+usr/src/tools/onbld/THIRDPARTYLICENSE
 usr/src/ucbcmd/basename/THIRDPARTYLICENSE
 usr/src/ucbcmd/echo/THIRDPARTYLICENSE
 usr/src/ucbcmd/from/THIRDPARTYLICENSE
--- a/usr/src/tools/scripts/onblddrop.sh	Sat Jun 20 16:53:58 2009 +0800
+++ b/usr/src/tools/scripts/onblddrop.sh	Sat Jun 20 12:08:08 2009 -0600
@@ -21,11 +21,9 @@
 #
 
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 #
 # Make SUNWonbld package tarball for OpenSolaris.  Besides the
@@ -78,9 +76,6 @@
     fail "$PKGARCHIVE/SUNWonbld is missing."
 (cd $PKGARCHIVE; tar cf - SUNWonbld) | (cd $stagedir/$subdir; tar xf -)
 
-# Insert binary license files.
-cp -p $SRC/tools/opensolaris/BINARYLICENSE.txt $stagedir/$subdir || \
-    fail "Can't add BINARYLICENSE.txt"
 mkreadme $stagedir/$subdir
 cp -p $CODEMGR_WS/THIRDPARTYLICENSE.ON-BUILD-TOOLS $stagedir/$subdir || \
     fail "Can't add THIRDPARTYLICENSE.ON-BUILD-TOOLS."