38 # SUBDIRS subdirs for the base module always get built |
38 # SUBDIRS subdirs for the base module always get built |
39 # SUBDIRS_<group> subdirs for the named group |
39 # SUBDIRS_<group> subdirs for the named group |
40 # |
40 # |
41 # By default, subdirs specified in the SUBDIRS and all SUBDIRS_* |
41 # By default, subdirs specified in the SUBDIRS and all SUBDIRS_* |
42 # variables will be built. |
42 # variables will be built. |
43 # |
|
44 # BUILD_MODULES variable can be used to specify one or more groups |
|
45 # to be built (BUILD_MODULES=all will build all groups). |
|
46 # |
43 # |
47 # Variables of the currently supported groups are: |
44 # Variables of the currently supported groups are: |
48 # SUBDIRS_desktop |
45 # SUBDIRS_desktop |
49 # SUBDIRS_management |
46 # SUBDIRS_management |
50 # SUBDIRS_enterprise |
47 # SUBDIRS_enterprise |
51 # SUBDIRS_misc |
48 # SUBDIRS_misc |
52 # SUBDIRS_tools |
49 # SUBDIRS_tools |
53 # |
50 # |
54 # Change to the above list also need to update |
51 # Change to the above list also need to update |
55 # make/common/shared/Sanity.gmk. NOTE: this list is subject |
52 # make/common/shared/Sanity.gmk. NOTE: this list is subject |
56 # to change till the JDK 7 SE profiles/modules are finalized. |
53 # to change. |
57 # |
54 # |
58 # Eventually we want to restructure the make directory |
55 # Eventually we want to restructure the make directory |
59 # according to these grouping (e.g. make/desktop/...) and |
56 # according to these grouping (e.g. make/desktop/...) and |
60 # the SUBDIRS_<group> variables would not be needed. |
57 # the SUBDIRS_<group> variables would not be needed. |
61 # |
|
62 # To build the desktop and tools groups only, you can do: |
|
63 # gnumake BUILD_MODULES="desktop tools" ... |
|
64 # |
58 # |
65 |
59 |
66 # Iterate the subdirectories specified in $1. |
60 # Iterate the subdirectories specified in $1. |
67 # - cd into each subdir and make them |
61 # - cd into each subdir and make them |
68 |
62 |
94 @$(ECHO) "Done Processing OTHERSUBDIRS: $(OTHERSUBDIRS)" |
88 @$(ECHO) "Done Processing OTHERSUBDIRS: $(OTHERSUBDIRS)" |
95 endef |
89 endef |
96 |
90 |
97 # |
91 # |
98 # Iterate the list specified in SUBDIRS_<group> only if |
92 # Iterate the list specified in SUBDIRS_<group> only if |
99 # SUBDIRS_<group> is set and <group> or "all" is specified |
93 # SUBDIRS_<group> is set. |
100 # in the BUILD_MODULES variable |
|
101 # |
94 # |
102 ifdef SUBDIRS_desktop |
95 ifdef SUBDIRS_desktop |
103 ifneq (,$(findstring desktop, $(BUILD_MODULES))) |
96 define subdirs-desktop-loop |
104 define subdirs-desktop-loop |
97 @$(call subdirs-group-loop,SUBDIRS_desktop) |
105 @$(call subdirs-group-loop,SUBDIRS_desktop) |
98 endef |
106 endef |
|
107 else |
|
108 define subdirs-desktop-loop |
|
109 endef |
|
110 endif |
|
111 else |
99 else |
112 define subdirs-desktop-loop |
100 define subdirs-desktop-loop |
113 endef |
101 endef |
114 endif # SUBDIRS_desktop |
102 endif # SUBDIRS_desktop |
115 |
103 |
116 ifdef SUBDIRS_enterprise |
104 ifdef SUBDIRS_enterprise |
117 ifneq (,$(findstring enterprise, $(BUILD_MODULES))) |
105 define subdirs-enterprise-loop |
118 define subdirs-enterprise-loop |
106 @$(call subdirs-group-loop,SUBDIRS_enterprise) |
119 @$(call subdirs-group-loop,SUBDIRS_enterprise) |
107 endef |
120 endef |
|
121 else |
|
122 define subdirs-enterprise-loop |
|
123 endef |
|
124 endif |
|
125 else |
108 else |
126 define subdirs-enterprise-loop |
109 define subdirs-enterprise-loop |
127 endef |
110 endef |
128 endif # SUBDIRS_enterprise |
111 endif # SUBDIRS_enterprise |
129 |
112 |
130 ifdef SUBDIRS_management |
113 ifdef SUBDIRS_management |
131 ifneq (,$(findstring management, $(BUILD_MODULES))) |
114 define subdirs-management-loop |
132 define subdirs-management-loop |
115 @$(call subdirs-group-loop,SUBDIRS_management) |
133 @$(call subdirs-group-loop,SUBDIRS_management) |
116 endef |
134 endef |
|
135 else |
|
136 define subdirs-management-loop |
|
137 endef |
|
138 endif |
|
139 else |
117 else |
140 define subdirs-management-loop |
118 define subdirs-management-loop |
141 endef |
119 endef |
142 endif # SUBDIRS_management |
120 endif # SUBDIRS_management |
143 |
121 |
144 ifdef SUBDIRS_misc |
122 ifdef SUBDIRS_misc |
145 ifneq (,$(findstring misc, $(BUILD_MODULES))) |
123 define subdirs-misc-loop |
146 define subdirs-misc-loop |
124 @$(call subdirs-group-loop,SUBDIRS_misc) |
147 @$(call subdirs-group-loop,SUBDIRS_misc) |
125 endef |
148 endef |
|
149 else |
|
150 define subdirs-misc-loop |
|
151 endef |
|
152 endif |
|
153 else |
126 else |
154 define subdirs-misc-loop |
127 define subdirs-misc-loop |
155 endef |
128 endef |
156 endif # SUBDIRS_misc |
129 endif # SUBDIRS_misc |
157 |
130 |
158 ifdef SUBDIRS_tools |
131 ifdef SUBDIRS_tools |
159 ifneq (,$(findstring tools, $(BUILD_MODULES))) |
132 define subdirs-tools-loop |
160 define subdirs-tools-loop |
133 @$(call subdirs-group-loop,SUBDIRS_tools) |
161 @$(call subdirs-group-loop,SUBDIRS_tools) |
134 endef |
162 endef |
|
163 else |
|
164 define subdirs-tools-loop |
|
165 endef |
|
166 endif |
|
167 else |
135 else |
168 define subdirs-tools-loop |
136 define subdirs-tools-loop |
169 endef |
137 endef |
170 endif # SUBDIRS_tools |
138 endif # SUBDIRS_tools |
171 |
139 |
172 # |
140 # |
173 # If BUILD_MODULES is not set or it's set to "all", |
141 # If BUILD_MODULES is not set or it's set to "all", |
174 # iterate all groups. |
142 # iterate all groups. |
175 SUBDIRS_all = $(SUBDIRS) $(SUBDIRS_desktop) $(SUBDIRS_enterprise) \ |
143 SUBDIRS_all = $(SUBDIRS) $(SUBDIRS_desktop) $(SUBDIRS_enterprise) \ |
176 $(SUBDIRS_management) $(SUBDIRS_misc) $(SUBDIRS_tools) |
144 $(SUBDIRS_management) $(SUBDIRS_misc) $(SUBDIRS_tools) |
177 |
145 |
178 ifndef BUILD_MODULES |
|
179 define SUBDIRS-loop |
146 define SUBDIRS-loop |
180 @$(call subdirs-group-loop,SUBDIRS_all) |
147 @$(call subdirs-group-loop,SUBDIRS_all) |
181 endef |
148 endef |
182 |
|
183 else |
|
184 |
|
185 ifneq (,$(findstring all, $(BUILD_MODULES))) |
|
186 define SUBDIRS-loop |
|
187 @$(call subdirs-group-loop,SUBDIRS_all) |
|
188 endef |
|
189 |
|
190 else # BUILD_MODULES set |
|
191 # |
|
192 # Iterate SUBDIRS and the groups specified in BUILD_MODULES |
|
193 # |
|
194 define SUBDIRS-loop |
|
195 @$(call subdirs-group-loop,SUBDIRS) |
|
196 @$(subdirs-desktop-loop) |
|
197 @$(subdirs-enterprise-loop) |
|
198 @$(subdirs-management-loop) |
|
199 @$(subdirs-misc-loop) |
|
200 @$(subdirs-tools-loop) |
|
201 endef |
|
202 |
|
203 endif |
|
204 endif # BUILD_MODULES |
|