1 | # !kmk_ash
|
---|
2 | # $Id: gen-slickedit-workspace.sh 39426 2011-11-25 14:25:07Z vboxsync $
|
---|
3 | ## @file
|
---|
4 | # Script for generating a SlickEdit workspace.
|
---|
5 | #
|
---|
6 |
|
---|
7 | #
|
---|
8 | # Copyright (C) 2009-2011 Oracle Corporation
|
---|
9 | #
|
---|
10 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | # available from http://www.virtualbox.org. This file is free software;
|
---|
12 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | # General Public License (GPL) as published by the Free Software
|
---|
14 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | #
|
---|
18 |
|
---|
19 | #
|
---|
20 | # Some constants.
|
---|
21 | #
|
---|
22 | MY_CAT="kmk_cat"
|
---|
23 | MY_CP="kmk_cp"
|
---|
24 | MY_MKDIR="kmk_mkdir"
|
---|
25 | MY_MV="kmk_mv"
|
---|
26 | MY_SED="kmk_sed"
|
---|
27 | MY_RM="kmk_rm"
|
---|
28 | MY_SLEEP="kmk_sleep"
|
---|
29 | MY_EXPR="kmk_expr"
|
---|
30 | MY_SVN="svn"
|
---|
31 |
|
---|
32 | #MY_SORT="kmk_cat"
|
---|
33 | MY_SORT="sort"
|
---|
34 |
|
---|
35 | #
|
---|
36 | # Globals.
|
---|
37 | #
|
---|
38 | MY_PROJECT_FILES=""
|
---|
39 | MY_OUT_DIRS="\
|
---|
40 | out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE} \
|
---|
41 | out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE} \
|
---|
42 | out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/debug \
|
---|
43 | out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/debug \
|
---|
44 | out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/release \
|
---|
45 | out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/release \
|
---|
46 | out/linux.amd64/debug \
|
---|
47 | out/linux.x86/debug \
|
---|
48 | out/win.amd64/debug \
|
---|
49 | out/win.x86/debug \
|
---|
50 | out/darwin.amd64/debug \
|
---|
51 | out/darwin.x86/debug \
|
---|
52 | out/solaris.amd64/debug \
|
---|
53 | out/solaris.x86/debug";
|
---|
54 |
|
---|
55 |
|
---|
56 | #
|
---|
57 | # Parameters w/ defaults.
|
---|
58 | #
|
---|
59 | MY_ROOT_DIR=".."
|
---|
60 | MY_OUT_DIR="SlickEdit"
|
---|
61 | MY_PRJ_PRF="VBox-"
|
---|
62 | MY_WS_NAME="VirtualBox.vpw"
|
---|
63 | MY_DBG=""
|
---|
64 | MY_WINDOWS_HOST=""
|
---|
65 | MY_OPT_MINIMAL=""
|
---|
66 |
|
---|
67 | #MY_KBUILD_PATH="${KBUILD_PATH}"
|
---|
68 | #test -z "${MY_KBUILD_PATH}" && MY_KBUILD_PATH="${PATH_KBUILD}"
|
---|
69 | #MY_KBUILD=""
|
---|
70 |
|
---|
71 |
|
---|
72 | ##
|
---|
73 | # Gets the absolute path to an existing directory.
|
---|
74 | #
|
---|
75 | # @param $1 The path.
|
---|
76 | my_abs_dir()
|
---|
77 | {
|
---|
78 | if test -n "${PWD}"; then
|
---|
79 | MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && echo ${PWD}`
|
---|
80 | else
|
---|
81 | # old cygwin shell has no PWD and need adjusting.
|
---|
82 | MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && pwd | ${MY_SED} -e 's,^/cygdrive/\(.\)/,\1:/,'`
|
---|
83 | fi
|
---|
84 | if test -z "${MY_ABS_DIR}"; then
|
---|
85 | MY_ABS_DIR="${1}"
|
---|
86 | fi
|
---|
87 | }
|
---|
88 |
|
---|
89 | ##
|
---|
90 | # Gets the file name part of a path.
|
---|
91 | #
|
---|
92 | # @param $1 The path.
|
---|
93 | my_get_name()
|
---|
94 | {
|
---|
95 | SAVED_IFS=$IFS
|
---|
96 | IFS=":/ "
|
---|
97 | set $1
|
---|
98 | while test $# -gt 1 -a -n "${2}";
|
---|
99 | do
|
---|
100 | shift;
|
---|
101 | done
|
---|
102 |
|
---|
103 | IFS=$SAVED_IFS
|
---|
104 | #echo "$1"
|
---|
105 | export MY_GET_NAME=$1
|
---|
106 | }
|
---|
107 |
|
---|
108 | ##
|
---|
109 | # Generate file entry for the specified file if it was found to be of interest.
|
---|
110 | #
|
---|
111 | # @param $1 The output file name base.
|
---|
112 | # @param $2 The file name.
|
---|
113 | my_file()
|
---|
114 | {
|
---|
115 | # sort and filter by file type.
|
---|
116 | case "$2" in
|
---|
117 | # drop these.
|
---|
118 | *.kup|*~|*.pyc|*.exe|*.sys|*.dll|*.o|*.obj|*.lib|*.a|*.ko)
|
---|
119 | return 0
|
---|
120 | ;;
|
---|
121 |
|
---|
122 | # by prefix or directory component.
|
---|
123 | tst*|*/testcase/*)
|
---|
124 | MY_FOLDER="$1-Testcases.lst"
|
---|
125 | ;;
|
---|
126 |
|
---|
127 | # by extension.
|
---|
128 | *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h)
|
---|
129 | MY_FOLDER="$1-Sources.lst"
|
---|
130 | ;;
|
---|
131 |
|
---|
132 | *.h|*.hpp|*.mm)
|
---|
133 | MY_FOLDER="$1-Headers.lst"
|
---|
134 | ;;
|
---|
135 |
|
---|
136 | *.asm|*.s|*.S|*.inc|*.mac)
|
---|
137 | MY_FOLDER="$1-Assembly.lst"
|
---|
138 | ;;
|
---|
139 |
|
---|
140 | *)
|
---|
141 | MY_FOLDER="$1-Others.lst"
|
---|
142 | ;;
|
---|
143 | esac
|
---|
144 |
|
---|
145 | ## @todo only files which are in subversion.
|
---|
146 | # if ${MY_SVN} info "${2}" > /dev/null 2>&1; then
|
---|
147 | my_get_name "${2}"
|
---|
148 | echo ' <!-- sortkey: '"${MY_GET_NAME}"' --> <F N="'"${2}"'"/>' >> "${MY_FOLDER}"
|
---|
149 | # fi
|
---|
150 | }
|
---|
151 |
|
---|
152 | ##
|
---|
153 | # Generate file entries for the specified sub-directory tree.
|
---|
154 | #
|
---|
155 | # @param $1 The output filename.
|
---|
156 | # @param $2 The sub-directory.
|
---|
157 | my_sub_tree()
|
---|
158 | {
|
---|
159 | if test -n "$MY_DBG"; then echo "dbg: my_sub_tree: ${2}"; fi
|
---|
160 |
|
---|
161 | # Skip .svn directories.
|
---|
162 | case "$2" in
|
---|
163 | */.svn|*/.svn)
|
---|
164 | return 0
|
---|
165 | ;;
|
---|
166 | esac
|
---|
167 |
|
---|
168 | # Process the files in the directory.
|
---|
169 | for f in $2/*;
|
---|
170 | do
|
---|
171 | if test -d "${f}";
|
---|
172 | then
|
---|
173 | my_sub_tree "${1}" "${f}"
|
---|
174 | else
|
---|
175 | my_file "${1}" "${f}"
|
---|
176 | fi
|
---|
177 | done
|
---|
178 | return 0;
|
---|
179 | }
|
---|
180 |
|
---|
181 |
|
---|
182 | ##
|
---|
183 | # Generate folders for the specified directories and files.
|
---|
184 | #
|
---|
185 | # @param $1 The output (base) file name.
|
---|
186 | # @param $2+ The files and directories to traverse.
|
---|
187 | my_generate_folder()
|
---|
188 | {
|
---|
189 | MY_FILE="$1"
|
---|
190 | shift
|
---|
191 |
|
---|
192 | # Zap existing file collections.
|
---|
193 | > "${MY_FILE}-Sources.lst"
|
---|
194 | > "${MY_FILE}-Headers.lst"
|
---|
195 | > "${MY_FILE}-Assembly.lst"
|
---|
196 | > "${MY_FILE}-Testcases.lst"
|
---|
197 | > "${MY_FILE}-Others.lst"
|
---|
198 |
|
---|
199 | # Traverse the directories and files.
|
---|
200 | while test $# -ge 1 -a -n "${1}";
|
---|
201 | do
|
---|
202 | for f in ${MY_ROOT_DIR}/$1;
|
---|
203 | do
|
---|
204 | if test -d "${f}";
|
---|
205 | then
|
---|
206 | my_sub_tree "${MY_FILE}" "${f}"
|
---|
207 | else
|
---|
208 | my_file "${MY_FILE}" "${f}"
|
---|
209 | fi
|
---|
210 | done
|
---|
211 | shift
|
---|
212 | done
|
---|
213 |
|
---|
214 | # Generate the folders.
|
---|
215 | if test -s "${MY_FILE}-Sources.lst";
|
---|
216 | then
|
---|
217 | echo ' <Folder Name="Sources" Filters="*.c;*.cpp;*.cpp.h;*.c.h;*.m;*.mm;*.pl;*.py;*.as">' >> "${MY_FILE}"
|
---|
218 | ${MY_SORT} "${MY_FILE}-Sources.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
219 | echo ' </Folder>' >> "${MY_FILE}"
|
---|
220 | fi
|
---|
221 | if test -s "${MY_FILE}-Headers.lst";
|
---|
222 | then
|
---|
223 | echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}"
|
---|
224 | ${MY_SORT} "${MY_FILE}-Headers.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
225 | echo ' </Folder>' >> "${MY_FILE}"
|
---|
226 | fi
|
---|
227 | if test -s "${MY_FILE}-Assembly.lst";
|
---|
228 | then
|
---|
229 | echo ' <Folder Name="Assembly" Filters="*.asm;*.s;*.S;*.inc;*.mac">' >> "${MY_FILE}"
|
---|
230 | ${MY_SORT} "${MY_FILE}-Assembly.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
231 | echo ' </Folder>' >> "${MY_FILE}"
|
---|
232 | fi
|
---|
233 | if test -s "${MY_FILE}-Testcases.lst";
|
---|
234 | then
|
---|
235 | echo ' <Folder Name="Testcases" Filters="tst*;">' >> "${MY_FILE}"
|
---|
236 | ${MY_SORT} "${MY_FILE}-Testcases.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
237 | echo ' </Folder>' >> "${MY_FILE}"
|
---|
238 | fi
|
---|
239 | if test -s "${MY_FILE}-Others.lst";
|
---|
240 | then
|
---|
241 | echo ' <Folder Name="Others" Filters="">' >> "${MY_FILE}"
|
---|
242 | ${MY_SORT} "${MY_FILE}-Others.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
243 | echo ' </Folder>' >> "${MY_FILE}"
|
---|
244 | fi
|
---|
245 |
|
---|
246 | # Cleanup
|
---|
247 | ${MY_RM} "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst"
|
---|
248 | }
|
---|
249 |
|
---|
250 |
|
---|
251 | ##
|
---|
252 | # Function generating a project.
|
---|
253 | #
|
---|
254 | # @param $1 The project file name.
|
---|
255 | # @param $2 The project working directory.
|
---|
256 | # @param $3 Dummy separator.
|
---|
257 | # @param $4+ Include directories.
|
---|
258 | # @param $N --end-includes
|
---|
259 | # @param $N+1 Directory sub-trees and files to include in the project.
|
---|
260 | #
|
---|
261 | my_generate_project()
|
---|
262 | {
|
---|
263 | MY_FILE="${MY_PRJ_PRF}${1}.vpj";
|
---|
264 | echo "Generating ${MY_FILE}..."
|
---|
265 | MY_WRK_DIR="${2}"
|
---|
266 | shift
|
---|
267 | shift
|
---|
268 | shift
|
---|
269 |
|
---|
270 | # Add it to the project list for workspace construction later on.
|
---|
271 | MY_PROJECT_FILES="${MY_PROJECT_FILES} ${MY_FILE}"
|
---|
272 |
|
---|
273 |
|
---|
274 | #
|
---|
275 | # Generate the head bits.
|
---|
276 | #
|
---|
277 | echo '<!DOCTYPE Project SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpj.dtd">' > "${MY_FILE}"
|
---|
278 | echo '<Project' >> "${MY_FILE}"
|
---|
279 | echo ' Version="10.0"' >> "${MY_FILE}"
|
---|
280 | echo ' VendorName="SlickEdit"' >> "${MY_FILE}"
|
---|
281 | echo ' VCSProject="Subversion:"' >> "${MY_FILE}"
|
---|
282 | # echo ' Customized="1"' >> "${MY_FILE}"
|
---|
283 | # echo ' WorkingDir="."' >> "${MY_FILE}"
|
---|
284 | my_abs_dir "${MY_WRK_DIR}" >> "${MY_FILE}"
|
---|
285 | echo ' WorkingDir="'"${MY_ABS_DIR}"'"' >> "${MY_FILE}"
|
---|
286 | echo ' >' >> "${MY_FILE}"
|
---|
287 | echo ' <Config Name="Release" OutputFile="" CompilerConfigName="Latest Version">' >> "${MY_FILE}"
|
---|
288 | echo ' <Menu>' >> "${MY_FILE}"
|
---|
289 | echo ' <Target Name="Compile" MenuCaption="&Compile" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
|
---|
290 | echo ' SaveOption="SaveCurrent" RunFromDir="%p" ClearProcessBuffer="1">' >> "${MY_FILE}"
|
---|
291 | echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %p %n.o"/>' >> "${MY_FILE}"
|
---|
292 | echo ' </Target>' >> "${MY_FILE}"
|
---|
293 | echo ' <Target Name="Build" MenuCaption="&Build"CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
|
---|
294 | echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}"
|
---|
295 | echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %rw"/>' >> "${MY_FILE}"
|
---|
296 | echo ' </Target>' >> "${MY_FILE}"
|
---|
297 | echo ' <Target Name="Rebuild" MenuCaption="&Rebuild" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
|
---|
298 | echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}"
|
---|
299 | echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %rw rebuild"/>' >> "${MY_FILE}"
|
---|
300 | echo ' </Target>' >> "${MY_FILE}"
|
---|
301 | echo ' <Target Name="Debug" MenuCaption="&Debug" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}"
|
---|
302 | echo ' <Exec/>' >> "${MY_FILE}"
|
---|
303 | echo ' </Target>' >> "${MY_FILE}"
|
---|
304 | echo ' <Target Name="Execute" MenuCaption="E&xecute" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}"
|
---|
305 | echo ' <Exec/>' >> "${MY_FILE}"
|
---|
306 | echo ' </Target>' >> "${MY_FILE}"
|
---|
307 | echo ' </Menu>' >> "${MY_FILE}"
|
---|
308 |
|
---|
309 | #
|
---|
310 | # Include directories.
|
---|
311 | #
|
---|
312 | echo ' <Includes>' >> "${MY_FILE}"
|
---|
313 | while test $# -ge 1 -a "${1}" != "--end-includes";
|
---|
314 | do
|
---|
315 | for f in $1;
|
---|
316 | do
|
---|
317 | my_abs_dir ${f}
|
---|
318 | echo ' <Include Dir="'"${MY_ABS_DIR}/"'"/>' >> "${MY_FILE}"
|
---|
319 | done
|
---|
320 | shift
|
---|
321 | done
|
---|
322 | shift
|
---|
323 | echo ' </Includes>' >> "${MY_FILE}"
|
---|
324 | echo ' </Config>' >> "${MY_FILE}"
|
---|
325 |
|
---|
326 |
|
---|
327 | #
|
---|
328 | # Process directories+files and create folders.
|
---|
329 | #
|
---|
330 | echo ' <Files>' >> "${MY_FILE}"
|
---|
331 | my_generate_folder "${MY_FILE}" $*
|
---|
332 | echo ' </Files>' >> "${MY_FILE}"
|
---|
333 |
|
---|
334 | #
|
---|
335 | # The tail.
|
---|
336 | #
|
---|
337 | echo '</Project>' >> "${MY_FILE}"
|
---|
338 |
|
---|
339 | return 0
|
---|
340 | }
|
---|
341 |
|
---|
342 |
|
---|
343 | ##
|
---|
344 | # Generate the workspace
|
---|
345 | #
|
---|
346 | my_generate_workspace()
|
---|
347 | {
|
---|
348 | MY_FILE="${MY_WS_NAME}"
|
---|
349 | echo "Generating ${MY_FILE}..."
|
---|
350 | echo '<!DOCTYPE Workspace SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpw.dtd">' > "${MY_FILE}"
|
---|
351 | echo '<Workspace Version="10.0" VendorName="SlickEdit">' >> "${MY_FILE}"
|
---|
352 | echo ' <Projects>' >> "${MY_FILE}"
|
---|
353 | for i in ${MY_PROJECT_FILES};
|
---|
354 | do
|
---|
355 | echo ' <Project File="'"${i}"'" />' >> "${MY_FILE}"
|
---|
356 | done
|
---|
357 | echo ' </Projects>' >> "${MY_FILE}"
|
---|
358 | echo '</Workspace>' >> "${MY_FILE}"
|
---|
359 | return 0;
|
---|
360 | }
|
---|
361 |
|
---|
362 |
|
---|
363 | ##
|
---|
364 | # Generate stuff
|
---|
365 | #
|
---|
366 | my_generate_usercpp_h()
|
---|
367 | {
|
---|
368 | #
|
---|
369 | # Probe the slickedit user config, picking the most recent version.
|
---|
370 | #
|
---|
371 | if test -d "${HOME}/Library/Application Support/Slickedit"; then
|
---|
372 | MY_SLICKDIR_="${HOME}/Library/Application Support/Slickedit"
|
---|
373 | MY_USERCPP_H="unxcpp.h"
|
---|
374 | elif test -d "${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"; then
|
---|
375 | MY_SLICKDIR_="${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"
|
---|
376 | MY_USERCPP_H="usercpp.h"
|
---|
377 | else
|
---|
378 | MY_SLICKDIR_="${HOME}/.slickedit"
|
---|
379 | MY_USERCPP_H="unxcpp.h"
|
---|
380 | fi
|
---|
381 |
|
---|
382 | MY_VER_NUM="0"
|
---|
383 | MY_VER="0.0.0"
|
---|
384 | for subdir in "${MY_SLICKDIR_}/"*;
|
---|
385 | do
|
---|
386 | if test -f "${subdir}/${MY_USERCPP_H}" -o -f "${subdir}/vslick.stu"; then
|
---|
387 | MY_CUR_VER_NUM=0
|
---|
388 | MY_CUR_VER=`echo "${subdir}" | ${MY_SED} -e 's,^.*/,,g'`
|
---|
389 |
|
---|
390 | # Convert the dotted version number to an integer, checking that
|
---|
391 | # it is all numbers in the process.
|
---|
392 | set `echo "${MY_CUR_VER}" | ${MY_SED} 's/\./ /g' `
|
---|
393 | i=100000000
|
---|
394 | while test $# -gt 0;
|
---|
395 | do
|
---|
396 | if ! ${MY_EXPR} "$1" + 1 > /dev/null 2> /dev/null; then
|
---|
397 | MY_CUR_VER_NUM=0;
|
---|
398 | break
|
---|
399 | fi
|
---|
400 | if test "$i" -gt 0; then
|
---|
401 | MY_CUR_VER_NUM=$((${MY_CUR_VER_NUM} + $1 * $i))
|
---|
402 | i=$(($i / 100))
|
---|
403 | fi
|
---|
404 | shift
|
---|
405 | done
|
---|
406 |
|
---|
407 | # More recent that what we have?
|
---|
408 | if test "${MY_CUR_VER_NUM}" -gt "${MY_VER_NUM}"; then
|
---|
409 | MY_VER_NUM="${MY_CUR_VER_NUM}"
|
---|
410 | MY_VER="${MY_CUR_VER}"
|
---|
411 | fi
|
---|
412 | fi
|
---|
413 | done
|
---|
414 |
|
---|
415 | MY_SLICKDIR="${MY_SLICKDIR_}/${MY_VER}"
|
---|
416 | MY_USERCPP_H_FULL="${MY_SLICKDIR}/${MY_USERCPP_H}"
|
---|
417 | if test -d "${MY_SLICKDIR}"; then
|
---|
418 | echo "Found SlickEdit v${MY_VER} preprocessor file: ${MY_USERCPP_H_FULL}"
|
---|
419 | else
|
---|
420 | echo "Failed to locate SlickEdit preprocessor file. You need to manually merge ${MY_USERCPP_H}."
|
---|
421 | MY_USERCPP_H_FULL=""
|
---|
422 | fi
|
---|
423 |
|
---|
424 | # Generate our
|
---|
425 | MY_FILE="${MY_USERCPP_H}"
|
---|
426 | ${MY_CAT} > ${MY_FILE} <<EOF
|
---|
427 | #define IN_SLICKEDIT
|
---|
428 | #define RT_C_DECLS_BEGIN
|
---|
429 | #define RT_C_DECLS_END
|
---|
430 | #define RT_NO_THROW
|
---|
431 | #define RT_THROW(type) throw(type)
|
---|
432 | #define RT_GCC_EXTENSION'
|
---|
433 | #define RT_COMPILER_GROKS_64BIT_BITFIELDS'
|
---|
434 | #define RT_COMPILER_WITH_80BIT_LONG_DOUBLE'
|
---|
435 |
|
---|
436 | #define ATL_NO_VTABLE
|
---|
437 | #define BEGIN_COM_MAP(a)
|
---|
438 | #define COM_INTERFACE_ENTRY(a)
|
---|
439 | #define COM_INTERFACE_ENTRY2(a,b)
|
---|
440 | #define COM_INTERFACE_ENTRY3(a,b,c)
|
---|
441 | #define COM_INTERFACE_ENTRY4(a,b,c,d)
|
---|
442 | #define END_COM_MAP(a)
|
---|
443 |
|
---|
444 | #define COM_DECL_READONLY_ENUM_AND_COLLECTION(a)
|
---|
445 | #define COMGETTER(n) n
|
---|
446 | #define COMSETTER(n) n
|
---|
447 | #define ComSafeArrayIn(t,a) t a[]
|
---|
448 | #define ComSafeArrayOut(t,a) t * a[]
|
---|
449 | #define DECLARE_CLASSFACTORY(a)
|
---|
450 | #define DECLARE_CLASSFACTORY_SINGLETON(a)
|
---|
451 | #define DECLARE_REGISTRY_RESOURCEID(a)
|
---|
452 | #define DECLARE_NOT_AGGREGATABLE(a)
|
---|
453 | #define DECLARE_PROTECT_FINAL_CONSTRUCT(a)
|
---|
454 | #define DECLARE_EMPTY_CTOR_DTOR(a) a(); ~a();
|
---|
455 | #define DEFINE_EMPTY_CTOR_DTOR(a) a::a() {} a::~a() {}
|
---|
456 | #define NS_DECL_ISUPPORTS
|
---|
457 | #define NS_IMETHOD virtual nsresult
|
---|
458 | #define NS_IMETHOD_(type) virtual type
|
---|
459 | #define NS_IMETHODIMP nsresult
|
---|
460 | #define NS_IMETHODIMP_(type) type
|
---|
461 | #define PARSERS_EXPORT
|
---|
462 | EOF
|
---|
463 | if test -n "${MY_WINDOWS_HOST}"; then
|
---|
464 | ${MY_CAT} >> ${MY_FILE} <<EOF
|
---|
465 | #define COM_STRUCT_OR_CLASS(I) struct I
|
---|
466 | #define STDMETHOD(m) virtual HRESULT m
|
---|
467 | #define STDMETHOD_(type,m) virtual type m
|
---|
468 | #define STDMETHODIMP HRESULT
|
---|
469 | #define STDMETHODIMP_(type) type
|
---|
470 | EOF
|
---|
471 | else
|
---|
472 | ${MY_CAT} >> ${MY_FILE} <<EOF
|
---|
473 | #define COM_STRUCT_OR_CLASS(I) class I
|
---|
474 | #define STDMETHOD(m) virtual nsresult m
|
---|
475 | #define STDMETHOD_(type,m) virtual type m
|
---|
476 | #define STDMETHODIMP nsresult
|
---|
477 | #define STDMETHODIMP_(type) type
|
---|
478 | EOF
|
---|
479 | fi
|
---|
480 | ${MY_CAT} >> ${MY_FILE} <<EOF
|
---|
481 | #define VBOX_SCRIPTABLE(a) public a
|
---|
482 | #define VBOX_SCRIPTABLE_IMPL(a)
|
---|
483 | #define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(a)
|
---|
484 |
|
---|
485 | #define CTX_SUFF(var) var##R3
|
---|
486 | #define CTXAllSUFF(var) var##R3
|
---|
487 | #define CTXSUFF(var) var##HC
|
---|
488 | #define OTHERCTXSUFF(var) var##GC
|
---|
489 | #define CTXALLMID(first, last) first##R3##last
|
---|
490 | #define CTXMID(first, last) first##HC##last
|
---|
491 | #define OTHERCTXMID(first, last) first##GC##last
|
---|
492 | #define CTXTYPE(GCType, R3Type, R0Type) R3Type
|
---|
493 | #define RCTYPE(RCType, HCType) RCType
|
---|
494 | #define GCTYPE(GCType, HCType) GCType
|
---|
495 | #define RCPTRTYPE(RCType) RCType
|
---|
496 | #define GCPTRTYPE(GCType) GCType
|
---|
497 | #define HCPTRTYPE(HCType) HCType
|
---|
498 | #define R3R0PTRTYPE(HCType) HCType
|
---|
499 | #define R0PTRTYPE(R3Type) R3Type
|
---|
500 | #define R3PTRTYPE(R0Type) R0Type
|
---|
501 | #define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__
|
---|
502 | #define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction
|
---|
503 | #define RT_SRC_POS_ARGS pszFile, iLine, pszFunction
|
---|
504 | #define RTCALL
|
---|
505 | #define DECLINLINE(type) inline type
|
---|
506 | #define DECL_FORCE_INLINE(type) inline type
|
---|
507 | #define DECL_INVALID(type) type
|
---|
508 |
|
---|
509 | #define PDMDEVINSINT_DECLARED 1
|
---|
510 | #define VBOX_WITH_HGCM 1
|
---|
511 | #define VBOXCALL
|
---|
512 |
|
---|
513 | #define PGM_CTX(a,b) b
|
---|
514 | #define PGM_CTX3(a,b,c) c
|
---|
515 | #define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name)
|
---|
516 | #define PGM_GST_NAME_REAL(name) PGM_CTX3(name)
|
---|
517 | #define PGM_GST_NAME_PROT(name) PGM_CTX3(pgm,GstProt,name)
|
---|
518 | #define PGM_GST_NAME_32BIT(name) PGM_CTX3(pgm,Gst32Bit,name)
|
---|
519 | #define PGM_GST_NAME_PAE(name) PGM_CTX3(pgm,GstPAE,name)
|
---|
520 | #define PGM_GST_NAME_AMD64(name) PGM_CTX3(pgm,GstAMD64,name)
|
---|
521 | #define PGM_GST_DECL(type, name) type PGM_GST_NAME(name)
|
---|
522 | #define PGM_SHW_NAME(name) PGM_GST_NAME_AMD64(name)
|
---|
523 | #define PGM_SHW_NAME_32BIT(name) PGM_CTX3(pgm,Shw32Bit,name)
|
---|
524 | #define PGM_SHW_NAME_PAE(name) PGM_CTX3(pgm,ShwPAE,name)
|
---|
525 | #define PGM_SHW_NAME_AMD64(name) PGM_CTX3(pgm,ShwAMD64,name)
|
---|
526 | #define PGM_SHW_NAME_NESTED(name) PGM_CTX3(pgm,ShwNested,name)
|
---|
527 | #define PGM_SHW_NAME_EPT(name) PGM_CTX3(pgm,ShwEPT,name)
|
---|
528 | #define PGM_SHW_DECL(type, name) type PGM_SHW_NAME(name)
|
---|
529 | #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_AMD64(name)
|
---|
530 | #define PGM_BTH_NAME_32BIT_REAL(name) PGM_CTX3(pgm,Bth,name)
|
---|
531 | #define PGM_BTH_NAME_32BIT_PROT(name) PGM_CTX3(pgm,Bth,name)
|
---|
532 | #define PGM_BTH_NAME_32BIT_32BIT(name) PGM_CTX3(pgm,Bth,name)
|
---|
533 | #define PGM_BTH_NAME_PAE_REAL(name) PGM_CTX3(pgm,Bth,name)
|
---|
534 | #define PGM_BTH_NAME_PAE_PROT(name) PGM_CTX3(pgm,Bth,name)
|
---|
535 | #define PGM_BTH_NAME_PAE_32BIT(name) PGM_CTX3(pgm,Bth,name)
|
---|
536 | #define PGM_BTH_NAME_PAE_PAE(name) PGM_CTX3(pgm,Bth,name)
|
---|
537 | #define PGM_BTH_NAME_AMD64_PROT(name) PGM_CTX3(pgm,Bth,name)
|
---|
538 | #define PGM_BTH_NAME_AMD64_AMD64(name) PGM_CTX3(pgm,Bth,name)
|
---|
539 | #define PGM_BTH_NAME_NESTED_REAL(name) PGM_CTX3(pgm,Bth,name)
|
---|
540 | #define PGM_BTH_NAME_NESTED_PROT(name) PGM_CTX3(pgm,Bth,name)
|
---|
541 | #define PGM_BTH_NAME_NESTED_32BIT(name) PGM_CTX3(pgm,Bth,name)
|
---|
542 | #define PGM_BTH_NAME_NESTED_PAE(name) PGM_CTX3(pgm,Bth,name)
|
---|
543 | #define PGM_BTH_NAME_NESTED_AMD64(name) PGM_CTX3(pgm,Bth,name)
|
---|
544 | #define PGM_BTH_NAME_EPT_REAL(name) PGM_CTX3(pgm,Bth,name)
|
---|
545 | #define PGM_BTH_NAME_EPT_PROT(name) PGM_CTX3(pgm,Bth,name)
|
---|
546 | #define PGM_BTH_NAME_EPT_32BIT(name) PGM_CTX3(pgm,Bth,name)
|
---|
547 | #define PGM_BTH_NAME_EPT_PAE(name) PGM_CTX3(pgm,Bth,name)
|
---|
548 | #define PGM_BTH_NAME_EPT_AMD64(name) PGM_CTX3(pgm,Bth,name)
|
---|
549 | #define PGM_BTH_DECL(type, name) type PGM_BTH_NAME(name)
|
---|
550 |
|
---|
551 | #define FNIEMOP_STUB(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) { return VERR_NOT_IMPLEMENTED; }
|
---|
552 | #define FNIEMOP_DEF(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)
|
---|
553 | #define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0)
|
---|
554 | #define FNIEMOP_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0, a_Type1 a_Name1)
|
---|
555 | #define IEM_CIMPL_DEF_0(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)
|
---|
556 | #define IEM_CIMPL_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0)
|
---|
557 | #define IEM_CIMPL_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0, a_Type1 a_Name1)
|
---|
558 | #define IEM_CIMPL_DEF_3(a_Name, a_Type0, a_Name0, a_Type1, a_Name1, a_Type2, a_Name2) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0, a_Type1 a_Name1, , a_Type2 a_Name2)
|
---|
559 | #define IEM_MC_LOCAL(a_Type, a_Name) a_Type a_Name
|
---|
560 | #define IEM_MC_ARG(a_Type, a_Name, a_iArg) a_Type a_Name
|
---|
561 | #define IEM_MC_ARG_CONST(a_Type, a_Name, a_Value, a_iArg) a_Type const a_Name = a_Value
|
---|
562 | EOF
|
---|
563 |
|
---|
564 | MY_HDR_FILES=` echo ${MY_ROOT_DIR}/include/VBox/*.h ${MY_ROOT_DIR}/include/VBox/vmm/*.h \
|
---|
565 | | ${MY_SED} -e 's,${MY_ROOT_DIR}/include/VBox/err.h,,' `
|
---|
566 | MY_HDR_FILES="${MY_HDR_FILES} ${MY_ROOT_DIR}/include/iprt/cdefs.h"
|
---|
567 | ${MY_SED} \
|
---|
568 | -e '/__cdecl/d' \
|
---|
569 | -e '/^ *# *define.*DECL/!d' \
|
---|
570 | -e '/DECLS/d' \
|
---|
571 | -e '/DECLARE_CLS_/d' \
|
---|
572 | -e '/_SRC_POS_DECL/d' \
|
---|
573 | -e '/declspec/d' \
|
---|
574 | -e '/__attribute__/d' \
|
---|
575 | -e 's/# */#/g' \
|
---|
576 | -e 's/ */ /g' \
|
---|
577 | -e '/ DECLEXPORT_CLASS/d' \
|
---|
578 | -e 's/ *VBOXCALL//' \
|
---|
579 | -e 's/ *RTCALL//' \
|
---|
580 | -e '/ DECLASM(type) type/d' \
|
---|
581 | -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
|
---|
582 | -e '/define *DECLINLINE(type)/d' \
|
---|
583 | -e '/define *DECL_FORCE_INLINE(type)/d' \
|
---|
584 | -e '/ *DECL_INVALID(/d' \
|
---|
585 | \
|
---|
586 | -e 's/(type) DECLHIDDEN(type)/(type) type/' \
|
---|
587 | -e 's/(type) DECLEXPORT(type)/(type) type/' \
|
---|
588 | -e 's/(type) DECLIMPORT(type)/(type) type/' \
|
---|
589 | -e 's/(a_Type) DECLHIDDEN(a_Type)/(a_Type) a_Type/' \
|
---|
590 | -e 's/(a_Type) DECLEXPORT(a_Type)/(a_Type) a_Type/' \
|
---|
591 | -e 's/(a_Type) DECLIMPORT(a_Type)/(a_Type) a_Type/' \
|
---|
592 | \
|
---|
593 | --append "${MY_FILE}" \
|
---|
594 | ${MY_HDR_FILES}
|
---|
595 |
|
---|
596 | ${MY_CAT} "${MY_FILE}" \
|
---|
597 | | ${MY_SED} -e 's/_/\x1F/g' -e 's/(/\x1E/g' -e 's/[[:space:]][[:space:]]*/\x1C/g' \
|
---|
598 | | ${MY_SED} -e 's/\x1F/_/g' -e 's/\x1E/(/g' -e 's/\x1C/ /g' \
|
---|
599 | | ${MY_SORT} \
|
---|
600 | | ${MY_SED} -e '/#define/s/$/ \/\/ vbox/' --output "${MY_FILE}.2"
|
---|
601 |
|
---|
602 | # Eliminate duplicates.
|
---|
603 | > "${MY_FILE}.3"
|
---|
604 | exec < "${MY_FILE}.2"
|
---|
605 | MY_PREV_DEFINE=""
|
---|
606 | while read MY_LINE;
|
---|
607 | do
|
---|
608 | MY_DEFINE=`echo "${MY_LINE}" | ${MY_SED} -e 's/^#define \([^ ()]*\).*$/\1/' `
|
---|
609 | if test "${MY_DEFINE}" != "${MY_PREV_DEFINE}"; then
|
---|
610 | MY_PREV_DEFINE=${MY_DEFINE}
|
---|
611 | echo "${MY_LINE}" >> "${MY_FILE}.3"
|
---|
612 | fi
|
---|
613 | done
|
---|
614 |
|
---|
615 | # Append non-vbox bits from the current user config.
|
---|
616 | if test -n "${MY_USERCPP_H_FULL}" -a -f "${MY_USERCPP_H_FULL}"; then
|
---|
617 | ${MY_SED} -e '/ \/\/ vbox$/d' -e '/^[[:space:]]*$/d' --append "${MY_FILE}.3" "${MY_USERCPP_H_FULL}"
|
---|
618 | fi
|
---|
619 |
|
---|
620 | # Finalize the file (sort + blank lines).
|
---|
621 | ${MY_CAT} "${MY_FILE}.3" \
|
---|
622 | | ${MY_SED} -e 's/$/\n/' --output "${MY_FILE}"
|
---|
623 | ${MY_RM} -f "${MY_FILE}.2" "${MY_FILE}.3"
|
---|
624 |
|
---|
625 | # Install it.
|
---|
626 | if test -n "${MY_USERCPP_H_FULL}" -a -d "${MY_SLICKDIR}"; then
|
---|
627 | if test -f "${MY_USERCPP_H_FULL}"; then
|
---|
628 | ${MY_MV} -vf "${MY_USERCPP_H_FULL}" "${MY_USERCPP_H_FULL}.bak"
|
---|
629 | ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}"
|
---|
630 | echo "Updated the SlickEdit preprocessor file. (Previous version renamed to .bak.)"
|
---|
631 | else
|
---|
632 | ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}"
|
---|
633 | echo "Created the SlickEdit preprocessor file."
|
---|
634 | fi
|
---|
635 | fi
|
---|
636 | }
|
---|
637 |
|
---|
638 | ###### end of functions ####
|
---|
639 |
|
---|
640 |
|
---|
641 | #
|
---|
642 | # Parse arguments.
|
---|
643 | #
|
---|
644 | while test $# -ge 1;
|
---|
645 | do
|
---|
646 | ARG=$1
|
---|
647 | shift
|
---|
648 | case "$ARG" in
|
---|
649 |
|
---|
650 | --rootdir)
|
---|
651 | if test $# -eq 0; then
|
---|
652 | echo "error: missing --rootdir argument." 1>&2
|
---|
653 | exit 1;
|
---|
654 | fi
|
---|
655 | MY_ROOT_DIR="$1"
|
---|
656 | shift
|
---|
657 | ;;
|
---|
658 |
|
---|
659 | --outdir)
|
---|
660 | if test $# -eq 0; then
|
---|
661 | echo "error: missing --outdir argument." 1>&2
|
---|
662 | exit 1;
|
---|
663 | fi
|
---|
664 | MY_OUT_DIR="$1"
|
---|
665 | shift
|
---|
666 | ;;
|
---|
667 |
|
---|
668 | --project-base)
|
---|
669 | if test $# -eq 0; then
|
---|
670 | echo "error: missing --project-base argument." 1>&2
|
---|
671 | exit 1;
|
---|
672 | fi
|
---|
673 | MY_PRJ_PRF="$1"
|
---|
674 | shift
|
---|
675 | ;;
|
---|
676 |
|
---|
677 | --workspace)
|
---|
678 | if test $# -eq 0; then
|
---|
679 | echo "error: missing --workspace argument." 1>&2
|
---|
680 | exit 1;
|
---|
681 | fi
|
---|
682 | MY_WS_NAME="$1"
|
---|
683 | shift
|
---|
684 | ;;
|
---|
685 |
|
---|
686 | --windows-host)
|
---|
687 | MY_WINDOWS_HOST=1
|
---|
688 | ;;
|
---|
689 |
|
---|
690 | --minimal)
|
---|
691 | MY_OPT_MINIMAL=1
|
---|
692 | ;;
|
---|
693 |
|
---|
694 | # usage
|
---|
695 | --h*|-h*|-?|--?)
|
---|
696 | echo "usage: $0 [--rootdir <rootdir>] [--outdir <outdir>] [--project-base <prefix>] [--workspace <name>] [--minimal]"
|
---|
697 | echo ""
|
---|
698 | echo "If --outdir is specified, you must specify a --rootdir relative to it as well."
|
---|
699 | exit 1;
|
---|
700 | ;;
|
---|
701 |
|
---|
702 | # default
|
---|
703 | *)
|
---|
704 | echo "error: Invalid parameter '$ARG'" 1>&2
|
---|
705 | exit 1;
|
---|
706 |
|
---|
707 | esac
|
---|
708 | done
|
---|
709 |
|
---|
710 |
|
---|
711 | #
|
---|
712 | # From now on everything *MUST* succeed.
|
---|
713 | #
|
---|
714 | set -e
|
---|
715 |
|
---|
716 |
|
---|
717 | #
|
---|
718 | # Make sure the output directory exists, is valid and clean.
|
---|
719 | #
|
---|
720 | ${MY_RM} -f \
|
---|
721 | "${MY_OUT_DIR}/${MY_PRJ_PRF}"*.vpj \
|
---|
722 | "${MY_OUT_DIR}/${MY_WS_NAME}" \
|
---|
723 | "${MY_OUT_DIR}/`echo ${MY_WS_NAME} | ${MY_SED} -e 's/\.vpw$/.vtg/'`"
|
---|
724 | ${MY_MKDIR} -p "${MY_OUT_DIR}"
|
---|
725 | cd "${MY_OUT_DIR}"
|
---|
726 |
|
---|
727 |
|
---|
728 | #
|
---|
729 | # Determine the invocation to conjure up kmk.
|
---|
730 | #
|
---|
731 | my_abs_dir "tools"
|
---|
732 | if test -n "${MY_WINDOWS_HOST}"; then
|
---|
733 | MY_KMK_INVOCATION="${MY_ABS_DIR}/win.x86/bin/rexx.exe ${MY_ABS_DIR}/envSub.cmd kmk.exe"
|
---|
734 | else
|
---|
735 | MY_KMK_INVOCATION="${MY_ABS_DIR}/env.sh --quiet --no-wine kmk"
|
---|
736 | fi
|
---|
737 |
|
---|
738 |
|
---|
739 | #
|
---|
740 | # Generate the projects and workspace.
|
---|
741 | #
|
---|
742 | # Note! The configs aren't optimal yet, lots of adjustment wrt headers left to be done.
|
---|
743 | #
|
---|
744 |
|
---|
745 | # src/VBox/Runtime
|
---|
746 | my_generate_project "IPRT" "src/VBox/Runtime" --begin-incs "include" "src/VBox/Runtime/include" --end-includes "include/iprt" "src/VBox/Runtime"
|
---|
747 |
|
---|
748 | # src/VBox/VMM
|
---|
749 | my_generate_project "VMM" "src/VBox/VMM" --begin-incs "include" "src/VBox/VMM" --end-includes "src/VBox/VMM" \
|
---|
750 | "include/VBox/vmm/cfgm.h" \
|
---|
751 | "include/VBox/vmm/cpum.*" \
|
---|
752 | "include/VBox/vmm/dbgf.h" \
|
---|
753 | "include/VBox/vmm/em.h" \
|
---|
754 | "include/VBox/vmm/gmm.*" \
|
---|
755 | "include/VBox/vmm/gvm.*" \
|
---|
756 | "include/VBox/vmm/hw*.*" \
|
---|
757 | "include/VBox/vmm/iom.h" \
|
---|
758 | "include/VBox/vmm/mm.h" \
|
---|
759 | "include/VBox/vmm/patm.*" \
|
---|
760 | "include/VBox/vmm/pdm*.h" \
|
---|
761 | "include/VBox/vmm/pgm.*" \
|
---|
762 | "include/VBox/vmm/rem.h" \
|
---|
763 | "include/VBox/vmm/selm.*" \
|
---|
764 | "include/VBox/vmm/ssm.h" \
|
---|
765 | "include/VBox/vmm/stam.*" \
|
---|
766 | "include/VBox/vmm/tm.h" \
|
---|
767 | "include/VBox/vmm/trpm.*" \
|
---|
768 | "include/VBox/vmm/vm.*" \
|
---|
769 | "include/VBox/vmm/vmm.*"
|
---|
770 |
|
---|
771 | # src/recompiler
|
---|
772 | my_generate_project "REM" "src/recompiler" --begin-incs \
|
---|
773 | "include" \
|
---|
774 | "src/recompiler" \
|
---|
775 | "src/recompiler/target-i386" \
|
---|
776 | "src/recompiler/tcg/i386" \
|
---|
777 | "src/recompiler/Sun/crt" \
|
---|
778 | --end-includes \
|
---|
779 | "src/recompiler" \
|
---|
780 | "src/VBox/VMM/REMInternal.h" \
|
---|
781 | "src/VBox/VMM/VMMAll/REMAll.cpp"
|
---|
782 |
|
---|
783 | # src/VBox/Additions
|
---|
784 | my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --begin-incs "include" "src/VBox/Additions/freebsd" --end-includes "src/VBox/Additions/freebsd"
|
---|
785 | my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux"
|
---|
786 | my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2"
|
---|
787 | my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris"
|
---|
788 | my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT"
|
---|
789 | test -z "$MY_OPT_MINIMAL" && \
|
---|
790 | my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11"
|
---|
791 | my_generate_project "Add-Control" "src/VBox/Additions/common/VBoxControl" --begin-incs "include" "src/VBox/Additions/common/VBoxControl" --end-includes "src/VBox/Additions/common/VBoxControl"
|
---|
792 | my_generate_project "Add-GuestDrv" "src/VBox/Additions/common/VBoxGuest" --begin-incs "include" "src/VBox/Additions/common/VBoxGuest" --end-includes "src/VBox/Additions/common/VBoxGuest" "include/VBox/VBoxGuest*.*"
|
---|
793 | my_generate_project "Add-Lib" "src/VBox/Additions/common/VBoxGuestLib" --begin-incs "include" "src/VBox/Additions/common/VBoxGuestLib" --end-includes "src/VBox/Additions/common/VBoxGuestLib" "include/VBox/VBoxGuest*.*"
|
---|
794 | my_generate_project "Add-Service" "src/VBox/Additions/common/VBoxService" --begin-incs "include" "src/VBox/Additions/common/VBoxService" --end-includes "src/VBox/Additions/common/VBoxService"
|
---|
795 | test -z "$MY_OPT_MINIMAL" && \
|
---|
796 | my_generate_project "Add-crOpenGL" "src/VBox/Additions/common/crOpenGL" --begin-incs "include" "src/VBox/Additions/common/crOpenGL" --end-includes "src/VBox/Additions/common/crOpenGL"
|
---|
797 |
|
---|
798 | # src/VBox/Debugger
|
---|
799 | my_generate_project "Debugger" "src/VBox/Debugger" --begin-incs "include" "src/VBox/Debugger" --end-includes "src/VBox/Debugger" "include/VBox/dbggui.h" "include/VBox/dbg.h"
|
---|
800 |
|
---|
801 | # src/VBox/Devices
|
---|
802 | my_generate_project "Devices" "src/VBox/Devices" --begin-incs "include" "src/VBox/Devices" --end-includes "src/VBox/Devices" "include/VBox/pci.h" "include/VBox/pdm*.h"
|
---|
803 | ## @todo split this up.
|
---|
804 |
|
---|
805 | # src/VBox/Disassembler
|
---|
806 | my_generate_project "DIS" "src/VBox/Disassembler" --begin-incs "include" "src/VBox/Disassembler" --end-includes "src/VBox/Disassembler" "include/VBox/dis*.h"
|
---|
807 |
|
---|
808 | # src/VBox/Frontends
|
---|
809 | my_generate_project "FE-VBoxManage" "src/VBox/Frontends/VBoxManage" --begin-incs "include" "src/VBox/Frontends/VBoxManage" --end-includes "src/VBox/Frontends/VBoxManage"
|
---|
810 | my_generate_project "FE-VBoxHeadless" "src/VBox/Frontends/VBoxHeadless" --begin-incs "include" "src/VBox/Frontends/VBoxHeadless" --end-includes "src/VBox/Frontends/VBoxHeadless"
|
---|
811 | my_generate_project "FE-VBoxSDL" "src/VBox/Frontends/VBoxSDL" --begin-incs "include" "src/VBox/Frontends/VBoxSDL" --end-includes "src/VBox/Frontends/VBoxSDL"
|
---|
812 | my_generate_project "FE-VBoxShell" "src/VBox/Frontends/VBoxShell" --begin-incs "include" "src/VBox/Frontends/VBoxShell" --end-includes "src/VBox/Frontends/VBoxShell"
|
---|
813 | # noise - my_generate_project "FE-VBoxBFE" "src/VBox/Frontends/VBoxBFE" --begin-incs "include" "src/VBox/Frontends/VBoxBFE" --end-includes "src/VBox/Frontends/VBoxBFE"
|
---|
814 | FE_VBOX_WRAPPERS=""
|
---|
815 | for d in ${MY_OUT_DIRS};
|
---|
816 | do
|
---|
817 | if test -d "${MY_ROOT_DIR}/${d}/obj/VirtualBox/include"; then
|
---|
818 | FE_VBOX_WRAPPERS="${d}/obj/VirtualBox/include"
|
---|
819 | break
|
---|
820 | fi
|
---|
821 | done
|
---|
822 | if test -n "${FE_VBOX_WRAPPERS}"; then
|
---|
823 | my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" "${FE_VBOX_WRAPPERS}" --end-includes "src/VBox/Frontends/VirtualBox" "${FE_VBOX_WRAPPERS}/COMWrappers.cpp" "${FE_VBOX_WRAPPERS}/COMWrappers.h"
|
---|
824 | else
|
---|
825 | my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" --end-includes "src/VBox/Frontends/VirtualBox"
|
---|
826 | fi
|
---|
827 |
|
---|
828 | # src/VBox/GuestHost
|
---|
829 | my_generate_project "HGSMI-GH" "src/VBox/GuestHost/HGSMI" --begin-incs "include" --end-includes "src/VBox/GuestHost/HGSMI"
|
---|
830 | test -z "$MY_OPT_MINIMAL" && \
|
---|
831 | my_generate_project "OpenGL-GH" "src/VBox/GuestHost/OpenGL" --begin-incs "include" "src/VBox/GuestHost/OpenGL" --end-includes "src/VBox/GuestHost/OpenGL"
|
---|
832 | my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard"
|
---|
833 |
|
---|
834 | # src/VBox/HostDrivers
|
---|
835 | my_generate_project "SUP" "src/VBox/HostDrivers/Support" --begin-incs "include" "src/VBox/HostDrivers/Support" --end-includes "src/VBox/HostDrivers/Support" "include/VBox/sup.h" "include/VBox/sup.mac"
|
---|
836 | my_generate_project "VBoxNetAdp" "src/VBox/HostDrivers/VBoxNetAdp" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetAdp" --end-includes "src/VBox/HostDrivers/VBoxNetAdp" "include/VBox/intnet.h"
|
---|
837 | my_generate_project "VBoxNetFlt" "src/VBox/HostDrivers/VBoxNetFlt" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetFlt" --end-includes "src/VBox/HostDrivers/VBoxNetFlt" "include/VBox/intnet.h"
|
---|
838 | my_generate_project "VBoxUSB" "src/VBox/HostDrivers/VBoxUSB" --begin-incs "include" "src/VBox/HostDrivers/VBoxUSB" --end-includes "src/VBox/HostDrivers/VBoxUSB" "include/VBox/usblib*.h" "include/VBox/usbfilter.h"
|
---|
839 |
|
---|
840 | # src/VBox/HostServices
|
---|
841 | my_generate_project "GuestCntl" "src/VBox/HostServices/GuestControl" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestControl"
|
---|
842 | my_generate_project "GuestProps" "src/VBox/HostServices/GuestProperties" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestProperties"
|
---|
843 | my_generate_project "ShClip-HS" "src/VBox/HostServices/SharedClipboard" --begin-incs "include" "src/VBox/HostServices/SharedClipboard" --end-includes "src/VBox/HostServices/SharedClipboard"
|
---|
844 | my_generate_project "SharedFolders" "src/VBox/HostServices/SharedFolders" --begin-incs "include" "src/VBox/HostServices/SharedFolders" --end-includes "src/VBox/HostServices/SharedFolders" "include/VBox/shflsvc.h"
|
---|
845 | my_generate_project "OpenGL-HS" "src/VBox/HostServices/SharedOpenGL" --begin-incs "include" "src/VBox/HostServices/SharedOpenGL" --end-includes "src/VBox/HostServices/SharedOpenGL"
|
---|
846 |
|
---|
847 | # src/VBox/ImageMounter
|
---|
848 | my_generate_project "ImageMounter" "src/VBox/ImageMounter" --begin-incs "include" "src/VBox/ImageMounter" --end-includes "src/VBox/ImageMounter"
|
---|
849 |
|
---|
850 | # src/VBox/Installer
|
---|
851 | my_generate_project "Installers" "src/VBox/Installer" --begin-incs "include" --end-includes "src/VBox/Installer"
|
---|
852 |
|
---|
853 | # src/VBox/Main
|
---|
854 | my_generate_project "Main" "src/VBox/Main" --begin-incs "include" "src/VBox/Main/include" --end-includes "src/VBox/Main" "include/VBox/com" "include/VBox/settings.h"
|
---|
855 | ## @todo seperate webservices and Main. pick the right headers. added generated headers.
|
---|
856 |
|
---|
857 | # src/VBox/Network
|
---|
858 | my_generate_project "Net-DHCP" "src/VBox/NetworkServices/DHCP" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/DHCP"
|
---|
859 | my_generate_project "Net-NAT" "src/VBox/NetworkServices/NAT" --begin-incs "include" "src/VBox/NetworkServices/NAT" --end-includes "src/VBox/NetworkServices/NAT" "src/VBox/Devices/Network/slirp"
|
---|
860 | my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib"
|
---|
861 |
|
---|
862 | # src/VBox/RDP
|
---|
863 | my_generate_project "RDP-Client" "src/VBox/RDP/client" --begin-incs "include" "src/VBox/RDP/client" --end-includes "src/VBox/RDP/client"
|
---|
864 | my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server"
|
---|
865 | my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient"
|
---|
866 | my_generate_project "RDP-Misc" "src/VBox/RDP" --begin-incs "include" --end-includes "src/VBox/RDP/auth" "src/VBox/RDP/tscpasswd" "src/VBox/RDP/x11server"
|
---|
867 |
|
---|
868 | # src/VBox/Testsuite
|
---|
869 | my_generate_project "Testsuite" "src/VBox/Testsuite" --begin-incs "include" --end-includes "src/VBox/Testsuite"
|
---|
870 |
|
---|
871 | # src/apps/adpctl - misplaced.
|
---|
872 | my_generate_project "adpctl" "src/apps/adpctl" --begin-incs "include" --end-includes "src/apps/adpctl"
|
---|
873 |
|
---|
874 | # src/bldprogs
|
---|
875 | my_generate_project "bldprogs" "src/bldprogs" --begin-incs "include" --end-includes "src/bldprogs"
|
---|
876 |
|
---|
877 | # A few things from src/lib
|
---|
878 | my_generate_project "zlib" "src/libs/zlib-1.2.1" --begin-incs "include" --end-includes "src/libs/zlib-1.2.1/*.c" "src/libs/zlib-1.2.1/*.h"
|
---|
879 | my_generate_project "liblzf" "src/libs/liblzf-3.4" --begin-incs "include" --end-includes "src/libs/liblzf-3.4"
|
---|
880 | my_generate_project "libpng" "src/libs/libpng-1.2.8" --begin-incs "include" --end-includes "src/libs/libpng-1.2.8/*.c" "src/libs/libpng-1.2.8/*.h"
|
---|
881 | my_generate_project "openssl" "src/libs/openssl-0.9.8p" --begin-incs "include" "src/libs/openssl-0.9.8p/crypto" --end-includes "src/libs/openssl-0.9.8p"
|
---|
882 | my_generate_project "kStuff" "src/libs/kStuff" --begin-incs "include" "src/libs/kStuff/kStuff/include" --end-includes "src/libs/kStuff"
|
---|
883 |
|
---|
884 |
|
---|
885 | # include/VBox
|
---|
886 | my_generate_project "VBoxHeaders" "include" --begin-incs "include" --end-includes "include/VBox"
|
---|
887 |
|
---|
888 | # Misc
|
---|
889 | my_generate_project "misc" "src/testcase" --begin-incs "include" --end-includes \
|
---|
890 | "src/testcase" \
|
---|
891 | "configure" \
|
---|
892 | "configure.vbs" \
|
---|
893 | "Config.kmk" \
|
---|
894 | "Makefile.kmk" \
|
---|
895 | "src/Makefile.kmk" \
|
---|
896 | "src/VBox/Makefile.kmk"
|
---|
897 |
|
---|
898 |
|
---|
899 | # out/x.y/z/bin/sdk/bindings/xpcom
|
---|
900 | XPCOM_INCS="src/libs/xpcom18a4"
|
---|
901 | for d in \
|
---|
902 | "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/dist/sdk/bindings/xpcom" \
|
---|
903 | "out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE}/dist/sdk/bindings/xpcom" \
|
---|
904 | "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/bin/sdk/bindings/xpcom" \
|
---|
905 | "out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE}/bin/sdk/bindings/xpcom" \
|
---|
906 | "out/linux.amd64/debug/bin/sdk/bindings/xpcom" \
|
---|
907 | "out/linux.x86/debug/bin/sdk/bindings/xpcom" \
|
---|
908 | "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \
|
---|
909 | "out/darwin.x86/debug/bin/dist/bindings/xpcom" \
|
---|
910 | "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \
|
---|
911 | "out/solaris.x86/debug/bin/sdk/bindings/xpcom";
|
---|
912 | do
|
---|
913 | if test -d "${MY_ROOT_DIR}/${d}"; then
|
---|
914 | my_generate_project "SDK-xpcom" "${d}" --begin-incs "include" "${d}/include" --end-includes "${d}"
|
---|
915 | XPCOM_INCS="${d}/include"
|
---|
916 | break
|
---|
917 | fi
|
---|
918 | done
|
---|
919 |
|
---|
920 | # lib/xpcom
|
---|
921 | my_generate_project "xpcom" "src/libs/xpcom18a4" --begin-incs "include" "${XPCOM_INCS}" --end-includes "src/libs/xpcom18a4"
|
---|
922 |
|
---|
923 | my_generate_workspace
|
---|
924 |
|
---|
925 |
|
---|
926 | #
|
---|
927 | # Update the history file if present.
|
---|
928 | #
|
---|
929 | MY_FILE="${MY_WS_NAME}histu"
|
---|
930 | if test -f "${MY_FILE}"; then
|
---|
931 | echo "Updating ${MY_FILE}..."
|
---|
932 | ${MY_MV} -f "${MY_FILE}" "${MY_FILE}.old"
|
---|
933 | ${MY_SED} -n \
|
---|
934 | -e '/PROJECT_CACHE/d' \
|
---|
935 | -e '/\[TreeExpansion2\]/d' \
|
---|
936 | -e '/^\[/p' \
|
---|
937 | -e '/: /p' \
|
---|
938 | -e '/^CurrentProject/p' \
|
---|
939 | "${MY_FILE}.old" > "${MY_FILE}"
|
---|
940 | fi
|
---|
941 |
|
---|
942 |
|
---|
943 | #
|
---|
944 | # Generate and update the usercpp.h/unxcpp.h file.
|
---|
945 | #
|
---|
946 | my_generate_usercpp_h
|
---|
947 |
|
---|
948 |
|
---|
949 | echo "done"
|
---|
950 |
|
---|