Old Makefile
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 "%Z%%M% %I% %E% SMI"
24 #
25 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
26 # Use is subject to license terms.
27 #
28 # pkgdefs/Makefile
29
30 include Makefile.com
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 SUNWscids \
62 SUNWscmqs \
63 SUNWscmys \
64 SUNWsctomcat \
65 SUNWscsps \
66 SUNWscmqi \
67 SUNWscsmb \
68 SUNWscsaa \
69 SUNWscsag
70
71 $(CLOSED_BUILD)PRODUCT_SUBDIRS += \
72 SUNWscor \
73 SUNWscsyb
74
75 s9_PRODUCT_SUBDIRS += \
76 SUNWscpax
77
78 $(S9_BUILD)PRODUCT_SUBDIRS += $(s9_PRODUCT_SUBDIRS)
79
80 post_s9_PRODUCT_SUBDIRS += \
81 SUNWsckrb5 \
82 SUNWsczone
83
84 $(POST_S9_BUILD)PRODUCT_SUBDIRS += $(post_s9_PRODUCT_SUBDIRS)
85
86 sparc_PRODUCT_SUBDIRS += \
87 SUNWscebs \
88 SUNWscsbl
89
90 PRODUCT_SUBDIRS += $($(MACH)_PRODUCT_SUBDIRS)
91
92 SUBDIRS= \
93 $(PRODUCT_SUBDIRS) \
94 $(NONSHIP_SUBDIRS) \
95 $(I18N_SUBDIRS)
96
97 # Targetdirs needs to process all package subdirs, as we build all the code,
98 # even if the agent isn't supported/packaged on a particular platform
99 $(POST_S9_BUILD)ALLPKG_SUBDIRS += $(s9_PRODUCT_SUBDIRS)
100 $(S9_BUILD)ALLPKG_SUBDIRS += $(post_s9_PRODUCT_SUBDIRS)
101 i386_ALLPKG_SUBDIRS += $(sparc_PRODUCT_SUBDIRS)
102 sparc_ALLPKG_SUBDIRS += $(i386_PRODUCT_SUBDIRS)
103 ALLPKG_SUBDIRS += $(SUBDIRS) $($(MACH)_ALLPKG_SUBDIRS)
104
105 # Support for S11 is unknown at this time, so include all agents
106 $(S11_BUILD)SUBDIRS += $(s9_PRODUCT_SUBDIRS) $($(MACH)_ALLPKG_SUBDIRS)
107
108 sparc_XMODS=
109
110 # L10N support dropped from 3.2 due to resource constraints
111 # L10N support is included in open source builds
112 $(CLOSED_BUILD)$(S11_BUILD)L10N_XMODS= l10n
113
114 $(CLOSED_BUILD)DVDIMAGES_XMODS= \
115 dvdimages
116
117 XMODS= $($(MACH)_XMODS) $(L10N_XMODS) $(DVDIMAGES_XMODS)
118
119 DOT_FILES= dot.clustertoc dot.order
120
121 all := TARGET= all
122 install := TARGET= install
123 clean := TARGET= clean
124 clobber := TARGET= clobber
125 _msg := TARGET= _msg
126 patch_build := TARGET= patch_build
127
128 .KEEP_STATE:
129
130 .PARALLEL: $(SUBDIRS) $(XMODS)
131
132 install: awk_pkginfo $(SUBDIRS) $(XMODS)
133
134 _msg: ./parse_i18n_proto $(I18N_SUBDIRS)
135
136 all: awk_pkginfo $(SUBDIRS) $(XMODS) $(DOT_FILES)
137
138 clean clobber: $(SUBDIRS) $(XMODS)
139 $(RM) awk_pkginfo Targetdirs $(DOT_FILES)
140
141 patch_build: awk_pkginfo $(PRODUCT_SUBDIRS) patch_manpages
142
143 $(SUBDIRS): FRC
144 @cd $@; pwd; $(MAKE) $(TARGET)
145
146 $(XMODS): FRC
147 @if [ -f $@/Makefile ]; then \
148 cd $@; pwd; $(MAKE) $(TARGET); \
149 else \
150 true; \
151 fi
152
153 DOT_CLUSTERTOC_SRC = dot.clustertoc.sun_cluster_agents.$(NATIVE_MACH)
154 $(S9_BUILD)DOT_CLUSTERTOC_SRC = dot.clustertoc.sun_cluster_agents.$(NATIVE_MACH).Sol_9
155
156 DOT_ORDER_SRC= dot.order.sun_cluster_agents.$(NATIVE_MACH)
157 $(S9_BUILD)DOT_ORDER_SRC= dot.order.sun_cluster_agents.$(NATIVE_MACH).Sol_9
158
159 dot.clustertoc: $(DOT_CLUSTERTOC_SRC)
160 $(RM) $@
161 cp $(DOT_CLUSTERTOC_SRC) $@
162
163 dot.order: $(DOT_ORDER_SRC)
164 $(RM) $@
165 cp $(DOT_ORDER_SRC) $@
166
167 $(NOT_RELEASE_BUILD)AWK_PKGINFO_DFLAG= -d
168
169 awk_pkginfo: ./bld_awk_pkginfo
170 ./bld_awk_pkginfo -m $(MACH) -p "$(RELEASE)/$(VERSION)" ${AWK_PKGINFO_DFLAG} -o $@
171
172 # Copy the package contents to the proto area
173 patch_manpages: $(DOCS_DELIVERY)
174 for pkg in SUNWscdsman; \
175 do \
176 basedir=`$(EGREP) '^BASEDIR=' $(DOCS_DELIVERY)/$$pkg/pkginfo | $(SED) -e 's:.*=::'`; \
177 [ -d $(VROOT)$$basedir ] || /bin/mkdir -p $(VROOT)$$basedir; \
178 (cd $(DOCS_DELIVERY)/$$pkg/reloc && /bin/tar cf - .) | (cd $(VROOT)$$basedir && /bin/tar xf -); \
179 done
180
181 ALL_PROTOTYPES = $(ALLPKG_SUBDIRS:%=%/pkginfo.tmpl %/prototype_com) \
182 $(ALLPKG_SUBDIRS:%=%/pkginfo.tmpl %/prototype_$(MACH))
183
184 makefiles: Targetdirs parse_i18n_proto
185
186 # generate Targetdirs and use that to create all the proto directories
187 Targetdirs: ./pkgdefs_to_targetdirs $(ALL_PROTOTYPES)
188 ./pkgdefs_to_targetdirs $(ALL_PROTOTYPES) > Targetdirs
189
190 FRC: