41 AC_SUBST(HOTSPOT_TOPDIR) |
40 AC_SUBST(HOTSPOT_TOPDIR) |
42 AC_SUBST(NASHORN_TOPDIR) |
41 AC_SUBST(NASHORN_TOPDIR) |
43 AC_SUBST(JDK_TOPDIR) |
42 AC_SUBST(JDK_TOPDIR) |
44 ]) |
43 ]) |
45 |
44 |
46 |
|
47 AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS], |
45 AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS], |
48 [ |
46 [ |
|
47 # This feature is no longer supported. |
49 |
48 |
50 ############################################################################### |
49 BASIC_DEPRECATED_ARG_WITH(add-source-root) |
51 # |
50 BASIC_DEPRECATED_ARG_WITH(override-source-root) |
52 # Pickup additional source for a component from outside of the source root |
51 BASIC_DEPRECATED_ARG_WITH(adds-and-overrides) |
53 # or override source for a component. |
52 BASIC_DEPRECATED_ARG_WITH(override-langtools) |
54 # |
53 BASIC_DEPRECATED_ARG_WITH(override-corba) |
55 AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root], |
54 BASIC_DEPRECATED_ARG_WITH(override-jaxp) |
56 [for each and every source directory, look in this additional source root for |
55 BASIC_DEPRECATED_ARG_WITH(override-jaxws) |
57 the same directory; if it exists and have files in it, include it in the build])]) |
56 BASIC_DEPRECATED_ARG_WITH(override-hotspot) |
58 |
57 BASIC_DEPRECATED_ARG_WITH(override-nashorn) |
59 AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root], |
58 BASIC_DEPRECATED_ARG_WITH(override-jdk) |
60 [for each and every source directory, look in this override source root for |
|
61 the same directory; if it exists, use that directory instead and |
|
62 ignore the directory in the original source root])]) |
|
63 |
|
64 AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides], |
|
65 [use the subdirs 'adds' and 'overrides' in the specified directory as |
|
66 add-source-root and override-source-root])]) |
|
67 |
|
68 if test "x$with_adds_and_overrides" != x; then |
|
69 with_add_source_root="$with_adds_and_overrides/adds" |
|
70 with_override_source_root="$with_adds_and_overrides/overrides" |
|
71 fi |
|
72 |
|
73 if test "x$with_add_source_root" != x; then |
|
74 if ! test -d $with_add_source_root; then |
|
75 AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root]) |
|
76 fi |
|
77 CURDIR="$PWD" |
|
78 cd "$with_add_source_root" |
|
79 ADD_SRC_ROOT="`pwd`" |
|
80 cd "$CURDIR" |
|
81 # Verify that the addon source root does not have any root makefiles. |
|
82 # If it does, then it is usually an error, prevent this. |
|
83 if test -f $with_add_source_root/langtools/make/Makefile; then |
|
84 AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.]) |
|
85 fi |
|
86 if test -f $with_add_source_root/corba/make/Makefile; then |
|
87 AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.]) |
|
88 fi |
|
89 if test -f $with_add_source_root/jaxp/make/Makefile; then |
|
90 AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.]) |
|
91 fi |
|
92 if test -f $with_add_source_root/jaxws/make/Makefile; then |
|
93 AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.]) |
|
94 fi |
|
95 if test -f $with_add_source_root/hotspot/make/Makefile; then |
|
96 AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.]) |
|
97 fi |
|
98 if test -f $with_add_source_root/nashorn/make/Makefile; then |
|
99 AC_MSG_ERROR([Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources.]) |
|
100 fi |
|
101 if test -f $with_add_source_root/jdk/make/Makefile; then |
|
102 AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.]) |
|
103 fi |
|
104 fi |
|
105 AC_SUBST(ADD_SRC_ROOT) |
|
106 |
|
107 if test "x$with_override_source_root" != x; then |
|
108 if ! test -d $with_override_source_root; then |
|
109 AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root]) |
|
110 fi |
|
111 CURDIR="$PWD" |
|
112 cd "$with_override_source_root" |
|
113 OVERRIDE_SRC_ROOT="`pwd`" |
|
114 cd "$CURDIR" |
|
115 if test -f $with_override_source_root/langtools/make/Makefile; then |
|
116 AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.]) |
|
117 fi |
|
118 if test -f $with_override_source_root/corba/make/Makefile; then |
|
119 AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.]) |
|
120 fi |
|
121 if test -f $with_override_source_root/jaxp/make/Makefile; then |
|
122 AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.]) |
|
123 fi |
|
124 if test -f $with_override_source_root/jaxws/make/Makefile; then |
|
125 AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.]) |
|
126 fi |
|
127 if test -f $with_override_source_root/hotspot/make/Makefile; then |
|
128 AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.]) |
|
129 fi |
|
130 if test -f $with_override_source_root/nashorn/make/Makefile; then |
|
131 AC_MSG_ERROR([Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override.]) |
|
132 fi |
|
133 if test -f $with_override_source_root/jdk/make/Makefile; then |
|
134 AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.]) |
|
135 fi |
|
136 fi |
|
137 AC_SUBST(OVERRIDE_SRC_ROOT) |
|
138 |
|
139 ############################################################################### |
|
140 # |
|
141 # Override a repo completely, this is used for example when you have 3 small |
|
142 # development sandboxes of the langtools sources and want to avoid having 3 full |
|
143 # OpenJDK sources checked out on disk. |
|
144 # |
|
145 # Assuming that the 3 langtools sandboxes are located here: |
|
146 # /home/fredrik/sandbox1/langtools |
|
147 # /home/fredrik/sandbox2/langtools |
|
148 # /home/fredrik/sandbox3/langtools |
|
149 # |
|
150 # From the source root you create build subdirs manually: |
|
151 # mkdir -p build1 build2 build3 |
|
152 # in each build directory run: |
|
153 # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make) |
|
154 # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make) |
|
155 # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make) |
|
156 # |
|
157 |
|
158 AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools], |
|
159 [use this langtools dir for the build])]) |
|
160 |
|
161 AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba], |
|
162 [use this corba dir for the build])]) |
|
163 |
|
164 AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp], |
|
165 [use this jaxp dir for the build])]) |
|
166 |
|
167 AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws], |
|
168 [use this jaxws dir for the build])]) |
|
169 |
|
170 AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot], |
|
171 [use this hotspot dir for the build])]) |
|
172 |
|
173 AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn], |
|
174 [use this nashorn dir for the build])]) |
|
175 |
|
176 AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk], |
|
177 [use this jdk dir for the build])]) |
|
178 |
|
179 if test "x$with_override_langtools" != x; then |
|
180 CURDIR="$PWD" |
|
181 cd "$with_override_langtools" |
|
182 LANGTOOLS_TOPDIR="`pwd`" |
|
183 cd "$CURDIR" |
|
184 if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then |
|
185 AC_MSG_ERROR([You have to override langtools with a full langtools repo!]) |
|
186 fi |
|
187 AC_MSG_CHECKING([if langtools should be overridden]) |
|
188 AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR]) |
|
189 fi |
|
190 if test "x$with_override_corba" != x; then |
|
191 CURDIR="$PWD" |
|
192 cd "$with_override_corba" |
|
193 CORBA_TOPDIR="`pwd`" |
|
194 cd "$CURDIR" |
|
195 if ! test -f $CORBA_TOPDIR/make/Makefile; then |
|
196 AC_MSG_ERROR([You have to override corba with a full corba repo!]) |
|
197 fi |
|
198 AC_MSG_CHECKING([if corba should be overridden]) |
|
199 AC_MSG_RESULT([yes with $CORBA_TOPDIR]) |
|
200 fi |
|
201 if test "x$with_override_jaxp" != x; then |
|
202 CURDIR="$PWD" |
|
203 cd "$with_override_jaxp" |
|
204 JAXP_TOPDIR="`pwd`" |
|
205 cd "$CURDIR" |
|
206 if ! test -f $JAXP_TOPDIR/make/Makefile; then |
|
207 AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!]) |
|
208 fi |
|
209 AC_MSG_CHECKING([if jaxp should be overridden]) |
|
210 AC_MSG_RESULT([yes with $JAXP_TOPDIR]) |
|
211 fi |
|
212 if test "x$with_override_jaxws" != x; then |
|
213 CURDIR="$PWD" |
|
214 cd "$with_override_jaxws" |
|
215 JAXWS_TOPDIR="`pwd`" |
|
216 cd "$CURDIR" |
|
217 if ! test -f $JAXWS_TOPDIR/make/Makefile; then |
|
218 AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!]) |
|
219 fi |
|
220 AC_MSG_CHECKING([if jaxws should be overridden]) |
|
221 AC_MSG_RESULT([yes with $JAXWS_TOPDIR]) |
|
222 fi |
|
223 if test "x$with_override_hotspot" != x; then |
|
224 CURDIR="$PWD" |
|
225 cd "$with_override_hotspot" |
|
226 HOTSPOT_TOPDIR="`pwd`" |
|
227 cd "$CURDIR" |
|
228 if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then |
|
229 AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!]) |
|
230 fi |
|
231 AC_MSG_CHECKING([if hotspot should be overridden]) |
|
232 AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR]) |
|
233 fi |
|
234 if test "x$with_override_nashorn" != x; then |
|
235 CURDIR="$PWD" |
|
236 cd "$with_override_nashorn" |
|
237 NASHORN_TOPDIR="`pwd`" |
|
238 cd "$CURDIR" |
|
239 if ! test -f $NASHORN_TOPDIR/make/Makefile; then |
|
240 AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!]) |
|
241 fi |
|
242 AC_MSG_CHECKING([if nashorn should be overridden]) |
|
243 AC_MSG_RESULT([yes with $NASHORN_TOPDIR]) |
|
244 fi |
|
245 if test "x$with_override_jdk" != x; then |
|
246 CURDIR="$PWD" |
|
247 cd "$with_override_jdk" |
|
248 JDK_TOPDIR="`pwd`" |
|
249 cd "$CURDIR" |
|
250 if ! test -f $JDK_TOPDIR/make/Makefile; then |
|
251 AC_MSG_ERROR([You have to override JDK with a full JDK repo!]) |
|
252 fi |
|
253 AC_MSG_CHECKING([if JDK should be overridden]) |
|
254 AC_MSG_RESULT([yes with $JDK_TOPDIR]) |
|
255 fi |
|
256 ]) |
59 ]) |
257 |
60 |
258 AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS], |
61 AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS], |
259 [ |
62 [ |
260 BUILD_OUTPUT="$OUTPUT_ROOT" |
63 BUILD_OUTPUT="$OUTPUT_ROOT" |