VirtualBox

source: vbox/trunk/tools/bin/gen-slickedit-workspace.sh@ 90828

Last change on this file since 90828 was 90828, checked in by vboxsync, 3 years ago

Main: bugref:1909: Added API localization

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 58.2 KB
Line 
1# !kmk_ash
2# $Id: gen-slickedit-workspace.sh 90828 2021-08-24 09:44:46Z vboxsync $
3## @file
4# Script for generating a SlickEdit workspace.
5#
6
7#
8# Copyright (C) 2009-2020 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#
22MY_CAT="kmk_cat"
23MY_CP="kmk_cp"
24MY_MKDIR="kmk_mkdir"
25MY_MV="kmk_mv"
26MY_SED="kmk_sed"
27MY_RM="kmk_rm"
28MY_SLEEP="kmk_sleep"
29MY_EXPR="kmk_expr"
30MY_SVN="svn"
31
32#MY_SORT="kmk_cat"
33MY_SORT="sort"
34
35#
36# Globals.
37#
38MY_PROJECT_FILES=""
39MY_OUT_DIRS="\
40out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE} \
41out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/debug \
42out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/release \
43out/linux.amd64/debug \
44out/linux.x86/debug \
45out/win.amd64/debug \
46out/win.x86/debug \
47out/darwin.amd64/debug \
48out/darwin.x86/debug \
49out/haiku.amd64/debug \
50out/haiku.x86/debug \
51out/solaris.amd64/debug \
52out/solaris.x86/debug";
53
54
55#
56# Parameters w/ defaults.
57#
58MY_ROOT_DIR=".."
59MY_OUT_DIR="SlickEdit"
60MY_PRJ_PRF="VBox-"
61MY_WS_NAME="VirtualBox.vpw"
62MY_DBG=""
63MY_WINDOWS_HOST=""
64MY_OPT_MINIMAL=""
65MY_OPT_USE_WILDCARDS="yes"
66
67
68##
69# Gets the absolute path to an existing directory.
70#
71# @param $1 The path.
72my_abs_dir()
73{
74 if test -n "${PWD}"; then
75 MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && echo ${PWD}`
76
77 else
78 # old cygwin shell has no PWD and need adjusting.
79 MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && pwd | ${MY_SED} -e 's,^/cygdrive/\(.\)/,\1:/,'`
80 fi
81 if test -z "${MY_ABS_DIR}"; then
82 MY_ABS_DIR="${1}"
83 fi
84}
85
86##
87# Gets the file name part of a path.
88#
89# @param $1 The path.
90my_get_name()
91{
92 SAVED_IFS=$IFS
93 IFS=":/ "
94 set $1
95 while test $# -gt 1 -a -n "${2}";
96 do
97 shift;
98 done
99
100 IFS=$SAVED_IFS
101 #echo "$1"
102 export MY_GET_NAME=$1
103}
104
105##
106# Gets the newest version of a library (like openssl).
107#
108# @param $1 The library base path relative to root.
109my_get_newest_ver()
110{
111 cd "${MY_ROOT_DIR}" > /dev/null
112 latest=
113 for ver in "$1"*;
114 do
115 if test -z "${latest}" || "${MY_EXPR}" "${ver}" ">" "${latest}" > /dev/null; then
116 latest="${ver}"
117 fi
118 done
119 if test -z "${latest}"; then
120 echo "error: could not find any version of: $1" >&2;
121 exit 1;
122 fi
123 echo "${latest}"
124 return 0;
125}
126
127
128##
129# Generate file entry for the specified file if it was found to be of interest.
130#
131# @param $1 The output file name base.
132# @param $2 The file name.
133# @param $3 Optional folder override.
134my_file()
135{
136 # sort and filter by file type.
137 case "$2" in
138 # drop these.
139 *.kup|*~|*.pyc|*.exe|*.sys|*.dll|*.o|*.obj|*.lib|*.a|*.ko)
140 return 0
141 ;;
142
143 # by prefix or directory component.
144 tst*|*/testcase/*)
145 MY_FOLDER="$1-Testcases.lst"
146 ;;
147
148 # by extension.
149 *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h|*.java)
150 MY_FOLDER="$1-Sources.lst"
151 ;;
152
153 *.h|*.hpp|*.mm)
154 MY_FOLDER="$1-Headers.lst"
155 ;;
156
157 *.asm|*.s|*.S|*.inc|*.mac)
158 MY_FOLDER="$1-Assembly.lst"
159 ;;
160
161 *)
162 MY_FOLDER="$1-Others.lst"
163 ;;
164 esac
165 if test -n "$3";
166 then
167 MY_FOLDER="$1-$3.lst"
168 fi
169
170 ## @todo only files which are in subversion.
171# if ${MY_SVN} info "${2}" > /dev/null 2>&1; then
172 my_get_name "${2}"
173 echo ' <!-- sortkey: '"${MY_GET_NAME}"' --> <F N="'"${2}"'"/>' >> "${MY_FOLDER}"
174# fi
175}
176
177##
178# Generate file entry for the specified file if it was found to be of interest.
179#
180# @param $1 The output file name base.
181# @param $2 The wildcard spec.
182# @param $3 Optional folder override.
183my_wildcard()
184{
185 if test -n "$3"; then
186 MY_FOLDER="$1-$3.lst"
187 else
188 MY_FOLDER="$1-All.lst"
189 fi
190 EXCLUDES="*.log;*.kup;*~;*.bak;*.bak?;*.pyc;*.exe;*.sys;*.dll;*.o;*.obj;*.lib;*.a;*.ko;*.class;*.cvsignore;*.done;*.project;*.actionScriptProperties;*.scm-settings;*.svnpatch.rej;*.svn-base;.svn/*;*.gitignore;*.gitattributes;*.gitmodules;*.swagger-codegen-ignore;*.png;*.bmp;*.jpg"
191 echo ' <F N="'"${2}"'/*" Recurse="1" Excludes="'"${EXCLUDES}"'"/>' >> "${MY_FOLDER}"
192}
193
194##
195# Generate file entries for the specified sub-directory tree.
196#
197# @param $1 The output filename.
198# @param $2 The sub-directory.
199# @param $3 Optional folder override.
200my_sub_tree()
201{
202 if test -n "$MY_DBG"; then echo "dbg: my_sub_tree: ${2}"; fi
203
204 # Skip .svn directories.
205 case "$2" in
206 */.svn|*/.svn)
207 return 0
208 ;;
209 esac
210
211 # Process the files in the directory.
212 for f in $2/*;
213 do
214 if test -d "${f}";
215 then
216 my_sub_tree "${1}" "${f}" "${3}"
217 else
218 my_file "${1}" "${f}" "${3}"
219 fi
220 done
221 return 0;
222}
223
224
225##
226# Generate folders for the specified directories and files.
227#
228# @param $1 The output (base) file name.
229# @param $2+ The files and directories to traverse.
230my_generate_folder()
231{
232 MY_FILE="$1"
233 shift
234
235 # Zap existing file collections.
236 > "${MY_FILE}-All.lst"
237 > "${MY_FILE}-Sources.lst"
238 > "${MY_FILE}-Headers.lst"
239 > "${MY_FILE}-Assembly.lst"
240 > "${MY_FILE}-Testcases.lst"
241 > "${MY_FILE}-Others.lst"
242
243 # Traverse the directories and files.
244 while test $# -ge 1 -a -n "${1}";
245 do
246 for f in ${MY_ROOT_DIR}/$1;
247 do
248 if test -d "${f}";
249 then
250 if test -z "${MY_OPT_USE_WILDCARDS}";
251 then
252 my_sub_tree "${MY_FILE}" "${f}"
253 else
254 case "${f}" in
255 ${MY_ROOT_DIR}/include*)
256 #my_sub_tree "${MY_FILE}" "${f}" "Headers"
257 my_wildcard "${MY_FILE}" "${f}" "Headers"
258 ;;
259 *) my_wildcard "${MY_FILE}" "${f}"
260 ;;
261 esac
262 fi
263 else
264 my_file "${MY_FILE}" "${f}"
265 fi
266 done
267 shift
268 done
269
270 # Generate the folders.
271 if test -s "${MY_FILE}-All.lst";
272 then
273 ${MY_SORT} "${MY_FILE}-All.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
274 fi
275 if test -s "${MY_FILE}-Sources.lst";
276 then
277 echo ' <Folder Name="Sources" Filters="*.c;*.cpp;*.cpp.h;*.c.h;*.m;*.mm;*.pl;*.py;*.as">' >> "${MY_FILE}"
278 ${MY_SORT} "${MY_FILE}-Sources.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
279 echo ' </Folder>' >> "${MY_FILE}"
280 fi
281 if test -s "${MY_FILE}-Headers.lst";
282 then
283 if test -z "${MY_OPT_USE_WILDCARDS}";
284 then
285 echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}"
286 else
287 echo ' <Folder Name="Headers" Filters="">' >> "${MY_FILE}"
288 fi
289 ${MY_SORT} "${MY_FILE}-Headers.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
290 echo ' </Folder>' >> "${MY_FILE}"
291 fi
292 if test -s "${MY_FILE}-Assembly.lst";
293 then
294 echo ' <Folder Name="Assembly" Filters="*.asm;*.s;*.S;*.inc;*.mac">' >> "${MY_FILE}"
295 ${MY_SORT} "${MY_FILE}-Assembly.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
296 echo ' </Folder>' >> "${MY_FILE}"
297 fi
298 if test -s "${MY_FILE}-Testcases.lst";
299 then
300 echo ' <Folder Name="Testcases" Filters="tst*;">' >> "${MY_FILE}"
301 ${MY_SORT} "${MY_FILE}-Testcases.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
302 echo ' </Folder>' >> "${MY_FILE}"
303 fi
304 if test -s "${MY_FILE}-Others.lst";
305 then
306 echo ' <Folder Name="Others" Filters="">' >> "${MY_FILE}"
307 ${MY_SORT} "${MY_FILE}-Others.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
308 echo ' </Folder>' >> "${MY_FILE}"
309 fi
310
311 # Cleanup
312 ${MY_RM} "${MY_FILE}-All.lst" "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" \
313 "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst"
314}
315
316##
317# Function generating a project build config.
318#
319# @param $1 The project file name.
320# @param $2 Build config name.
321# @param $3 Extra kBuild command line options, variant 1.
322# @param $4 Extra kBuild command line options, variant 2.
323# @param $4+ Include directories.
324# @param $N --end-includes
325my_generate_project_config()
326{
327 MY_FILE="${1}";
328 MY_CFG_NAME="${2}";
329 MY_KMK_EXTRAS1="${3}";
330 MY_KMK_EXTRAS2="${4}";
331 MY_KMK_EXTRAS3="${5}";
332 MY_KMK_EXTRAS4="${6}";
333 shift; shift; shift; shift; shift; shift;
334
335 echo ' <Config Name="'"${MY_CFG_NAME}"'" OutputFile="" CompilerConfigName="Latest Version">' >> "${MY_FILE}"
336 echo ' <Menu>' >> "${MY_FILE}"
337
338 echo ' <Target Name="Compile" MenuCaption="&amp;Compile" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
339 echo ' SaveOption="SaveCurrent" RunFromDir="%p" ClearProcessBuffer="1">' >> "${MY_FILE}"
340 echo -n ' <Exec CmdLine="'"${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS1}"' -C %p %n.o' >> "${MY_FILE}"
341 if test -n "${MY_KMK_EXTRAS2}"; then
342 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS2} -C %p %n.o" >> "${MY_FILE}"
343 fi
344 if test -n "${MY_KMK_EXTRAS3}"; then
345 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS3} -C %p %n.o" >> "${MY_FILE}"
346 fi
347 if test -n "${MY_KMK_EXTRAS4}"; then
348 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS4} -C %p %n.o" >> "${MY_FILE}"
349 fi
350 echo '"/>' >> "${MY_FILE}"
351 echo ' </Target>' >> "${MY_FILE}"
352
353 echo ' <Target Name="Build" MenuCaption="&amp;Build"CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
354 echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}"
355 echo -n ' <Exec CmdLine="'"${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS1}"' -C %rw' >> "${MY_FILE}"
356 if test -n "${MY_KMK_EXTRAS2}"; then
357 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS2} -C %rw" >> "${MY_FILE}"
358 fi
359 if test -n "${MY_KMK_EXTRAS3}"; then
360 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS3} -C %rw" >> "${MY_FILE}"
361 fi
362 if test -n "${MY_KMK_EXTRAS4}"; then
363 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS4} -C %rw" >> "${MY_FILE}"
364 fi
365 echo '"/>' >> "${MY_FILE}"
366 echo ' </Target>' >> "${MY_FILE}"
367
368 echo ' <Target Name="Rebuild" MenuCaption="&amp;Rebuild" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
369 echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}"
370 echo -n ' <Exec CmdLine="'"${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS1}"' -C %rw' >> "${MY_FILE}"
371 if test -n "${MY_KMK_EXTRAS2}"; then
372 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS2} -C %rw rebuild" >> "${MY_FILE}"
373 fi
374 if test -n "${MY_KMK_EXTRAS3}"; then
375 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS3} -C %rw rebuild" >> "${MY_FILE}"
376 fi
377 if test -n "${MY_KMK_EXTRAS4}"; then
378 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS4} -C %rw rebuild" >> "${MY_FILE}"
379 fi
380 echo '"/>' >> "${MY_FILE}"
381 echo ' </Target>' >> "${MY_FILE}"
382
383 #echo ' <Target Name="Debug" MenuCaption="&amp;Debug" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}"
384 #echo ' <Exec/>' >> "${MY_FILE}"
385 #echo ' </Target>' >> "${MY_FILE}"
386 #echo ' <Target Name="Execute" MenuCaption="E&amp;xecute" SaveOption="SaveNone" RunFromDir="%rw">'>> "${MY_FILE}"
387 #echo ' <Exec/>' >> "${MY_FILE}"
388 #echo ' </Target>' >> "${MY_FILE}"
389 echo ' </Menu>' >> "${MY_FILE}"
390
391 #
392 # Include directories.
393 #
394 echo ' <Includes>' >> "${MY_FILE}"
395 while test $# -ge 1 -a "${1}" != "--end-includes";
396 do
397 for f in $1;
398 do
399 my_abs_dir ${f}
400 echo ' <Include Dir="'"${MY_ABS_DIR}/"'"/>' >> "${MY_FILE}"
401 done
402 shift
403 done
404 shift
405 echo ' </Includes>' >> "${MY_FILE}"
406 echo ' </Config>' >> "${MY_FILE}"
407}
408
409
410##
411# Function generating a project.
412#
413# @param $1 The project file name.
414# @param $2 The project working directory.
415# @param $3 Dummy separator.
416# @param $4+ Include directories.
417# @param $N --end-includes
418# @param $N+1 Directory sub-trees and files to include in the project.
419#
420my_generate_project()
421{
422 MY_FILE="${MY_PRJ_PRF}${1}.vpj";
423 echo "Generating ${MY_FILE}..."
424 MY_WRK_DIR="${2}"
425 shift
426 shift
427 shift
428
429 # Add it to the project list for workspace construction later on.
430 MY_PROJECT_FILES="${MY_PROJECT_FILES} ${MY_FILE}"
431
432
433 #
434 # Generate the head bits.
435 #
436 echo '<!DOCTYPE Project SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpj.dtd">' > "${MY_FILE}"
437 echo '<Project' >> "${MY_FILE}"
438 echo ' Version="10.0"' >> "${MY_FILE}"
439 echo ' VendorName="SlickEdit"' >> "${MY_FILE}"
440 echo ' VCSProject="Subversion:"' >> "${MY_FILE}"
441# echo ' Customized="1"' >> "${MY_FILE}"
442# echo ' WorkingDir="."' >> "${MY_FILE}"
443 my_abs_dir "${MY_WRK_DIR}" >> "${MY_FILE}"
444 echo ' WorkingDir="'"${MY_ABS_DIR}"'"' >> "${MY_FILE}"
445 echo ' >' >> "${MY_FILE}"
446 my_generate_project_config "${MY_FILE}" "Default" "" "" "" "" $*
447 my_generate_project_config "${MY_FILE}" "Debug + hardening" "KBUILD_TYPE=debug VBOX_WITH_HARDENING=1" "" "" "" $*
448 my_generate_project_config "${MY_FILE}" "Release + hardening" "KBUILD_TYPE=release VBOX_WITH_HARDENING=1" "" "" "" $*
449 my_generate_project_config "${MY_FILE}" "Debug+Release + hardening" \
450 "KBUILD_TYPE=debug VBOX_WITH_HARDENING=1" \
451 "KBUILD_TYPE=release VBOX_WITH_HARDENING=1" \
452 "" "" $*
453 my_generate_project_config "${MY_FILE}" "Debug w/o hardening" "KBUILD_TYPE=debug VBOX_WITHOUT_HARDENING=1" "" "" $*
454 my_generate_project_config "${MY_FILE}" "Release w/o hardening" "KBUILD_TYPE=release VBOX_WITHOUT_HARDENING=1" "" "" $*
455 my_generate_project_config "${MY_FILE}" "Debug+Release w/o hardening" \
456 "KBUILD_TYPE=debug VBOX_WITHOUT_HARDENING=1" \
457 "KBUILD_TYPE=release VBOX_WITHOUT_HARDENING=1" \
458 "" "" $*
459 my_generate_project_config "${MY_FILE}" "Debug+Release with and without hardening" \
460 "KBUILD_TYPE=debug VBOX_WITH_HARDENING=1" \
461 "KBUILD_TYPE=release VBOX_WITH_HARDENING=1" \
462 "KBUILD_TYPE=debug VBOX_WITHOUT_HARDENING=1" \
463 "KBUILD_TYPE=release VBOX_WITHOUT_HARDENING=1" \
464 $*
465
466 while test $# -ge 1 -a "${1}" != "--end-includes";
467 do
468 shift;
469 done;
470 shift;
471
472 #
473 # Process directories+files and create folders.
474 #
475 echo ' <Files>' >> "${MY_FILE}"
476 my_generate_folder "${MY_FILE}" $*
477 echo ' </Files>' >> "${MY_FILE}"
478
479 #
480 # The tail.
481 #
482 echo '</Project>' >> "${MY_FILE}"
483
484 return 0
485}
486
487
488##
489# Generate the workspace
490#
491my_generate_workspace()
492{
493 MY_FILE="${MY_WS_NAME}"
494 echo "Generating ${MY_FILE}..."
495 echo '<!DOCTYPE Workspace SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpw.dtd">' > "${MY_FILE}"
496 echo '<Workspace Version="10.0" VendorName="SlickEdit">' >> "${MY_FILE}"
497 echo ' <Projects>' >> "${MY_FILE}"
498 for i in ${MY_PROJECT_FILES};
499 do
500 echo ' <Project File="'"${i}"'" />' >> "${MY_FILE}"
501 done
502 echo ' </Projects>' >> "${MY_FILE}"
503 echo '</Workspace>' >> "${MY_FILE}"
504 return 0;
505}
506
507
508##
509# Generate stuff
510#
511my_generate_usercpp_h()
512{
513 #
514 # Probe the slickedit user config, picking the most recent version.
515 #
516 MY_VSLICK_DB_OLD=
517 if test -z "${MY_SLICK_CONFIG}"; then
518 if test -d "${HOME}/Library/Application Support/SlickEdit"; then
519 MY_SLICKDIR_="${HOME}/Library/Application Support/SlickEdit"
520 MY_USERCPP_H="unxcpp.h"
521 MY_VSLICK_DB="vslick.sta" # was .stu earlier, 24 is using .sta.
522 MY_VSLICK_DB_OLD="vslick.stu"
523 elif test -d "${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"; then
524 MY_SLICKDIR_="${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"
525 MY_USERCPP_H="usercpp.h"
526 MY_VSLICK_DB="vslick.sta"
527 else
528 MY_SLICKDIR_="${HOME}/.slickedit"
529 MY_USERCPP_H="unxcpp.h"
530 MY_VSLICK_DB="vslick.sta"
531 MY_VSLICK_DB_OLD="vslick.stu"
532 fi
533 else
534 MY_SLICKDIR_="${MY_SLICK_CONFIG}"
535 if test -n "${MY_WINDOWS_HOST}"; then
536 MY_USERCPP_H="usercpp.h"
537 MY_VSLICK_DB="vslick.sta"
538 else
539 MY_USERCPP_H="unxcpp.h"
540 MY_VSLICK_DB="vslick.sta"
541 MY_VSLICK_DB_OLD="vslick.stu"
542 fi
543 # MacOS: Implement me!
544 fi
545
546 MY_VER_NUM="0"
547 MY_VER="0.0.0"
548 for subdir in "${MY_SLICKDIR_}/"*;
549 do
550 if test -f "${subdir}/${MY_USERCPP_H}" \
551 -o -f "${subdir}/${MY_VSLICK_DB}" \
552 -o '(' -n "${MY_VSLICK_DB_OLD}" -a -f "${subdir}/${MY_VSLICK_DB_OLD}" ')'; then
553 MY_CUR_VER_NUM=0
554 MY_CUR_VER=`echo "${subdir}" | ${MY_SED} -e 's,^.*/,,g'`
555
556 # Convert the dotted version number to an integer, checking that
557 # it is all numbers in the process.
558 set `echo "${MY_CUR_VER}" | ${MY_SED} 's/\./ /g' `
559 i=24010000 # == 70*70*70*70; max major version 89.
560 while test $# -gt 0;
561 do
562 if ! ${MY_EXPR} "$1" + 1 > /dev/null 2> /dev/null; then
563 MY_CUR_VER_NUM=0;
564 break
565 fi
566 if test "$i" -gt 0; then
567 MY_CUR_VER_NUM=$((${MY_CUR_VER_NUM} + $1 * $i))
568 i=$(($i / 70))
569 fi
570 shift
571 done
572
573 # More recent that what we have?
574 if test "${MY_CUR_VER_NUM}" -gt "${MY_VER_NUM}"; then
575 MY_VER_NUM="${MY_CUR_VER_NUM}"
576 MY_VER="${MY_CUR_VER}"
577 fi
578 fi
579 done
580
581 MY_SLICKDIR="${MY_SLICKDIR_}/${MY_VER}"
582 MY_USERCPP_H_FULL="${MY_SLICKDIR}/${MY_USERCPP_H}"
583 if test -d "${MY_SLICKDIR}"; then
584 echo "Found SlickEdit v${MY_VER} preprocessor file: ${MY_USERCPP_H_FULL}"
585 else
586 echo "Failed to locate SlickEdit preprocessor file. You need to manually merge ${MY_USERCPP_H}."
587 echo "dbg: MY_SLICKDIR=${MY_SLICKDIR} MY_USERCPP_H_FULL=${MY_USERCPP_H_FULL}"
588 MY_USERCPP_H_FULL=""
589 fi
590
591 # Generate our
592 MY_FILE="${MY_USERCPP_H}"
593 ${MY_CAT} > ${MY_FILE} <<EOF
594#define IN_SLICKEDIT
595#define RT_C_DECLS_BEGIN
596#define RT_C_DECLS_END
597#define RT_NOTHROW_PROTO
598#define RT_NOTHROW_DEF
599#define RT_NO_THROW_PROTO
600#define RT_NO_THROW_DEF
601#define RT_NOEXCEPT
602#define RT_OVERRIDE
603#define RT_THROW(type) throw(type)
604#define RT_GCC_EXTENSION
605#define RT_COMPILER_GROKS_64BIT_BITFIELDS
606#define RT_COMPILER_WITH_80BIT_LONG_DOUBLE
607#define RT_DECL_NTAPI(type) type
608
609#define ATL_NO_VTABLE
610#define BEGIN_COM_MAP(a)
611#define COM_INTERFACE_ENTRY(a)
612#define COM_INTERFACE_ENTRY2(a,b)
613#define COM_INTERFACE_ENTRY3(a,b,c)
614#define COM_INTERFACE_ENTRY4(a,b,c,d)
615#define END_COM_MAP(a)
616
617#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a)
618#define COMGETTER(n) n
619#define COMSETTER(n) n
620#define ComSafeArrayIn(t,a) t a[]
621#define ComSafeArrayOut(t,a) t * a[]
622#define DECLARE_CLASSFACTORY(a)
623#define DECLARE_CLASSFACTORY_SINGLETON(a)
624#define DECLARE_REGISTRY_RESOURCEID(a)
625#define DECLARE_NOT_AGGREGATABLE(a)
626#define DECLARE_PROTECT_FINAL_CONSTRUCT(a)
627#define DECLARE_EMPTY_CTOR_DTOR(a) a(); ~a();
628#define DEFINE_EMPTY_CTOR_DTOR(a) a::a() {} a::~a() {}
629#define DECLARE_TRANSLATE_METHODS(cls) \
630 static inline const char *tr(const char *aSourceText, \
631 const char *aComment = NULL, \
632 const int aNum = -1) \
633 { \
634 return VirtualBoxTranslatable::translate(#cls, aSourceText, aComment, aNum); \
635 }
636#define DECLARE_COMMON_CLASS_METHODS(cls) \
637 DECLARE_EMPTY_CTOR_DTOR(cls) \
638 DECLARE_TRANSLATE_METHODS(cls)
639#define NS_DECL_ISUPPORTS
640#define NS_IMETHOD virtual nsresult
641#define NS_IMETHOD_(type) virtual type
642#define NS_IMETHODIMP nsresult
643#define NS_IMETHODIMP_(type) type
644#define PARSERS_EXPORT
645EOF
646 if test -n "${MY_WINDOWS_HOST}"; then
647 ${MY_CAT} >> ${MY_FILE} <<EOF
648#define COM_STRUCT_OR_CLASS(I) struct I
649#define STDMETHOD(m) virtual HRESULT m
650#define STDMETHOD_(type,m) virtual type m
651#define STDMETHODIMP HRESULT
652#define STDMETHODIMP_(type) type
653EOF
654 else
655 ${MY_CAT} >> ${MY_FILE} <<EOF
656#define COM_STRUCT_OR_CLASS(I) class I
657#define STDMETHOD(m) virtual nsresult m
658#define STDMETHOD_(type,m) virtual type m
659#define STDMETHODIMP nsresult
660#define STDMETHODIMP_(type) type
661EOF
662 fi
663 ${MY_CAT} >> ${MY_FILE} <<EOF
664#define VBOX_SCRIPTABLE(a) public a
665#define VBOX_SCRIPTABLE_IMPL(a)
666#define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(a)
667
668#define CTX_SUFF(var) var##R3
669#define CTXAllSUFF(var) var##R3
670#define CTXSUFF(var) var##HC
671#define OTHERCTXSUFF(var) var##GC
672#define CTXALLMID(first, last) first##R3##last
673#define CTXMID(first, last) first##HC##last
674#define OTHERCTXMID(first, last) first##GC##last
675#define CTXTYPE(GCType, R3Type, R0Type) R3Type
676#define RCTYPE(RCType, HCType) RCType
677#define GCTYPE(GCType, HCType) GCType
678#define RCPTRTYPE(RCType) RCType
679#define GCPTRTYPE(GCType) GCType
680#define HCPTRTYPE(HCType) HCType
681#define R3R0PTRTYPE(HCType) HCType
682#define R0PTRTYPE(R3Type) R3Type
683#define R3PTRTYPE(R0Type) R0Type
684#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__
685#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction
686#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction
687#define RTCALL
688#define RT_IPRT_FORMAT_ATTR(a_iFmt, a_iArgs)
689#define RT_IPRT_FORMAT_ATTR_MAYBE_NULL(a_iFmt, a_iArgs)
690#define DECLINLINE(type) inline type
691#define DECL_INLINE_THROW(type) inline type
692#define DECL_FORCE_INLINE(type) inline type
693#define DECL_INVALID(type) type
694
695#define PDMDEVINSINT_DECLARED 1
696#define VBOX_WITH_HGCM 1
697#define VBOXCALL
698
699#define HM_NAMELESS_UNION_TAG(a_Tag)
700#define HM_UNION_NM(a_Nm)
701#define HM_STRUCT_NM(a_Nm)
702
703#define PGM_ALL_CB_DECL(type) type
704#define PGM_ALL_CB2_DECL(type) type
705#define PGM_CTX(a,b) b
706#define PGM_CTX3(a,b,c) c
707#define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name)
708#define PGM_GST_NAME_REAL(name) pgmGstReal##name
709#define PGM_GST_NAME_PROT(name) pgmGstProt##name
710#define PGM_GST_NAME_32BIT(name) pgmGst32Bit##name
711#define PGM_GST_NAME_PAE(name) pgmGstPAE##name
712#define PGM_GST_NAME_AMD64(name) pgmGstAMD64##name
713#define PGM_GST_DECL(type, name) type PGM_GST_NAME(name)
714#define PGM_SHW_NAME(name) PGM_GST_NAME_AMD64(name)
715#define PGM_SHW_NAME_32BIT(name) pgmShw32Bit##name
716#define PGM_SHW_NAME_PAE(name) pgmShwPAE##name
717#define PGM_SHW_NAME_AMD64(name) pgmShwAMD64##name
718#define PGM_SHW_NAME_NESTED(name) pgmShwNested##name
719#define PGM_SHW_NAME_EPT(name) pgmShwEPT##name
720#define PGM_SHW_DECL(type, name) type PGM_SHW_NAME(name)
721#define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_AMD64(name)
722#define PGM_BTH_NAME_32BIT_REAL(name) pgmBth##name
723#define PGM_BTH_NAME_32BIT_PROT(name) pgmBth##name
724#define PGM_BTH_NAME_32BIT_32BIT(name) pgmBth##name
725#define PGM_BTH_NAME_PAE_REAL(name) pgmBth##name
726#define PGM_BTH_NAME_PAE_PROT(name) pgmBth##name
727#define PGM_BTH_NAME_PAE_32BIT(name) pgmBth##name
728#define PGM_BTH_NAME_PAE_PAE(name) pgmBth##name
729#define PGM_BTH_NAME_AMD64_PROT(name) pgmBth##name
730#define PGM_BTH_NAME_AMD64_AMD64(name) pgmBth##name
731#define PGM_BTH_NAME_NESTED_REAL(name) pgmBth##name
732#define PGM_BTH_NAME_NESTED_PROT(name) pgmBth##name
733#define PGM_BTH_NAME_NESTED_32BIT(name) pgmBth##name
734#define PGM_BTH_NAME_NESTED_PAE(name) pgmBth##name
735#define PGM_BTH_NAME_NESTED_AMD64(name) pgmBth##name
736#define PGM_BTH_NAME_EPT_REAL(name) pgmBth##name
737#define PGM_BTH_NAME_EPT_PROT(name) pgmBth##name
738#define PGM_BTH_NAME_EPT_32BIT(name) pgmBth##name
739#define PGM_BTH_NAME_EPT_PAE(name) pgmBth##name
740#define PGM_BTH_NAME_EPT_AMD64(name) pgmBth##name
741#define PGM_BTH_DECL(type, name) type PGM_BTH_NAME(name)
742
743#define FNIEMOP_STUB(a_Name) VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) { return VERR_NOT_IMPLEMENTED; }
744#define FNIEMOP_DEF(a_Name) VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)
745#define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0)
746#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)
747#define FNIEMOPRM_DEF(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, uint8_t bBm)
748#define IEM_CIMPL_DEF_0(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)
749#define IEM_CIMPL_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0)
750#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)
751#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)
752#define IEM_DECL_IMPL_DEF(a_RetType, a_Name, a_ArgList) a_RetType a_Name a_ArgList
753#define IEM_MC_LOCAL(a_Type, a_Name) a_Type a_Name
754#define IEM_MC_ARG(a_Type, a_Name, a_iArg) a_Type a_Name
755#define IEM_MC_ARG_CONST(a_Type, a_Name, a_Value, a_iArg) a_Type const a_Name = a_Value
756#define IEM_STATIC
757
758#define RTASN1_IMPL_GEN_SEQ_OF_TYPEDEFS_AND_PROTOS(a_SeqOfType, a_ItemType, a_DeclMacro, a_ImplExtNm) typedef struct a_SeqOfType { RTASN1SEQUENCECORE SeqCore; RTASN1ALLOCATION Allocation; uint32_t cItems; RT_CONCAT(P,a_ItemType) paItems; } a_SeqOfType; typedef a_SeqOfType *P##a_SeqOfType, const *PC##a_SeqOfType; int a_ImplExtNm##_DecodeAsn1(struct RTASN1CURSOR *pCursor, uint32_t fFlags, P##a_SeqOfType pThis, const char *pszErrorTag); int a_ImplExtNm##_Compare(PC##a_SeqOfType pLeft, PC##a_SeqOfType pRight)
759#define RTASN1_IMPL_GEN_SET_OF_TYPEDEFS_AND_PROTOS(a_SetOfType, a_ItemType, a_DeclMacro, a_ImplExtNm) typedef struct a_SetOfType { RTASN1SETCORE SetCore; RTASN1ALLOCATION Allocation; uint32_t cItems; RT_CONCAT(P,a_ItemType) paItems; } a_SetOfType; typedef a_SetOfType *P##a_SetOfType, const *PC##a_SetOfType; int a_ImplExtNm##_DecodeAsn1(struct RTASN1CURSOR *pCursor, uint32_t fFlags, P##a_SetOfType pThis, const char *pszErrorTag); int a_ImplExtNm##_Compare(PC##a_SetOfType pLeft, PC##a_SetOfType pRight)
760#define RTASN1TYPE_STANDARD_PROTOTYPES_NO_GET_CORE(a_TypeNm, a_DeclMacro, a_ImplExtNm) int a_ImplExtNm##_Init(P##a_TypeNm pThis, PCRTASN1ALLOCATORVTABLE pAllocator); int a_ImplExtNm##_Clone(P##a_TypeNm pThis, PC##a_TypeNm) pSrc, PCRTASN1ALLOCATORVTABLE pAllocator); void a_ImplExtNm##_Delete(P##a_TypeNm pThis); int a_ImplExtNm##_Enum(P##a_TypeNm pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser); int a_ImplExtNm##_Compare(PC##a_TypeNm) pLeft, PC##a_TypeNm pRight); int a_ImplExtNm##_DecodeAsn1(PRTASN1CURSOR pCursor, uint32_t fFlags, P##a_TypeNm pThis, const char *pszErrorTag); int a_ImplExtNm##_CheckSanity(PC##a_TypeNm pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
761#define RTASN1TYPE_STANDARD_PROTOTYPES(a_TypeNm, a_DeclMacro, a_ImplExtNm, a_Asn1CoreNm) inline PRTASN1CORE a_ImplExtNm##_GetAsn1Core(PC##a_TypeNm pThis) { return (PRTASN1CORE)&pThis->a_Asn1CoreNm; } inline bool a_ImplExtNm##_IsPresent(PC##a_TypeNm pThis) { return pThis && RTASN1CORE_IS_PRESENT(&pThis->a_Asn1CoreNm); } RTASN1TYPE_STANDARD_PROTOTYPES_NO_GET_CORE(a_TypeNm, a_DeclMacro, a_ImplExtNm)
762
763#define RTLDRELF_NAME(name) rtldrELF64##name
764#define RTLDRELF_SUFF(name) name##64
765#define RTLDRELF_MID(pre,suff) pre##64##suff
766
767#define BS3_DECL(type) type
768#define BS3_DECL_CALLBACK(type) type
769#define TMPL_NM(name) name##_mmm
770#define TMPL_FAR_NM(name) name##_mmm_far
771#define BS3_CMN_NM(name) name
772#define BS3_CMN_FAR_NM(name) name
773#define BS3_CMN_FN_NM(name) name
774#define BS3_DATA_NM(name) name
775#define BS3_FAR
776#define BS3_FAR_CODE
777#define BS3_FAR_DATA
778#define BS3_NEAR
779#define BS3_NEAR_CODE
780#define BS3_CMN_PROTO_STUB(a_RetType, a_Name, a_Params) a_RetType a_Name a_Params
781#define BS3_CMN_PROTO_NOSB(a_RetType, a_Name, a_Params) a_RetType a_Name a_Params
782#define BS3_CMN_DEF( a_RetType, a_Name, a_Params) a_RetType a_Name a_Params
783#define BS3_MODE_PROTO_STUB(a_RetType, a_Name, a_Params) \
784 a_RetType a_Name##_mmm a_Params; \
785 a_RetType a_Name##_mmm_far a_Params; \
786 a_RetType a_Name##_rm a_Params; \
787 a_RetType a_Name##_pe16 a_Params; \
788 a_RetType a_Name##_pe16_32 a_Params; \
789 a_RetType a_Name##_pe16_v86 a_Params; \
790 a_RetType a_Name##_pe32 a_Params; \
791 a_RetType a_Name##_pe32_16 a_Params; \
792 a_RetType a_Name##_pev86 a_Params; \
793 a_RetType a_Name##_pp16 a_Params; \
794 a_RetType a_Name##_pp16_32 a_Params; \
795 a_RetType a_Name##_pp16_v86 a_Params; \
796 a_RetType a_Name##_pp32 a_Params; \
797 a_RetType a_Name##_pp32_16 a_Params; \
798 a_RetType a_Name##_ppv86 a_Params; \
799 a_RetType a_Name##_pae16 a_Params; \
800 a_RetType a_Name##_pae16_32 a_Params; \
801 a_RetType a_Name##_pae16_v86 a_Params; \
802 a_RetType a_Name##_pae32 a_Params; \
803 a_RetType a_Name##_pae32_16 a_Params; \
804 a_RetType a_Name##_paev86 a_Params; \
805 a_RetType a_Name##_lm16 a_Params; \
806 a_RetType a_Name##_lm32 a_Params; \
807 a_RetType a_Name##_lm64 a_Params; \
808 a_RetType a_Name##_rm_far a_Params; \
809 a_RetType a_Name##_pe16_far a_Params; \
810 a_RetType a_Name##_pe16_v86_far a_Params; \
811 a_RetType a_Name##_pe32_16_far a_Params; \
812 a_RetType a_Name##_pev86_far a_Params; \
813 a_RetType a_Name##_pp16_far a_Params; \
814 a_RetType a_Name##_pp16_v86_far a_Params; \
815 a_RetType a_Name##_pp32_16_far a_Params; \
816 a_RetType a_Name##_ppv86_far a_Params; \
817 a_RetType a_Name##_pae16_far a_Params; \
818 a_RetType a_Name##_pae16_v86_far a_Params; \
819 a_RetType a_Name##_pae32_16_far a_Params; \
820 a_RetType a_Name##_paev86_far a_Params; \
821 a_RetType a_Name##_lm16_far a_Params
822#define BS3_MODE_PROTO_NOSB(a_RetType, a_Name, a_Params) \
823 a_RetType a_Name##_mmm a_Params; \
824 a_RetType a_Name##_mmm_far a_Params; \
825 a_RetType a_Name##_rm a_Params; \
826 a_RetType a_Name##_pe16 a_Params; \
827 a_RetType a_Name##_pe16_32 a_Params; \
828 a_RetType a_Name##_pe16_v86 a_Params; \
829 a_RetType a_Name##_pe32 a_Params; \
830 a_RetType a_Name##_pe32_16 a_Params; \
831 a_RetType a_Name##_pev86 a_Params; \
832 a_RetType a_Name##_pp16 a_Params; \
833 a_RetType a_Name##_pp16_32 a_Params; \
834 a_RetType a_Name##_pp16_v86 a_Params; \
835 a_RetType a_Name##_pp32 a_Params; \
836 a_RetType a_Name##_pp32_16 a_Params; \
837 a_RetType a_Name##_ppv86 a_Params; \
838 a_RetType a_Name##_pae16 a_Params; \
839 a_RetType a_Name##_pae16_32 a_Params; \
840 a_RetType a_Name##_pae16_v86 a_Params; \
841 a_RetType a_Name##_pae32 a_Params; \
842 a_RetType a_Name##_pae32_16 a_Params; \
843 a_RetType a_Name##_paev86 a_Params; \
844 a_RetType a_Name##_lm16 a_Params; \
845 a_RetType a_Name##_lm32 a_Params; \
846 a_RetType a_Name##_lm64 a_Params; \
847 a_RetType a_Name##_rm_far a_Params; \
848 a_RetType a_Name##_pe16_far a_Params; \
849 a_RetType a_Name##_pe16_v86_far a_Params; \
850 a_RetType a_Name##_pe32_16_far a_Params; \
851 a_RetType a_Name##_pev86_far a_Params; \
852 a_RetType a_Name##_pp16_far a_Params; \
853 a_RetType a_Name##_pp16_v86_far a_Params; \
854 a_RetType a_Name##_pp32_16_far a_Params; \
855 a_RetType a_Name##_ppv86_far a_Params; \
856 a_RetType a_Name##_pae16_far a_Params; \
857 a_RetType a_Name##_pae16_v86_far a_Params; \
858 a_RetType a_Name##_pae32_16_far a_Params; \
859 a_RetType a_Name##_paev86_far a_Params; \
860 a_RetType a_Name##_lm16_far a_Params
861#define BS3_MODE_EXPAND_EXTERN_DATA16(a_VarType, a_VarName, a_Suffix) \
862 extern a_VarType a_VarName##_rm a_Suffix; \
863 extern a_VarType a_VarName##_pe16 a_Suffix; \
864 extern a_VarType a_VarName##_pe16_32 a_Suffix; \
865 extern a_VarType a_VarName##_pe16_v86 a_Suffix; \
866 extern a_VarType a_VarName##_pe32 a_Suffix; \
867 extern a_VarType a_VarName##_pe32_16 a_Suffix; \
868 extern a_VarType a_VarName##_pev86 a_Suffix; \
869 extern a_VarType a_VarName##_pp16 a_Suffix; \
870 extern a_VarType a_VarName##_pp16_32 a_Suffix; \
871 extern a_VarType a_VarName##_pp16_v86 a_Suffix; \
872 extern a_VarType a_VarName##_pp32 a_Suffix; \
873 extern a_VarType a_VarName##_pp32_16 a_Suffix; \
874 extern a_VarType a_VarName##_ppv86 a_Suffix; \
875 extern a_VarType a_VarName##_pae16 a_Suffix; \
876 extern a_VarType a_VarName##_pae16_32 a_Suffix; \
877 extern a_VarType a_VarName##_pae16_v86 a_Suffix; \
878 extern a_VarType a_VarName##_pae32 a_Suffix; \
879 extern a_VarType a_VarName##_pae32_16 a_Suffix; \
880 extern a_VarType a_VarName##_paev86 a_Suffix; \
881 extern a_VarType a_VarName##_lm16 a_Suffix; \
882 extern a_VarType a_VarName##_lm32 a_Suffix; \
883 extern a_VarType a_VarName##_lm64 a_Suffix
884
885EOF
886
887 MY_HDR_FILES=` echo ${MY_ROOT_DIR}/include/VBox/*.h ${MY_ROOT_DIR}/include/VBox/vmm/*.h \
888 | ${MY_SED} -e 's,${MY_ROOT_DIR}/include/VBox/err.h,,' `
889 MY_HDR_FILES="${MY_HDR_FILES} ${MY_ROOT_DIR}/include/iprt/cdefs.h"
890 ${MY_SED} \
891 -e '/__cdecl/d' \
892 -e '/^ *# *define.*DECL/!d' \
893 -e '/DECLS/d' \
894 -e '/DECLARE_CLS_/d' \
895 -e '/_SRC_POS_DECL/d' \
896 -e '/declspec/d' \
897 -e '/__attribute__/d' \
898 -e 's/# */#/g' \
899 -e 's/ */ /g' \
900 -e '/ DECLEXPORT_CLASS/d' \
901 -e 's/ *VBOXCALL//' \
902 -e 's/ *RTCALL//' \
903 -e '/ DECLASM(type) type/d' \
904 -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
905 -e '/define *DECLINLINE(type)/d' \
906 -e '/define *DECL_FORCE_INLINE(type)/d' \
907 -e '/ *DECL_INVALID(/d' \
908 \
909 -e 's/(type) DECLHIDDEN(type)/(type) type/' \
910 -e 's/(type) DECLEXPORT(type)/(type) type/' \
911 -e 's/(type) DECLIMPORT(type)/(type) type/' \
912 -e 's/(type) DECL_HIDDEN_NOTHROW(type)/(type) type/' \
913 -e 's/(type) DECL_EXPORT_NOTHROW(type)/(type) type/' \
914 -e 's/(type) DECL_IMPORT_NOTHROW(type)/(type) type/' \
915 -e 's/(a_Type) DECLHIDDEN(a_Type)/(a_Type) a_Type/' \
916 -e 's/(a_Type) DECLEXPORT(a_Type)/(a_Type) a_Type/' \
917 -e 's/(a_Type) DECLIMPORT(a_Type)/(a_Type) a_Type/' \
918 -e 's/(a_Type) DECL_HIDDEN_NOTHROW(a_Type)/(a_Type) a_Type/' \
919 -e 's/(a_Type) DECL_EXPORT_NOTHROW(a_Type)/(a_Type) a_Type/' \
920 -e 's/(a_Type) DECL_IMPORT_NOTHROW(a_Type)/(a_Type) a_Type/' \
921 \
922 --append "${MY_FILE}" \
923 ${MY_HDR_FILES}
924
925 ${MY_CAT} "${MY_FILE}" \
926 | ${MY_SED} -e 's/_/\x1F/g' -e 's/(/\x1E/g' -e 's/[[:space:]][[:space:]]*/\x1C/g' \
927 | ${MY_SED} -e 's/\x1F/_/g' -e 's/\x1E/(/g' -e 's/\x1C/ /g' \
928 | ${MY_SORT} \
929 | ${MY_SED} -e '/#define/s/$/ \/\/ vbox/' --output "${MY_FILE}.2"
930
931 # Eliminate duplicates.
932 > "${MY_FILE}.3"
933 exec < "${MY_FILE}.2"
934 MY_PREV_DEFINE=""
935 while read MY_LINE;
936 do
937 MY_DEFINE=`echo "${MY_LINE}" | ${MY_SED} -e 's/^#define \([^ ()]*\).*$/\1/' `
938 if test "${MY_DEFINE}" != "${MY_PREV_DEFINE}"; then
939 MY_PREV_DEFINE=${MY_DEFINE}
940 echo "${MY_LINE}" >> "${MY_FILE}.3"
941 fi
942 done
943
944 # Append non-vbox bits from the current user config.
945 if test -n "${MY_USERCPP_H_FULL}" -a -f "${MY_USERCPP_H_FULL}"; then
946 ${MY_SED} -e '/ \/\/ vbox$/d' -e '/^[[:space:]]*$/d' --append "${MY_FILE}.3" "${MY_USERCPP_H_FULL}"
947 fi
948
949 # Finalize the file (sort + blank lines).
950 ${MY_CAT} "${MY_FILE}.3" \
951 | ${MY_SED} -e 's/$/\n/' --output "${MY_FILE}"
952 ${MY_RM} -f "${MY_FILE}.2" "${MY_FILE}.3"
953
954 # Install it.
955 if test -n "${MY_USERCPP_H_FULL}" -a -d "${MY_SLICKDIR}"; then
956 if test -f "${MY_USERCPP_H_FULL}"; then
957 ${MY_MV} -vf "${MY_USERCPP_H_FULL}" "${MY_USERCPP_H_FULL}.bak"
958 ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}"
959 echo "Updated the SlickEdit preprocessor file. (Previous version renamed to .bak.)"
960 else
961 ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}"
962 echo "Created the SlickEdit preprocessor file."
963 fi
964 fi
965}
966
967###### end of functions ####
968
969
970#
971# Parse arguments.
972#
973while test $# -ge 1;
974do
975 ARG=$1
976 shift
977 case "$ARG" in
978
979 --rootdir)
980 if test $# -eq 0; then
981 echo "error: missing --rootdir argument." 1>&2
982 exit 1;
983 fi
984 MY_ROOT_DIR="$1"
985 shift
986 ;;
987
988 --outdir)
989 if test $# -eq 0; then
990 echo "error: missing --outdir argument." 1>&2
991 exit 1;
992 fi
993 MY_OUT_DIR="$1"
994 shift
995 ;;
996
997 --project-base)
998 if test $# -eq 0; then
999 echo "error: missing --project-base argument." 1>&2
1000 exit 1;
1001 fi
1002 MY_PRJ_PRF="$1"
1003 shift
1004 ;;
1005
1006 --workspace)
1007 if test $# -eq 0; then
1008 echo "error: missing --workspace argument." 1>&2
1009 exit 1;
1010 fi
1011 MY_WS_NAME="$1"
1012 shift
1013 ;;
1014
1015 --windows-host)
1016 MY_WINDOWS_HOST=1
1017 ;;
1018
1019 --minimal)
1020 MY_OPT_MINIMAL=1
1021 ;;
1022
1023 --slickedit-config)
1024 MY_SLICK_CONFIG="$1"
1025 shift
1026 ;;
1027
1028 # usage
1029 --h*|-h*|-?|--?)
1030 echo "usage: $0 [--rootdir <rootdir>] [--outdir <outdir>] [--project-base <prefix>] [--workspace <name>] [--minimal] [--slickedit-config <DIR>]"
1031 echo ""
1032 echo "If --outdir is specified, you must specify a --rootdir relative to it as well."
1033 exit 1;
1034 ;;
1035
1036 # default
1037 *)
1038 echo "error: Invalid parameter '$ARG'" 1>&2
1039 exit 1;
1040
1041 esac
1042done
1043
1044
1045#
1046# From now on everything *MUST* succeed.
1047#
1048set -e
1049
1050
1051#
1052# Make sure the output directory exists, is valid and clean.
1053#
1054${MY_RM} -f \
1055 "${MY_OUT_DIR}/${MY_PRJ_PRF}"*.vpj \
1056 "${MY_OUT_DIR}/${MY_WS_NAME}" \
1057 "${MY_OUT_DIR}/`echo ${MY_WS_NAME} | ${MY_SED} -e 's/\.vpw$/.vtg/'`"
1058${MY_MKDIR} -p "${MY_OUT_DIR}"
1059cd "${MY_OUT_DIR}"
1060
1061
1062#
1063# Determine the invocation to conjure up kmk.
1064#
1065my_abs_dir "tools"
1066if test -n "${MY_WINDOWS_HOST}"; then
1067 MY_KMK_INVOCATION="cscript.exe /Nologo ${MY_ABS_DIR}/envSub.vbs --quiet -- kmk.exe"
1068else
1069 MY_KMK_INVOCATION="/usr/bin/env LANG=C ${MY_ABS_DIR}/env.sh --quiet --no-wine kmk"
1070fi
1071
1072
1073#
1074# Generate the projects and workspace.
1075#
1076# Note! The configs aren't optimal yet, lots of adjustment wrt headers left to be done.
1077#
1078
1079# src/VBox/Runtime
1080my_generate_project "IPRT" "src/VBox/Runtime" --begin-incs "include" "src/VBox/Runtime/include" --end-includes "include/iprt" "src/VBox/Runtime"
1081
1082# src/VBox/VMM
1083my_generate_project "VMM" "src/VBox/VMM" --begin-incs "include" "src/VBox/VMM" --end-includes "src/VBox/VMM" \
1084 "include/VBox/vmm/cfgm.h" \
1085 "include/VBox/vmm/cpum.*" \
1086 "include/VBox/vmm/dbgf.h" \
1087 "include/VBox/vmm/em.h" \
1088 "include/VBox/vmm/gim.h" \
1089 "include/VBox/vmm/apic.h" \
1090 "include/VBox/vmm/gmm.*" \
1091 "include/VBox/vmm/gvm.*" \
1092 "include/VBox/vmm/hm*.*" \
1093 "include/VBox/vmm/iom.h" \
1094 "include/VBox/vmm/mm.h" \
1095 "include/VBox/vmm/patm.*" \
1096 "include/VBox/vmm/pdm*.h" \
1097 "include/VBox/vmm/pgm.*" \
1098 "include/VBox/vmm/selm.*" \
1099 "include/VBox/vmm/ssm.h" \
1100 "include/VBox/vmm/stam.*" \
1101 "include/VBox/vmm/tm.h" \
1102 "include/VBox/vmm/trpm.*" \
1103 "include/VBox/vmm/vm.*" \
1104 "include/VBox/vmm/vmm.*"
1105
1106# src/VBox/Additions
1107my_generate_project "Add-darwin" "src/VBox/Additions/darwin" --begin-incs "include" "src/VBox/Additions/darwin" --end-includes "src/VBox/Additions/darwin"
1108my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --begin-incs "include" "src/VBox/Additions/freebsd" --end-includes "src/VBox/Additions/freebsd"
1109my_generate_project "Add-haiku" "src/VBox/Additions/haiku" --begin-incs "include" "src/VBox/Additions/haiku" --end-includes "src/VBox/Additions/haiku"
1110my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux"
1111my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2"
1112my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris"
1113my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT"
1114if test -z "$MY_OPT_MINIMAL"; then
1115 my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11"
1116fi
1117my_generate_project "Add-Control" "src/VBox/Additions/common/VBoxControl" --begin-incs "include" "src/VBox/Additions/common/VBoxControl" --end-includes "src/VBox/Additions/common/VBoxControl"
1118my_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*.*"
1119my_generate_project "Add-Lib" "src/VBox/Additions/common/VBoxGuest/lib" --begin-incs "include" "src/VBox/Additions/common/VBoxGuest/lib" --end-includes "src/VBox/Additions/common/VBoxGuest/lib" "include/VBox/VBoxGuest/lib/*.*"
1120my_generate_project "Add-Service" "src/VBox/Additions/common/VBoxService" --begin-incs "include" "src/VBox/Additions/common/VBoxService" --end-includes "src/VBox/Additions/common/VBoxService"
1121my_generate_project "Add-VBoxVideo" "src/VBox/Additions/common/VBoxVideo" --begin-incs "include" "src/VBox/Additions/common/VBoxVideo" --end-includes "src/VBox/Additions/common/VBoxVideo"
1122if test -z "$MY_OPT_MINIMAL"; then
1123 my_generate_project "Add-pam" "src/VBox/Additions/common/pam" --begin-incs "include" "src/VBox/Additions/common/pam" --end-includes "src/VBox/Additions/common/pam"
1124 my_generate_project "Add-cmn-test" "src/VBox/Additions/common/testcase" --begin-incs "include" "src/VBox/Additions/common/testcase" --end-includes "src/VBox/Additions/common/testcase"
1125 my_generate_project "Add-CredProv" "src/VBox/Additions/WINNT/VBoxCredProv" --begin-incs "include" "src/VBox/Additions/WINNT/VBoxCredProv" --end-includes "src/VBox/Additions/WINNT/VBoxCredProv"
1126 my_generate_project "Add-GINA" "src/VBox/Additions/WINNT/VBoxGINA" --begin-incs "include" "src/VBox/Additions/WINNT/VBoxGINA" --end-includes "src/VBox/Additions/WINNT/VBoxGINA"
1127fi
1128
1129# src/VBox/Debugger
1130my_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"
1131
1132# src/VBox/Devices
1133my_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"
1134## @todo split this up.
1135
1136# src/VBox/Disassembler
1137my_generate_project "DIS" "src/VBox/Disassembler" --begin-incs "include" "src/VBox/Disassembler" --end-includes "src/VBox/Disassembler" "include/VBox/dis*.h"
1138
1139# src/VBox/Frontends
1140if test -z "$MY_OPT_MINIMAL"; then
1141 my_generate_project "FE-VBoxBalloonCtrl" "src/VBox/Frontends/VBoxBalloonCtrl" --begin-incs "include" "src/VBox/Frontends/VBoxBalloonCtrl" --end-includes "src/VBox/Frontends/VBoxBalloonCtrl"
1142fi
1143my_generate_project "FE-VBoxManage" "src/VBox/Frontends/VBoxManage" --begin-incs "include" "src/VBox/Frontends/VBoxManage" --end-includes "src/VBox/Frontends/VBoxManage"
1144my_generate_project "FE-VBoxHeadless" "src/VBox/Frontends/VBoxHeadless" --begin-incs "include" "src/VBox/Frontends/VBoxHeadless" --end-includes "src/VBox/Frontends/VBoxHeadless"
1145my_generate_project "FE-VBoxSDL" "src/VBox/Frontends/VBoxSDL" --begin-incs "include" "src/VBox/Frontends/VBoxSDL" --end-includes "src/VBox/Frontends/VBoxSDL"
1146my_generate_project "FE-VBoxShell" "src/VBox/Frontends/VBoxShell" --begin-incs "include" "src/VBox/Frontends/VBoxShell" --end-includes "src/VBox/Frontends/VBoxShell"
1147# noise - my_generate_project "FE-VBoxBFE" "src/VBox/Frontends/VBoxBFE" --begin-incs "include" "src/VBox/Frontends/VBoxBFE" --end-includes "src/VBox/Frontends/VBoxBFE"
1148FE_VBOX_WRAPPERS=""
1149for d in ${MY_OUT_DIRS};
1150do
1151 if test -d "${MY_ROOT_DIR}/${d}/obj/VirtualBox/include"; then
1152 FE_VBOX_WRAPPERS="${d}/obj/VirtualBox/include"
1153 break
1154 fi
1155done
1156if test -n "${FE_VBOX_WRAPPERS}"; then
1157 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"
1158else
1159 my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" --end-includes "src/VBox/Frontends/VirtualBox"
1160fi
1161
1162# src/VBox/GuestHost
1163my_generate_project "HGSMI-GH" "src/VBox/GuestHost/HGSMI" --begin-incs "include" --end-includes "src/VBox/GuestHost/HGSMI"
1164if test -z "$MY_OPT_MINIMAL"; then
1165 my_generate_project "DnD-GH" "src/VBox/GuestHost/DragAndDrop" --begin-incs "include" --end-includes "src/VBox/GuestHost/DragAndDrop"
1166fi
1167my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard"
1168
1169# src/VBox/HostDrivers
1170my_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"
1171my_generate_project "VBoxNetAdp" "src/VBox/HostDrivers/VBoxNetAdp" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetAdp" --end-includes "src/VBox/HostDrivers/VBoxNetAdp" "include/VBox/intnet.h"
1172my_generate_project "VBoxNetFlt" "src/VBox/HostDrivers/VBoxNetFlt" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetFlt" --end-includes "src/VBox/HostDrivers/VBoxNetFlt" "include/VBox/intnet.h"
1173my_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"
1174my_generate_project "AdpCtl" "src/VBox/HostDrivers/adpctl" --begin-incs "include" --end-includes "src/VBox/HostDrivers/adpctl"
1175
1176# src/VBox/HostServices
1177my_generate_project "GuestCntl" "src/VBox/HostServices/GuestControl" --begin-incs "include" "src/VBox/HostServices/GuestControl" --end-includes "src/VBox/HostServices/GuestControl"
1178my_generate_project "DragAndDrop" "src/VBox/HostServices/DragAndDrop" --begin-incs "include" "src/VBox/HostServices/DragAndDrop" --end-includes "src/VBox/HostServices/DragAndDrop"
1179my_generate_project "GuestProps" "src/VBox/HostServices/GuestProperties" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestProperties"
1180my_generate_project "ShClip-HS" "src/VBox/HostServices/SharedClipboard" --begin-incs "include" "src/VBox/HostServices/SharedClipboard" --end-includes "src/VBox/HostServices/SharedClipboard"
1181my_generate_project "SharedFolders" "src/VBox/HostServices/SharedFolders" --begin-incs "include" "src/VBox/HostServices/SharedFolders" --end-includes "src/VBox/HostServices/SharedFolders" "include/VBox/shflsvc.h"
1182
1183# src/VBox/ImageMounter
1184my_generate_project "ImageMounter" "src/VBox/ImageMounter" --begin-incs "include" "src/VBox/ImageMounter" --end-includes "src/VBox/ImageMounter"
1185
1186# src/VBox/Installer
1187my_generate_project "Installers" "src/VBox/Installer" --begin-incs "include" --end-includes "src/VBox/Installer"
1188
1189# src/VBox/Main
1190my_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"
1191## @todo seperate webservices and Main. pick the right headers. added generated headers.
1192
1193# src/VBox/Network
1194my_generate_project "Net-DHCP" "src/VBox/NetworkServices/Dhcpd" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/Dhcpd"
1195my_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"
1196my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib"
1197
1198# src/VBox/RDP
1199my_generate_project "RDP-Client" "src/VBox/RDP/client-1.8.4" --begin-incs "include" "src/VBox/RDP/client-1.8.4" --end-includes "src/VBox/RDP/client-1.8.4"
1200my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server"
1201my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient"
1202my_generate_project "RDP-Misc" "src/VBox/RDP" --begin-incs "include" --end-includes "src/VBox/RDP/auth" "src/VBox/RDP/tscpasswd" "src/VBox/RDP/x11server"
1203
1204# src/VBox/Storage
1205my_generate_project "Storage" "src/VBox/Storage" --begin-incs "include" "src/VBox/Storage" --end-includes "src/VBox/Storage"
1206
1207# src/VBox/ValidationKit
1208my_generate_project "ValidationKit" "src/VBox/ValidationKit" --begin-incs "include" --end-includes "src/VBox/ValidationKit"
1209
1210# src/VBox/ExtPacks
1211my_generate_project "ExtPacks" "src/VBox/ExtPacks" --begin-incs "include" --end-includes "src/VBox/ExtPacks"
1212
1213# src/bldprogs
1214my_generate_project "bldprogs" "src/bldprogs" --begin-incs "include" --end-includes "src/bldprogs"
1215
1216# A few things from src/lib
1217lib=$(my_get_newest_ver src/libs/zlib)
1218my_generate_project "zlib" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h"
1219lib=$(my_get_newest_ver src/libs/liblzf)
1220my_generate_project "liblzf" "${lib}" --begin-incs "include" --end-includes "${lib}"
1221lib=$(my_get_newest_ver src/libs/libpng)
1222my_generate_project "libpng" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h"
1223lib=$(my_get_newest_ver src/libs/openssl)
1224my_generate_project "openssl" "${lib}" --begin-incs "include" "${lib}/crypto" --end-includes "${lib}"
1225lib=$(my_get_newest_ver src/libs/curl)
1226my_generate_project "curl" "${lib}" --begin-incs "include" "${lib}/include" --end-includes "${lib}"
1227
1228# webtools
1229my_generate_project "webtools" "webtools" --begin-incs "include" "webtools/tinderbox/server/Tinderbox3" --end-includes "webtools"
1230
1231# include/VBox
1232my_generate_project "VBoxHeaders" "include" --begin-incs "include" --end-includes "include/VBox"
1233
1234# Misc
1235my_generate_project "misc" "." --begin-incs "include" --end-includes \
1236 "configure" \
1237 "configure.vbs" \
1238 "Config.kmk" \
1239 "Makefile.kmk" \
1240 "src/Makefile.kmk" \
1241 "src/VBox/Makefile.kmk" \
1242 "tools/env.sh" \
1243 "tools/env.cmd" \
1244 "tools/envSub.vbs" \
1245 "tools/envSub.cmd" \
1246 "tools/win/vbscript"
1247
1248
1249# out/x.y/z/bin/sdk/bindings/xpcom
1250XPCOM_INCS="src/libs/xpcom18a4"
1251for d in \
1252 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/dist/sdk/bindings/xpcom" \
1253 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/bin/sdk/bindings/xpcom" \
1254 "out/linux.amd64/debug/bin/sdk/bindings/xpcom" \
1255 "out/linux.x86/debug/bin/sdk/bindings/xpcom" \
1256 "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \
1257 "out/darwin.x86/debug/bin/dist/bindings/xpcom" \
1258 "out/haiku.amd64/debug/bin/sdk/bindings/xpcom" \
1259 "out/haiku.x86/debug/bin/sdk/bindings/xpcom" \
1260 "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \
1261 "out/solaris.x86/debug/bin/sdk/bindings/xpcom";
1262do
1263 if test -d "${MY_ROOT_DIR}/${d}"; then
1264 my_generate_project "SDK-xpcom" "${d}" --begin-incs "include" "${d}/include" --end-includes "${d}"
1265 XPCOM_INCS="${d}/include"
1266 break
1267 fi
1268done
1269
1270# lib/xpcom
1271my_generate_project "xpcom" "src/libs/xpcom18a4" --begin-incs "include" "${XPCOM_INCS}" --end-includes "src/libs/xpcom18a4"
1272
1273my_generate_workspace
1274
1275
1276#
1277# Update the history file if present.
1278#
1279MY_FILE="${MY_WS_NAME}histu"
1280if test -f "${MY_FILE}"; then
1281 echo "Updating ${MY_FILE}..."
1282 ${MY_MV} -f "${MY_FILE}" "${MY_FILE}.old"
1283 ${MY_SED} -n \
1284 -e '/PROJECT_CACHE/d' \
1285 -e '/\[TreeExpansion2\]/d' \
1286 -e '/^\[/p' \
1287 -e '/: /p' \
1288 -e '/^CurrentProject/p' \
1289 "${MY_FILE}.old" > "${MY_FILE}"
1290fi
1291
1292
1293#
1294# Generate and update the usercpp.h/unxcpp.h file.
1295#
1296my_generate_usercpp_h
1297
1298
1299echo "done"
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette