usr/src/Makefile
author Susan Sohn <susan.sohn@oracle.com>
Thu, 04 Aug 2011 15:40:51 -0700
changeset 1358 6016d5e46a08
parent 1221 31c6d2de5731
child 1379 c41058d1a083
permissions -rw-r--r--
7066078 installadm should be able to create a service from a package 7066662 default service name needs improvement
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
     1
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
     2
# CDDL HEADER START
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
     3
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
     7
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    10
# See the License for the specific language governing permissions
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    11
# and limitations under the License.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    12
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    18
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    19
# CDDL HEADER END
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    20
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    21
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    22
#
1027
d1592dcaeb87 7025614 ai-publish-pkg stage isn't publishing a pkg
Keith Mitchell <keith.mitchell@oracle.com>
parents: 848
diff changeset
    23
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    24
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    25
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    26
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    27
# Top-level Makefile
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    28
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    29
# include global definitions
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    30
include Makefile.master
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    31
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    32
# the Targetdirs file is the AT&T target.dirs file in a makefile format.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    33
# it defines TARGETDIRS and ROOTDIRS.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    34
include Targetdirs
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    35
73
7cfbed527595 snap upgrade phase I
Ethan Quach <Ethan.Quach@Sun.COM>
parents: 27
diff changeset
    36
SUBDIRS=	tools man lib cmd
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    37
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    38
all:=		TARGET=	all
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    39
clean:=		TARGET=	clean
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    40
clobber:=	TARGET=	clobber
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    41
headers:=	TARGET= headers
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    42
install:=	TARGET=	install
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    43
lint:=		TARGET= lint
11
8a02d099fa47 380 create packages for slim_source gate
"mw145384 <moriah.waterland@sun.com>"
parents: 8
diff changeset
    44
pkgs:=		TARGET= pkgs
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    45
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    46
.KEEP_STATE:
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    47
1027
d1592dcaeb87 7025614 ai-publish-pkg stage isn't publishing a pkg
Keith Mitchell <keith.mitchell@oracle.com>
parents: 848
diff changeset
    48
install:	headers .WAIT man .WAIT lib .WAIT cmd
d1592dcaeb87 7025614 ai-publish-pkg stage isn't publishing a pkg
Keith Mitchell <keith.mitchell@oracle.com>
parents: 848
diff changeset
    49
d1592dcaeb87 7025614 ai-publish-pkg stage isn't publishing a pkg
Keith Mitchell <keith.mitchell@oracle.com>
parents: 848
diff changeset
    50
all:	install .WAIT pkgs
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    51
848
59b0d009aae9 16433 install-incorporation: Provide empty package manifests for renamed/obsolete pkgs
Keith Mitchell <keith.mitchell@oracle.com>
parents: 827
diff changeset
    52
clean clobber lint: $(SUBDIRS) pkg
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    53
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    54
proto: headers
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    55
224
a84d79c3ca2a 3165 Add SUNWstosreg to slim_source
Dave Miner <dminer@opensolaris.org>
parents: 154
diff changeset
    56
headers: rootdirs .WAIT build-tools .WAIT $(SUBDIRS)
a84d79c3ca2a 3165 Add SUNWstosreg to slim_source
Dave Miner <dminer@opensolaris.org>
parents: 154
diff changeset
    57
a84d79c3ca2a 3165 Add SUNWstosreg to slim_source
Dave Miner <dminer@opensolaris.org>
parents: 154
diff changeset
    58
rootdirs: $(ROOTDIRS)
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    59
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    60
# We use our own local tools when creating the header files.  These
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    61
# should eventually be packaged separately and delivered onto build
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    62
# machines, rather than rebuilt with every nightly run.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    63
build-tools:
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    64
	@cd tools; pwd; $(MAKE) install
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    65
848
59b0d009aae9 16433 install-incorporation: Provide empty package manifests for renamed/obsolete pkgs
Keith Mitchell <keith.mitchell@oracle.com>
parents: 827
diff changeset
    66
$(SUBDIRS) pkg: FRC
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    67
	@cd $@; pwd; $(MAKE) $(TARGET)
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    68
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    69
$(XGETSH): $(ROOTDIRS)
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    70
	@cd $(SRC)/tools/xgetsh; pwd; $(MAKE) install
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    71
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    72
FRC:
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    73
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    74
$(ROOTDIRS):
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    75
	$(INS.dir)
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    76
11
8a02d099fa47 380 create packages for slim_source gate
"mw145384 <moriah.waterland@sun.com>"
parents: 8
diff changeset
    77
pkgs:
827
a522c6d6cba1 15784 slim_source gate should build IPS packages by default
David Miner <dminer@opensolaris.org>
parents: 284
diff changeset
    78
	@cd $(SRC)/pkg; pwd; $(MAKE) install
11
8a02d099fa47 380 create packages for slim_source gate
"mw145384 <moriah.waterland@sun.com>"
parents: 8
diff changeset
    79
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    80
# Build the TAGS file for etags, the Emacs cross-referencer
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    81
ETAGS=etags
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    82
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    83
etags:
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    84
	@-rm TAGS
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    85
	find . \( -type d \( -name Codemgr_wsdata -o -name SCCS -o -name .del\* \) \) -prune -o \
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    86
	       \( -name '*.[Ccshlxy]' -o -name \*.java -o -name \*.cc \) -print | $(ETAGS) -
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    87
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    88
CTAGS=ctags
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    89
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    90
ctags:
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    91
	@-rm tags
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    92
	find . \( -type d \( -name Codemgr_wsdata -o -name SCCS -o -name .del\* \) \) -prune -o \
1221
31c6d2de5731 7042146 Implement ISIM project
Susan Sohn <susan.sohn@oracle.com>
parents: 1027
diff changeset
    93
	       \( -name '*.[Ccshlxy]' -o -name \*.py -o -name \*.java -o -name \*.cc \) -print | xargs $(CTAGS) -a
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    94
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    95
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    96
# The cscope.out file is made in the current directory and spans the
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    97
# entire source tree.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    98
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
    99
# Things to note:
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   100
#   1. We use relative names for cscope
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   101
#   2. Unlike ON, our workspace is small enough that we can easily rebuild
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   102
#      the database each time, so we do blow it away first.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   103
#
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   104
CSDIR=.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   105
CSCOPE=cscope
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   106
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   107
cscope:
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   108
	@-rm cscope.files cscope.out
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   109
	find . \( -type d \( -name Codemgr_wsdata -o -name SCCS -o -name .del\* \) \) -prune -o \
1221
31c6d2de5731 7042146 Implement ISIM project
Susan Sohn <susan.sohn@oracle.com>
parents: 1027
diff changeset
   110
	       \( -name '*.[Ccshlxy]' -o -name '*.py' -o -name Makefile\* \) -print > cscope.files
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   111
	$(CSCOPE) -b
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   112
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   113
.NO_PARALLEL: cc-version cc64-version java-version
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   114
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   115
# Compiler version reporting; used by nightly.
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   116
cc-version:
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   117
	@if $(CC) -flags >/dev/null 2>/dev/null; then	\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   118
		$(ECHO) 32-bit compiler;		\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   119
		which $(CC);				\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   120
		$(CC) -V 2>&1 | head -1;		\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   121
	else						\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   122
		$(ECHO) No 32-bit compiler found;	\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   123
		exit 1;					\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   124
	fi
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   125
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   126
cc64-version:
234
5fbc3808c405 3639 Makefile needs to be updated to reflect correct option for 64-bit
Virginia Wray <Virginia.Wray@Sun.COM>
parents: 224
diff changeset
   127
	@__VERSION=`$(CC) -m64 -E /dev/null 2>&1 >/dev/null`; \
0
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   128
	if [ -z "$$__VERSION" ]; then			\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   129
		$(ECHO) 64-bit compiler;		\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   130
		which $(CC);				\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   131
		$(CC) -V 2>&1 | head -1;		\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   132
	else						\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   133
		$(ECHO) No 64-bit compiler found;	\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   134
		exit 1;					\
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   135
	fi
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   136
87f703f8362e OpenSolaris files for Slim Install
"mw145384 <moriah.waterland@sun.com>"
parents:
diff changeset
   137
java-version:
284
24cd9b9e4f45 30 reboot on livecd calls bootadm and updates the hard disk's archive
Glenn Lagasse <Glenn.Lagasse@Sun.COM>
parents: 273
diff changeset
   138
	@$(ECHO) Java compiler;				\
273
c07e2ad22c83 3904 Fix for bug 2082 broke nightly for slim_source
Dave Miner <dminer@opensolaris.org>
parents: 234
diff changeset
   139
	$(ECHO) Java not used in this build