Makefile (5084e753b79a753c8b532c06eb3ad1d025e8e472) Makefile (78add226e8da271dde8f3b5a91d340d1bf010151)
1#
2# CDDL HEADER START
3#
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.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 17 unchanged lines hidden (view full) ---

26#
27# include global definitions
28include Makefile.master
29#
30# the Targetdirs file is the AT&T target.dirs file in a makefile format.
31# it defines TARGETDIRS and ROOTDIRS.
32include Targetdirs
33
1#
2# CDDL HEADER START
3#
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.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 17 unchanged lines hidden (view full) ---

26#
27# include global definitions
28include Makefile.master
29#
30# the Targetdirs file is the AT&T target.dirs file in a makefile format.
31# it defines TARGETDIRS and ROOTDIRS.
32include Targetdirs
33
34COMMON_SUBDIRS= uts lib cmd ucblib ucbcmd psm
35sparc_SUBDIRS= stand
36i386_SUBDIRS= grub
34COMMON_SUBDIRS= uts lib cmd ucblib ucbcmd
37
38#
35
36#
39# sparc needs to build stand before psm
37# sparc needs to build both stand and psm, in that order
38# x86 needs to build psm and GRUB
40#
39#
41$(SPARC_BLD)psm: stand
40sparc_SUBDIRS= stand psm
41i386_SUBDIRS= psm grub
42
43SUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
44
45HDRSUBDIRS= uts head lib cmd
46
47# UCB headers are bug-for-bug compatible and not checkable against the header
48# standards.
49#

--- 21 unchanged lines hidden (view full) ---

71 SUNW_OST_UCBCMD \
72 SUNW_OST_ZONEINFO
73
74MSGDDIRS= $(DOMAINS:%=$(MSGROOT)/%)
75MSGDIRS= $(MSGROOT) $(MSGDDIRS) $(MSGROOT)/LC_TIME
76
77all all_xmod := TARGET= all
78install install_xmod := TARGET= install
42
43SUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
44
45HDRSUBDIRS= uts head lib cmd
46
47# UCB headers are bug-for-bug compatible and not checkable against the header
48# standards.
49#

--- 21 unchanged lines hidden (view full) ---

71 SUNW_OST_UCBCMD \
72 SUNW_OST_ZONEINFO
73
74MSGDDIRS= $(DOMAINS:%=$(MSGROOT)/%)
75MSGDIRS= $(MSGROOT) $(MSGDDIRS) $(MSGROOT)/LC_TIME
76
77all all_xmod := TARGET= all
78install install_xmod := TARGET= install
79install1 := TARGET= install
80install2 := TARGET= install
81install_h := TARGET= install_h
82clean := TARGET= clean
83clobber := TARGET= clobber
84check := TARGET= check
79install_h := TARGET= install_h
80clean := TARGET= clean
81clobber := TARGET= clobber
82check := TARGET= check
83_msg := TARGET= _msg
85
84
85
86.KEEP_STATE:
87
88#
86.KEEP_STATE:
87
88#
89# Note: install does not cause a build in pkg. To build packages,
89# Note: install only builds the all target for the pkg
90# directory. We are not yet ready to have an install
91# build create 'packages' also. To build packages
90# cd pkg and do a 'make install'
91#
92# cd pkg and do a 'make install'
93#
92
93all: mapfiles closedbins sgs .WAIT $(SUBDIRS) pkg
94
95#
96# The _msg build is a two-step process. First, the _msg dependency
97# causes recursive makes in $(MSGSUBDIRS), which stages raw message
98# files in $(ROOT)/catalog. Second, the action from the install
99# target rule causes those messages to be post-processed from where
100# they were staged in $(ROOT)/catalog, and the results placed into the
101# proto area.
102#
103# The stage-licenses target causes the license files needed for
104# packaging to be pulled from $(SRC) and $(CLOSED) and staged in
105# $(ROOT)/licenses.
106#
107install: install1 install2 _msg stage-licenses
94all: mapfiles closedbins sgs .WAIT $(SUBDIRS) pkg_all
95install: mapfiles closedbins sgs .WAIT $(SUBDIRS) pkg_all .WAIT _msg
108 @cd msg; pwd; $(MAKE) _msg
109 @rm -rf "$(ROOT)/catalog"
110
96 @cd msg; pwd; $(MAKE) _msg
97 @rm -rf "$(ROOT)/catalog"
98
111stage-licenses: install2
112 @cd pkg; pwd; $(MAKE) stage-licenses
99mapfiles: bldtools
100 @cd common/mapfiles; pwd; $(MAKE) install
113
101
114install1: mapfiles closedbins sgs
102clean clobber: $(SUBDIRS) head pkg
103_msg: _msgdirs rootdirs $(MSGSUBDIRS)
115
104
116install2: install1 $(SUBDIRS)
105# for a complete build from scratch
106crankturn: sgs uts pkg_all
107 @cd lib; pwd; $(MAKE) install
108 @cd cmd; pwd; $(MAKE) all
109 @cd ucblib; pwd; $(MAKE) install
110 @cd ucbcmd; pwd; $(MAKE) all
117
111
118_msg: _msgdirs rootdirs install2 FRC
119 @for m in $(MSGSUBDIRS); do \
120 cd $$m; pwd; $(MAKE) _msg; cd ..; \
121 done
112pkg_all:
113 @cd pkg; pwd; $(MAKE) all
122
114
123mapfiles: bldtools
124 @cd common/mapfiles; pwd; $(MAKE) install
115#
116# target for building a proto area for reference via the ROOT macro
117#
118protolibs: rootlibs ucblibs
125
119
126clean clobber: $(SUBDIRS) head pkg
120# build all ucb libraries
121#
122ucblibs:
123 @cd ucblib; pwd; $(MAKE) install
127
124
125# Base subset of rootproto, excluding ucb libraries
126#
127rootlibs: sgs
128 @cd lib; pwd; $(MAKE) install
129
128closedbins: FRC $(ROOTDIRS)
129 @CLOSED_ROOT="$$ON_CLOSED_BINS/root_$(MACH)$${RELEASE_BUILD+-nd}"; \
130 if [ "$$CLOSED_IS_PRESENT" = no ]; then \
131 if [ ! -d "$$CLOSED_ROOT" ]; then \
132 $(ECHO) "Error: if closed sources are not present," \
133 "ON_CLOSED_BINS must point to closed binaries."; \
134 $(ECHO) "root_$(MACH)$${RELEASE_BUILD+-nd} is not" \
135 "present in $$ON_CLOSED_BINS."; \
136 exit 1; \
137 fi; \
138 $(ECHO) "Copying closed binaries from $$CLOSED_ROOT"; \
139 (cd $$CLOSED_ROOT; tar cf - .) | \
140 (cd $(ROOT); tar xBpf -); \
141 fi
142
143#
130closedbins: FRC $(ROOTDIRS)
131 @CLOSED_ROOT="$$ON_CLOSED_BINS/root_$(MACH)$${RELEASE_BUILD+-nd}"; \
132 if [ "$$CLOSED_IS_PRESENT" = no ]; then \
133 if [ ! -d "$$CLOSED_ROOT" ]; then \
134 $(ECHO) "Error: if closed sources are not present," \
135 "ON_CLOSED_BINS must point to closed binaries."; \
136 $(ECHO) "root_$(MACH)$${RELEASE_BUILD+-nd} is not" \
137 "present in $$ON_CLOSED_BINS."; \
138 exit 1; \
139 fi; \
140 $(ECHO) "Copying closed binaries from $$CLOSED_ROOT"; \
141 (cd $$CLOSED_ROOT; tar cf - .) | \
142 (cd $(ROOT); tar xBpf -); \
143 fi
144
145#
144# Declare what parts can be built in parallel
146# Declare what parts can be build in parallel
145# DUMMY at the end is used in case macro expansion produces an empty string to
146# prevent everything going in parallel
147#
148.PARALLEL: $(PARALLEL_HEADERS) DUMMY
149.PARALLEL: $(PARALLEL_DIRS) DUMMY
150
151$(SUBDIRS) head pkg: FRC
152 @cd $@; pwd; $(MAKE) $(TARGET)

--- 229 unchanged lines hidden ---
147# DUMMY at the end is used in case macro expansion produces an empty string to
148# prevent everything going in parallel
149#
150.PARALLEL: $(PARALLEL_HEADERS) DUMMY
151.PARALLEL: $(PARALLEL_DIRS) DUMMY
152
153$(SUBDIRS) head pkg: FRC
154 @cd $@; pwd; $(MAKE) $(TARGET)

--- 229 unchanged lines hidden ---