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/CDDL.txt
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/CDDL.txt.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets [] replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21
22 #
23 #ident "@(#)Makefile 1.129 07/08/15 SMI"
24 #
25 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
26 # Use is subject to license terms.
27 #
28 # pkgdefs/Makefile
29
30 include $(SRC)/Makefile.master
31
32 sparc_NONSHIP_SUBDIRS =
33 i386_NONSHIP_SUBDIRS =
34
35 I18N_SUBDIRS = \
36 SUNW0scds
37
38 NONSHIP_SUBDIRS = \
39 $($(MACH)_NONSHIP_SUBDIRS)
40
41 PRODUCT_SUBDIRS = \
42 SUNWscdns \
43 SUNWscnfs \
44 SUNWschtt \
45 SUNWscapc \
46 SUNWscsap \
47 SUNWsclc \
48 SUNWscwls \
49 SUNWscs1as \
50 SUNWscs1mq \
51 SUNWscsapdb \
52 SUNWschadb \
53 SUNWscsapenq \
54 SUNWscsaprepl \
55 SUNWscsapwebas \
56 SUNWscsapscs \
57 SUNWscsge \
58 SUNWscPostgreSQL \
59 SUNWsc9ias \
60 SUNWscdhc \
61 SUNWscmqs \
62 SUNWscmys \
63 SUNWsctomcat \
64 SUNWscsps \
65 SUNWscmqi \
66 SUNWscsmb \
67 SUNWscsaa \
68 SUNWscsag
69
70 $(CLOSED_BUILD)PRODUCT_SUBDIRS += \
71 SUNWscor \
72 SUNWscsyb
73
74 s9_PRODUCT_SUBDIRS += \
75 SUNWscpax
76
77 $(S9_BUILD)PRODUCT_SUBDIRS += $(s9_PRODUCT_SUBDIRS)
78
79 post_s9_PRODUCT_SUBDIRS += \
80 SUNWsckrb5 \
81 SUNWsczone
82
83 $(POST_S9_BUILD)PRODUCT_SUBDIRS += $(post_s9_PRODUCT_SUBDIRS)
84
85 sparc_PRODUCT_SUBDIRS += \
86 SUNWscebs \
87 SUNWscsbl
88
89 PRODUCT_SUBDIRS += $($(MACH)_PRODUCT_SUBDIRS)
90
91 SUBDIRS= \
92 $(PRODUCT_SUBDIRS) \
93 $(NONSHIP_SUBDIRS) \
94 $(I18N_SUBDIRS)
95
96 # Targetdirs needs to process all package subdirs, as we build all the code,
97 # even if the agent isn't supported/packaged on a particular platform
98 $(POST_S9_BUILD)ALLPKG_SUBDIRS += $(s9_PRODUCT_SUBDIRS)
99 $(S9_BUILD)ALLPKG_SUBDIRS += $(post_s9_PRODUCT_SUBDIRS)
100 i386_ALLPKG_SUBDIRS += $(sparc_PRODUCT_SUBDIRS)
101 sparc_ALLPKG_SUBDIRS += $(i386_PRODUCT_SUBDIRS)
102 ALLPKG_SUBDIRS += $(SUBDIRS) $($(MACH)_ALLPKG_SUBDIRS)
103
104 # Support for S11 is unknown at this time, so include all agents
105 $(S11_BUILD)SUBDIRS += $(s9_PRODUCT_SUBDIRS) $($(MACH)_ALLPKG_SUBDIRS)
106
107 sparc_XMODS=
108
109 # L10N support dropped from 3.2 due to resource constraints
110 # L10N support is included in open source builds
111 $(CLOSED_BUILD)$(S11_BUILD)L10N_XMODS= l10n
112
113 $(CLOSED_BUILD)DVDIMAGES_XMODS= \
114 dvdimages
115
116 XMODS= $($(MACH)_XMODS) $(L10N_XMODS) $(DVDIMAGES_XMODS)
117
118 DOT_FILES= dot.clustertoc dot.order
119
120 all := TARGET= all
121 install := TARGET= install
122 clean := TARGET= clean
123 clobber := TARGET= clobber
124 _msg := TARGET= _msg
125 patch_build := TARGET= patch_build
126
127 .KEEP_STATE:
128
129 .PARALLEL: $(SUBDIRS) $(XMODS)
130
131 install: awk_pkginfo $(SUBDIRS) $(XMODS)
132
133 _msg: ./parse_i18n_proto $(I18N_SUBDIRS)
134
135 all: awk_pkginfo $(SUBDIRS) $(XMODS) $(DOT_FILES)
136
137 clean clobber: $(SUBDIRS) $(XMODS)
138 $(RM) awk_pkginfo Targetdirs $(DOT_FILES)
139
140 patch_build: awk_pkginfo $(PRODUCT_SUBDIRS)
141
142 $(SUBDIRS): FRC
143 @cd $@; pwd; $(MAKE) $(TARGET)
144
145 $(XMODS): FRC
146 @if [ -f $@/Makefile ]; then \
147 cd $@; pwd; $(MAKE) $(TARGET); \
148 else \
149 true; \
150 fi
151
152 DOT_CLUSTERTOC_SRC = dot.clustertoc.sun_cluster_agents.$(NATIVE_MACH)
153 $(S9_BUILD)DOT_CLUSTERTOC_SRC = dot.clustertoc.sun_cluster_agents.$(NATIVE_MACH).Sol_9
154
155 DOT_ORDER_SRC= dot.order.sun_cluster_agents.$(NATIVE_MACH)
156 $(S9_BUILD)DOT_ORDER_SRC= dot.order.sun_cluster_agents.$(NATIVE_MACH).Sol_9
157
158 dot.clustertoc: $(DOT_CLUSTERTOC_SRC)
159 $(RM) $@
160 cp $(DOT_CLUSTERTOC_SRC) $@
161
162 dot.order: $(DOT_ORDER_SRC)
163 $(RM) $@
164 cp $(DOT_ORDER_SRC) $@
165
166 $(NOT_RELEASE_BUILD)AWK_PKGINFO_DFLAG= -d
167
168 awk_pkginfo: ./bld_awk_pkginfo
169 ./bld_awk_pkginfo -m $(MACH) -p "$(RELEASE)/$(VERSION)" ${AWK_PKGINFO_DFLAG} -o $@
170
171 ALL_PROTOTYPES = $(ALLPKG_SUBDIRS:%=%/pkginfo.tmpl %/prototype_com) \
172 $(ALLPKG_SUBDIRS:%=%/pkginfo.tmpl %/prototype_$(MACH))
173
174 makefiles: Targetdirs parse_i18n_proto
175
176 # generate Targetdirs and use that to create all the proto directories
177 Targetdirs: ./pkgdefs_to_targetdirs $(ALL_PROTOTYPES)
178 ./pkgdefs_to_targetdirs $(ALL_PROTOTYPES) > Targetdirs
179
180 FRC: